michaelsanford / bittray Goto Github PK
View Code? Open in Web Editor NEWA Windows system tray app for monitoring your BitBucket pull requests, written in Go
Home Page: https://michaelsanford.com/bittray/
License: MIT License
A Windows system tray app for monitoring your BitBucket pull requests, written in Go
Home Page: https://michaelsanford.com/bittray/
License: MIT License
Seems like mocking in Go is an huge amount of work; going to start with simple tests that don't require mocking.
Add some support for pprof
There are a bunch of possibly-irrelevant warnings from Codacy in markdown files, and some perhaps more important ones in build.ps1
, might as well fix them up!
Currently polling is hard-coded at 10 seconds.
In a large organization, that might blow up the user's request quota or provoke some DDoS protection. It would be cool to make that configurable, somehow.
Because, frankly, why not.
It would be nice to be able to sign the binary.
Study and incorporate relevant feedback from Code Review.SE:
Nothing wrong with AppVeyor per se, just like to get all my CI in one place.
Don't come up with anything "clever" to store credentials - just implement the WCM.
Relates to #2
Make some documentation in README.
Make a mini info gh-pages site https://michaelsanford.github.io/bittray
Test coverage currently stands at a less-than-wonderful 0 %.
By now you've silenced Stash's emails, so you won't know when someone marks your pull request as Needs Work, or adds a Comment on it.
Probably need that.
Hey cool so I have to completely rewrite the JSON parser to do this... hashtag-worth.
Once #5 works, pass that data into the system tray menu.
Open them when clicked https://godoc.org/github.com/pkg/browser
For now just open the configured Stash dashboard, since a limitation in systray
prevents cleaning up old menu items, and it's not worth trying to do something fancy for the MVP.
Double-check that the icons, hastily-included during development, are properly licensed.
Replace any that aren't immediately. Link-back where necessary or appropriate.
The number is hidden in the tooltip, which is not that useful.
Update the menu item from
Go to Bitbucket
to
Go Review n Pull Requests
Implement some simple benchmarks.
The WCM was originally implemented in the hopes of securely storing the password, which I later learned it will not without a significant amount of effort #14, #1.
It was kept to speed MVP deployment. Now, configuration could be elaborated and stored in some serialized text format (probably YAML) and allow for more flexible configuration options, such as #28 getting re-implemented from its current clumsy form.
If receiving a status 429
, probably just set a decrement counter to skip the next n
requests.
Maybe set the counter as a function of the configured polling interval: shorter interval, longer backoff?
Because right now, it's all a series of console up-arrows, and that's kinda fragile.
Automatically poll GitHub API Releases endpoint for new versions within the app on startup.
Pop up a window and navigate to the deployed Jekyll site (not the repo releases page).
https://api.github.com/repos/michaelsanford/bittray/releases/latest
Relevant data from JSON
"tag_name": "v1.0.1",
"assets": [
{
"content_type": "application/x-zip-compressed",
"state": "uploaded",
"browser_download_url": "https://github.com/michaelsanford/bittray/releases/download/v1.0.1/bittray-1.0.1.zip"
}
],
A learnèd colleague suggested I look into Azure Pipelines
It seems the existing way of doing that no longer works with go 1.13.6.
Try with rsrc
Add appropriate syso information to when building windows binary.
The poller continues to run even if the password provided is incorrect. It should stop polling in the event of a 403 response.
Beta testing revealed that it can cause the user's account to be locked for excessive incorrect password attempts. This is really bad.
Ensure that this software will continue to work with Atlassian Cloud-hosted Bitbucket.
Hopefully this can be accomplished with a scoped App Password (will require additional documentation). This has the philosophical advantage of being the suggested method for SourceTree.
If not, an OAuth2 client workflow will have to be implemented.
Ref:
Ex:
Basic Travis integration just to ensure go build
works.
[![Build Status](https://travis-ci.org/michaelsanford/bittray.svg?branch=master)](https://travis-ci.org/michaelsanford/bittray)
Filter out PRs that I have approved -- I probably don't care about them any more. People can follow up directly.
It turns out the WCM is not even remotely a secure password store.
So passwords are not safe, hashes and such you verify to lock something are not safe. It's not safe, it's a piece of garbage and I've struggled for a long time to understand its usefulness.
Don't persist the user's Bitbucket password -- just ask for it every session.
Tray#onReady
is a big monolithic untestable diety-method.
Break it up in order to
Related #33
Handle error in package polling
to account for connectivity issues
go func(items chan []PullRequest) {
for ; true; <-ticker.C {
resp, _ := client.Do(req)
bodyText, _ := ioutil.ReadAll(resp.Body)
s := extract(string(bodyText))
items <- s
}
}(items)
https://golang.org/pkg/net/http/#Client.Do
Change the system tray icon and probably don't panic()
?
It would be cool to have the native notification API pop banners and stack messages (rather than simply blink the system tray icon).
Needs to capture
In the case of a Needs Work, I'd like to know when a PR's updatedDate
has changed between polling intervals.
This could possibly
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.