This bitbar plugin shows the open diffs from the author and a list of diffs to be reviewed.
To use this plugin, you have to have node
and bitbar installed on your machine.
To install bitbar, follow the instructions on the bitbar homepage.
- Clone this repository
- run
npm install
inside the repository - Configure your API token and phabricator IDs inside the js file
- Execute the following command to create a symbolic link from your repo to the bitbar plugin folder:
ln -s $PHABRICATOR-BITBAR_REPO_LOCATION/phabricator-bitbar.5m.js $BITBAR_PLUGIN_FOLDER/phabricator-bitbar.5m.js
All configuration is done via the config
object at the beginning of the bitbar file.
For the host
config, you need to enter the address of the phabricator instance you want to query.
Bitbar regularly tries to execute the script provided in this repo. In the first line of the script, you need to specify which node executable should be used.
To access the conduit API, you need an API key. To generate it:
- Go to your phabricator instance web interface
- Click your profile icon -> settings
- in the left sidebar, you can find "Conduit API Tokens"
- Generate a key and copy it into the config in
phabricator-bitbar.5m.js
In your terminal, execute echo '{}' | arc call-conduit user.whoami
. In the response you see a phid
field which
you can copy into the author
field in phabricator-bitbar.5m.js
.
In the config you can find a reviewers
field. You can enter your own phid here to show every diff that shows you as a reviewer. You can also add a phid that identifies your team.
There is the option to show the count of comments in the status bar. Phabricator-bitbar fetches all comments from a diff and tries to filter out comments from bots
like jenkins. Additionally, we are trying to parse jenkins urls that lead to jobs linked to the diffs. Therefore, we have two configuration properties, jenkins
and
jenkinsUrlRegEx
. The jenkins
property is a string that should be set to the PHID under which jenkins is commenting.
jenkinsUrlRegEx
should be set to a regular expression that matches job urls that should be extracted from jenkins comments.
You can configure the interval at which the script is called by renaming it. Find more info on this here.