A couple of releases ago the processing.js project team decided that a bug tracker is needed to keep track of needed fixes and missing-features. We decided Lighthouse was a good and free application. Here is the link to the processing.js lighthouse project. Lighthouse has been working great but sometimes developers (including me) think it is too much work. Due to this, most of our tickets go from I started working on this….. to I am done here it is. This is fine but often the ticket is in the “I started working on this” stage for 2+ weeks. This makes it hard to distinguish between tickets that are just started or actually in the process of getting solved.
A couple of days ago, while doing a ‘bulk edit’ on some tickets, I realized that you can join Lighthouse and GitHub. This is great because anytime you commit to GitHub using the command git commit -m” ” you can actually put in keywords that will be recognized by Lighthouse. So once you push your changes to GitHub, Lighthouse goes over the keywords and updated the ticket. The only downfall with this is that you cannot add a message to the ticket, instead Lighthouse adds your commit message. So you have to make sure the commit message is clear and contains enough information.
Steps for linking Lighthouse and GitHub
- Create an API token in Lighthouse
- Add the API token to GitHub
- Learn the commit message keywords
#1 Create an API token in Lighthouse
In order to create an API token in Lighthouse you have to go to the ‘My Profile’ section. The easiest way to do this is to click on you username in the top right hand corner:
This will bring you to your profile. Now on the right hand side you will see a ‘Create an API token’ section with a drop-down list of all the projects that you are a member of:
Simply select ‘processing-js’ from the drop-down menu. Lighthouse will then provide more options: label, access, and project. Fill in anything you want for the label. The access must be full access. Finally select the project and press create.
Lighthouse will generate a Token and display it on the screen. In a newly created ‘Your API Tokens’ section. Copy the token, you will need to put it into GitHub.
#2 Add the API token to GitHub
Log into your GitHub account select your project repository and go into the admin section by pressing the ‘Admin’ button. In the admin section you will find a ‘Service Hooks’ button. Select it:
This will display all of the services that GitHub provides. Select Lighthouse from the list of Hooks, and fill out the form that appears on the right. Notice, GitHub provides instructions on how to do this below the form. However, for our processing project the subdomain is processing-js, the project id is 41284, the token is the token you copied from LightHouse. Ensure you set the ‘Active’ checkmark, and press Update Settings.
#3 Learn the commit message keywords
Lighthouse has many keywords that enable you to change who’s responsible, the milestone and the state of the ticket. Here is a list of keywords. Here is a screenshot of a ticket that has been automatically updated by LightHouse:
If you are having trouble understanding my post please read: Setting Up Communication between GitHub Repositories and Lighthouse Projects via a Secure Token