Giter Site home page Giter Site logo

github.swiftbar's Introduction

GitHub PRs on MacOS Menu Bar

I usually push a lot of PRs in form of stacked PRs to GitHub. It’s quite annoying to go through each PR to see the check status. So I created this plugin to show my PRs on the menu bar. — Now, everything is just a click away!


How to use

  1. Clone this repository.

  2. Copy swiftbar.github/_config.example.go to config.local.go.

  3. Edit config.local.go to add your GitHub token, and other configs.

  4. Install direnv if neccessary.

  5. Run direnv allow to allow the configs to be loaded.

  6. Run run build to generate the executable file _cli.

    git clone https://github.com/iOliverNguyen/github.swiftbar
    cd github.swiftbar
    
    # add your configs
    cp swiftbar.github/_config.example.go swiftbar.github/config.local.go 
    vim swiftbar.github/config.local.go
    
    direnv allow
    run build      # generate swiftbar.github/_cli
  7. Download SwiftBar.

  8. Open SwiftBar.app, select the github.swiftbar/swiftbar folder as the plugin folder.

  9. Refresh the plugins. And enjoy!


Features

1. Top PRs section

  • List of your chosen PRs, sorted by your order.
  • You can customize the list of PRs in this section by updating the file github.swiftbar/__/.prs.txt. It contains a list of PRs that you want to show in this section. GitHub.SwiftBar will try extracting PR numbers from the file, ignoring text. You can create a command to update the file automatically when you push a stacked PRs.
  • If you do not have any PRs in the list, it will fallback to display your most recent PRs, sorted by updated time (last 3 days for open PRs, and last 1 day for merged PRs).

2. My recent PRs section

  • List of your recent PRs, sorted by number.
  • Last 7 days, include both open and merged PRs.

3. Other PRs section

  • List of PRs from other people, sorted by number.
  • Last 7 days for all PRs with comments.
  • Last 3 days for all PRs without comments. If you want to keep a PR that you find interesting up to 7 days, just add a comment to it.

4. Actions

  • Click a PR to open.
  • Click a check status to open.

Other Notes

  • Debugging: run the code in verbose mode, and check the log file.

    go  run ./swiftbar.github -v
    ls  ./__
    cat ./__/error.log
  • See the SwiftBar documentation.

  • The plugin refreshes every 30s. To change to duration, rename the file github.30s.sh.

  • To hide all SwiftBar menu items, and have a clean look: open the references, select "Hide Menu Items".

Author

This is my experiment and only intend to use for myself. The code uses GitHub private API, which is not recommended. Consider using the official GitHub CLI instead to get the CI/CD status plus a lot of useful features.

Thanks to SwiftBar for all the hard works!

Oliver Nguyen

github.swiftbar's People

Contributors

iolivernguyen avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

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.