GitHub

Using the Clubhouse GitHub Integration with Branches and Pull Requests

The Clubhouse GitHub integration offers several ways to associate Clubhouse Stories with GitHub feature branches or commits, as well as automated ways to change the workflow state of a Story as your work progresses. 

Working with Feature Branches

A Story is often analogous to the amount of work in a feature branch. To create a new feature branch, click the Story you want to work with, and then click the "Git Helpers" icon located in between the Story ID number and Settings ellipsis icon.

 Screenshot_2018-04-24_22.06.23.png

Then copy the suggested branch name to create and checkout a new branch for your story. Whenever you push a branch, it will be automatically linked to the story.

Associating Branches without Clubhouse Git Helpers

If you don't use our naming convention to create your branch, you can also associate a branch by including the URL https://app.clubhouse.io/{org}/story/{story-id} or this bracketed text anywhere within a commit message: [branch ch###] where "###" is the Story ID. The keyword "branch" will associate the Story to the feature branch.

This example associates story id 1234:

Clubhouse Git Commit Example

The system also supports sets of URLS, bracketed Story numbers, or a mix of the two.

Clubhouse Git Commit

After the association, Clubhouse will add you as Owner, move the Story to a "Started" workflow state if it’s not there already, and add branch details to the Story dialog. Click here to learn more about Workflow States in Clubhouse.

Clicking on the ellipsis icon in the linked Pull Request information area will give you more information on branch activity.

Screenshot_2018-04-24_22.26.28.png

The branch details include a link to GitHub and a dialog with a history of commit pushes, pull request events, and merges.  


Associating Multiple Stories with a Single Pull Request 

Branches can be associated with multiple stories using pull request messages. Just add the Story numbers to the message with the prefix `ch` in brackets.
Pull Request Comment Github Clubhouse
While multiple Stories can be associated with a single branch, pushing to a branch with a different Story number will not disassociate it from any Story it was previously associated with. See the section below on disassociating pull requests from Stories. 

Changing your Workflow State Using GitHub Event Handlers

Enabling Github Event Handlers in Clubhouse

You can use Clubhouse GitHub Event Handlers to allow GitHub events to trigger workflow state changes.

Opening a Pull Request from within Clubhouse

When a Story has a linked branch, you can open a new Pull Request from the Clubhouse UI by clicking the "Open PR" button next to the branch name. This will pre-fill the Story name in the PR name and the Story URL in the PR description.

Screenshot_2018-04-24_22.37.20.png

Working with Pull Requests

When a Pull Request is opened on an already linked feature branch it will be indicated in the Stories associated with that feature branch.

Screenshot_2018-04-24_22.21.37.png

It is also possible to associate a Story to a feature branch upon creation of a pull request or after a Pull Request has been opened.  

Add the bracketed text [ch###] where ### is the Story number, or the Story URL https://app.clubhouse.io/{org}/story/{story-id} to a new Pull Request comment in GitHub:

Pull Request Comment in Clubhouse

Please note this bracketed text or Story URL must be added as a comment on the Pull Request. Adding the Story reference to the Pull Request description is not supported.

The system supports sets of bracketed Story numbers on a Pull Request, but the Story URL needs to be the only text in the PR comment in order to be picked up.

Pull Request Comment Github Clubhouse

Linking GitHub pull request to Clubhouse Stories 

Disassociating Pull Requests from a Clubhouse Story

Pull Requests can be removed from Clubhouse Stories by clicking on the ellipsis icon next to the pull request within the Story and clicking "Dissociate Pull Request from Story".

Pull Requests can be re-associated with Clubhouse Stories by clicking the "Restore" button next to the pull request in the Story's Activity section:

Restore Pull Request Clubhouse

Moving Stories Back

The Clubhouse GitHub integration is designed to move your Stories forward, from unstarted to completed. As such, if you find you need to move a Story back to an earlier workflow state, you can do so in the Clubhouse UI.

Have more questions? Submit a request

0 Comments

Article is closed for comments.
Powered by Zendesk