Transition Jira Issue to In Progress #111
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Transition Jira Issue to In Progress | |
on: | |
create: | |
branches: | |
- '*' | |
jobs: | |
transition-issue: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Extract issue key | |
id: extract-key | |
run: echo "::set-output name=issue_key::$(echo ${{ github.ref }} | grep -oE '([A-Z]+-\d+)')" | |
- name: Transition Jira issue to In Progress | |
if: steps.extract-key.outputs.issue_key | |
run: | | |
curl -X POST -u ${{ secrets.JIRA_USERNAME }}:${{ secrets.JIRA_API_TOKEN }} \ | |
-H "Content-Type: application/json" \ | |
--data '{"transition": {"id": "11"}}' \ | |
https://<your-jira-domain>.atlassian.net/rest/api/2/issue/${{ steps.extract-key.outputs.issue_key }}/transitions | |
env: | |
JIRA_USERNAME: ${{ secrets.JIRA_USERNAME }} | |
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }} |