Skip to content

osowskit/atlassian-github-app-addon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Create GitHub Branches from Jira

Usage

This Atlassian Marketplace add-on provides the convenience of creating branches in GitHub from a JIRA ticket. Create and view GitHub branches directly from a JIRA issue.

Screen Shot 2023-05-15 at 8 15 56 PM
  • Simply add the GitHub App to your account : https://github.com/apps/jira-bot and select which repositories you want to create branches in

  • Navigate to any ticket on your JIRA instance an click the Connect to GitHub link

  • Create and view branches in a JIRA ticket.

  • View any Pull Request for the branch

Custom Branch Names

The default branch pattern will use the issue key as the branch name and create this off of the main default branch. It is possible to set a GitFlow branching pattern and also use a custom branch name as outlined below.

Custom Branch Name

Users can choose to manually enter the branch name by using a per Repository config file. This allows the user to add custom text as the branch name and be created off of the main default branch, e.g. SENG-1234/my-great-feature. Set this for each repository using this pattern:

  1. Add the following file .github/jira-bot.yaml to the main default branch
  2. Set the file contents to be branch_pattern: 2
  3. In Jira, with the plugin loaded, remove and re-add each repository that has been updated. (The branch pattern is cached and needs to be refreshed).
Screen Shot 2023-05-15 at 8 24 49 PM

GitFlow

Users can select the GitFlow branching pattern in the config file that will create a feature branch off of the develop branch, e.g. feature/SENG-1234. For each repository, use this pattern:

  1. Add the following file .github/jira-bot.yaml to the Repository's default branch
  2. Set the file contents to be branch_pattern: 1
  3. In Jira with the plugin loaded, remove and re-add each repository that has been updated. (The branch pattern is cached and needs to be refreshed).

GitFlow + Custom Branch Name (deprecated)

Users can select the GitFlow branching pattern in the config file that will create a feature branch off of the develop branch, e.g. feature/SENG-1234. This option allows users to also set the branch name via the UI. This setting is deprecated and users should set branch_pattern: 3 and default_base_branch_name: 'develop' going forward.

For each repository, use this pattern:

  1. Add the following file .github/jira-bot.yaml to the Repository's default branch
  2. Set the file contents to be branch_pattern: 3
  3. In Jira with the plugin loaded, remove and re-add each repository that has been updated. (The branch pattern is cached and needs to be refreshed).

Custom Base Branch

Teams that have branching patterns that are created off a branch that isn't the Repository's default branch. The following configuration allows users to set the base branch where new branches are created from.

For each repository, use this pattern:

  1. Add the following file .github/jira-bot.yaml to the Repository's default branch
  2. Set the file contents to be default_base_branch_name: 'dev'
  3. In Jira with the plugin loaded, remove and re-add each repository that has been updated. (The branch pattern is cached and needs to be refreshed).

Here is the approved branch name list. Please open an issue to request a new branch

['master', 'main', 'development', 'dev', 'feature', 'hotfix', 'release', 'test', 'testing']

Example yaml file