Inspired by Hukum BitActions is a BitBar plugin that displays Github Actions (GA) status in your Mac OS X Menu Bar. It is good for watching a regular Github workflow setup from your project, but also to allow you to filter a specific branch that you are working on in a pull request workflow.
Make sure you have node
and npm
, then install with the bundled install script:
$ curl https://raw.githubusercontent.com/paulononaka/bitactions/master/install.sh | NODE=$(which node) bash
Create a .bitactionsrc
file in your home with the following contents:
{
"githubToken": "<token>",
"githubRepoName": "<repo-name>",
"watchRepoDir": "<repo-name>",
"statusMode": "summarized"
}
// Optional for public repos, required for privated ones - A forty-digit alphanumeric string
BitActions uses Github Actions API. It is possible to use these APIs without any authentication for public repositories. However, for unauthenticated requests, the rate limit allows for up to 60 requests per hour (Details at docs.github.com) which can exhaust quickly. Authenticated requests have higher limits, up to 5000 requests per hour.
Follow these steps at docs.github.com to create a personal token. The token does not need to have any specific scope for public repositories. However, the token needs to have repo - Full control of private repositories
scope for private repositories.
// Required - Ex: paulononaka/bitactions
You can get it from the end of your github URL. https://github.com/paulononaka/bitactions
becames paulononaka/bitactions
.
// Optional - Ex: /Users/paulononaka/codes/bitactions
Say you have a workflow that trigger on: pull_request
. GitHub Actions keeps one workflow for all pushed branches so the last run might not be the branch that you are working on locally, the one that you really want to monitor.
So set this option only if you wish to include a status specifically for a branch that you are working on locally. If you set it a submenu with the workflow filtered by the branch that you are working will be watched. If you wish the status in your Mac OS X Menu Bar to show only this branch, set statusMode
as branch
.
Please notice that this feature uses the local branch from a local repo, so if you change the branch locally the submenu will attempt to search for that branch and if it isn't a pull request branch it won't be displayed.
// Optional - branch, rotate or summarized. Ex: summarized
Choose how the macOS menu bar should appear in the macOS bar menu:
- summarized - Shows all workflows at once, without names.
- rotate - Rotates the workflow with its name, showing one at a time.
- branch - Fixes the status to the branch that you are working on your
watchRepoDir
.
BitActions uses Github Actions API to get the related workflow to the recent git push and its status. It keeps on calling the APIs every time your BitBar refreshes.
Contribution with code or documentation by raising a pull request are more than welcome! Head over to the issues tab to report any bug or suggest an improvement.