GitHub app that creates a branch in GitHub when a GitHub issue is assigned.
- An issue is created, for example: Issue 15: Fix nasty bug!
some time may pass
- The issue is assigned
- When the issue is assigned this app will create a new issue branch
(for the example issue this branch will be called
issue-15-fix-nasty-bug
)
Branch names are generated from the issue, there are 4 options.
-
tiny
=> issue number, for example:15
-
short
=> thebranchName
prefix followed by the issue number, for example:branchPrefix = 'issue' issueNumber = 15
becomes
issue-15
-
long
=> thebranchName
prefix followed by the issue number followed by the issue title shortened to number of words defined by the configuration file, for example:issueTitleWordCount = 4 issueTitle = 'This is a very long long title'
becomes
issue-15-this-is-a-very
-
full
=> the word issue followed by the issue number followed by the issue title, for example:issue-15-this-is-a very-long-long-title
The default is
long
, other types can be configured in the YAML like this:branchName: tiny
The character used to replace spaces in the issue title.
replacementCharacter = 'underscore'
issueTitle = 'This is a very long long title'
becomes
issue-15-this_is_a_very
The default is hyphen
, other type is underscore
can be configured in the YAML like this:
replacementCharacter: underscore
The number of words from the issue title to use when branchName
is set to long
.
The default is 5
, the other option is to set a number as demonstrated below.
branchName: long
titleWordCount: 2
The text to place before issue number
branchPrefix = 'issue'
issueNumber = 20
issueTitle = 'my issue title'
becomes
issue-20-my-issue-title
The default is empty, the other option is to set words as demonstrated below.
branchPrefix: issue
If you have suggestions for how issue-to-branch could be improved, or want to report a bug, open an issue! We'd love all and any contributions.
For more, check out the Contributing Guide.
# Install dependencies
yarn install
# Run the bot
yarn start
ISC © 2020 Rebecca Vest olserebe@hotmail.com