Extract issue key from string
For examples on how to use this, check out the gajira-demo repository
Note: this action requires Jira Login Action
To find an issue key inside commit messages:
action "Find in commit messages" {
uses = "atlassian/gajira-find-issue-key@master"
needs = ["Login"]
args = "--from=commits"
}
Also you can use lodash templates to retrieve fields from GitHub Event which triggered workflow, like: {{event.ref}}
Here is an example:
action "Find in branch name" {
uses = "atlassian/gajira-find-issue-key@master"
needs = ["Login"]
args = "{{event.ref}}"
}
which is the same as --from=branch
Or more complex one:
action "Find in commit messages" {
uses = "atlassian/gajira-find-issue-key@master"
needs = ["Login"]
args = "{{event.commits.map(c=>c.message).join(' ')}}"
}
which is the same as --from=commits
- None
--from=commits
- Detect issue key in commit messages from event--from=branch
- Detect issue key in branch name
- None
issue
- a key of a found issue
issue
- a key of a found issue