Git Product home page Git Product logo

bittray's Introduction

Bittray

GitHub release GitHub Release Date GitHub All Releases Go Report Card

A system tray application for monitoring your BitBucket pull requests, written in Go.

Archived 📦

This project is now archived and unmaintained.

It is replaced by bittray 2 - a rewrite in .NET (still in development).

Gopher Logo

API Support

This version supports Bitbucket REST API v1.0.

It's tested to work up to Atlassian Bitbucket v5.16.3.

I do plan to update it to API 2, once I have a need. Non-breaking PRs to that end are welcome (but please file an issue).

Details and Use

See https://michaelsanford.github.io/bittray/ for details.

Building with Windows Resource Extensions

You'll need Electron's rcedit-x64 in your PATH before continuing.

By default, Windows 10's PowerShell Execution Policy is set to Restricted. To build, you'll need to temporarily set that to Unrestricted for the packager to run.

You do not need to run it with Administrative privileges.

powershell.exe -ExecutionPolicy Unrestricted .\build.ps1 -version 0.0.0

Make sure config.CurrentVersionTag (in constants.go) matches what you provide in -version.

Read up on PowerShell Execution Policy.

License

MIT

Disclaimer

This project is in no way affiliated with or officially endorsed by Atlassian Inc.

Icons are courtesy Recep Kütük.

Gopher logo generated by https://github.com/quasilyte/gopherkon with original artwork by Renee French.

bittray's People

Contributors

dependabot[bot] avatar michaelsanford avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

kurniliya

bittray's Issues

GitHub API Autoupdater

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"
    }
  ],

Using https://github.com/coreos/go-semver

Save configuration in a text file instead of the WCM

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.

Reduce completely of tray#onReady

Tray#onReady is a big monolithic untestable diety-method.

Break it up in order to

  • Reduce it's cyclomatic complexity
  • Make its parts more testable

Related #33

Make polling interval configurable

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.

Handle hitting API rate limit

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?

Fixup Codacy complaints

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!

Ensure assets comply with licensing

Double-check that the icons, hastily-included during development, are properly licensed.

Replace any that aren't immediately. Link-back where necessary or appropriate.

Implement native notifications

It would be cool to have the native notification API pop banners and stack messages (rather than simply blink the system tray icon).

Handle error when polling

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()?

Stop polling if authenticaiton fails

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.

Option to show pull requests I authored

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.

Docs

Notify when a PR has been updated

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

  1. Show a different icon in the system tray, and/or
  2. Pop a notification (see #3)

Add simple mock-free tests

Seems like mocking in Go is an huge amount of work; going to start with simple tests that don't require mocking.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.