GitHub

You can integrate HacknPlan with GitHub to link commits to work items automatically and display them on the editor. This is very useful for tracking purposes since it allows you to easily find the list of changes done for a specific item, and also keeps you notified when it happens.

Note: GitHub integration is available for Personal Plus and Studio users only.

The first step is linking your HacknPlan and GitHub accounts (unless you are already logged in with GitHub, then you can skip this step). Bear in mind you need to have administrative rights on both sides (the HacknPlan project and the GitHub repository you want to integrate). Go to your user settings page (clicking on your avatar at the top-right corner of the application -> Settings) and then select Integrations from the left menu. There you can see a list of your current 3rd party integrations. Click on the plus button and then select GitHub. This should redirect you to GitHub to approve the request for authentication from HacknPlan.

Once the accounts are linked, you need to use those credentials to establish a connection between one of the HacknPlan projects you manage and a repository. Go to your project administration page (click on the project icon on the left menu and select the Admin tab) and then click on the Integrations sub-tab.  Click on the Connect repository button under the GitHub panel, which will open a popup dialog. Here you can select the GitHub account you previously linked (you can have more than one GitHub account linked to a single HacknPlan account). Then you can select a repository which will be populated with the list of your available repositories. Click on Connect and… voila!, your project and your GitHub repo are now linked.

So, how can I link a commit to a HacknPlan item now? Easy, you just have to reference the HacknPlan’s work item ID from the commit message using the hnp- prefix, something like hnp-10 or hnp-223 (this prefix can be modified in the integration settings). When the commit is pushed, the information will be sent to HacknPlan and the message will be analyzed to find tasks inside, and if one or more are found, the commit will be linked to them and shown under the Source Code tab of the work item editor, including a link to the commit details in GitHub. This event will also appear on the activity log, and a notification will be sent to the involved users if configured properly.

You can disconnect a repository from a project at any moment by clicking on the Disconnect button on the integration page. This will prevent any more commits to be tracked, but the existing ones will be kept for historical/logging reasons.