Tool to help Daily Commit

2020-01-19

Let's see how to use github-contribution plugin of BitBar to check Github commit status.

Outline

Recently, I started Daily Commit in Github. I always open Github profile page on the tab of Chrome, and check it many times. I think I need to stop it to save time, so I searched and found BitBar and github-contribution plugin.

In this blog post, I will introduce how to use BitBar and github-contribution plugin to show Github commit status on Mac statusbar.

use BitBar to keep Daily Commit - bitbar github-contribution

Prepare plugin folder

We need a plugin folder to save BitBar plugin. Create a folder where you want and name what you want.

Install BitBar

Execute the command below to install BitBar.

brew cask install bitbar

After installing, you can see BitBar app in the app list like below. Execute BitBar app.

use BitBar to keep Daily Commit - complete to install BitBar

When you execute BitBar app for the first time, you can see the screen like below. click Open button to execute the app.

use BitBar to keep Daily Commit - execute BitBar

If you see the select plugin folder screen, select the folder you created above. You can change the plugin folder anytime like below.

use BitBar to keep Daily Commit - change BitBar plugin folder

Install Plugin

Click the link below to go to github-contribution plugin site.

When you go to the plugin site, you can see the screen like below.

use BitBar to keep Daily Commit - github contribution plugin site

Click + Add to BitBar button on the left top to add github contribution plugin to BitBar

use BitBar to keep Daily Commit - open bitbar

When you click the add button, you can see the screen like above. Click Open BitBar button.

use BitBar to keep Daily Commit - install plugin

Next, you can see the installation dialog. Click Install button to install the plugin.

Add plugin source code

We need source code to use the plugin. Go to the plugin folder you created above and create github-contribution.10m.rb file.

use BitBar to keep Daily Commit - github contribution plugin site

If you create the file, click View source link beside + Add to BitBar button on the plugin site.

use BitBar to keep Daily Commit - github contribution plugin sourcecode

copy the source, and paste it to github-contribution.10m.rb file you created above.

bitbarrc setting

We need to configure Github account. Open ~/.bitbarrc file via your editor.

# vscode
code ~/.bitbarrc

And then, add the contents below to it.

[github_contribution]
username = <GITHUB_USERNAME>
max_contributions = 10

Change <GITHUB_USERNAME> to your Github user name.

Execute the plugin

Let’s execute the plugin! Click BitBar icon on the right of Mac statusbar. And select Refresh all menu.

use BitBar to keep Daily Commit - bitbar refresh all

After refreshing, you can see the commit status on BitBar.

use BitBar to keep Daily Commit - complete to instlal bitbar github-contribution

BitBar github-contribution plugin updates the commit info every 10 minutes.

Complete

We’ve seen how to install BitBar and configure github-contribution plugin to keep Daily Commit.

We don’t need to open Github profile page to check the commit status for Daily Commit anymore. Let’s do Daily Commit hard!

Buy me a coffeeBuy me a coffee
Posts