Update pre-rejected.yml #6
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: Move related JIRA tasks status from CODE REVIEW to IN PROGRESS | |
on: | |
# pull_request_review: | |
# types: [submitted] | |
jobs: | |
update-jira: | |
if: github.event.review.state == 'changes_requested' || github.event.review.state == 'dismissed' | |
runs-on: ubuntu-latest | |
steps: | |
#- name: Move related JIRA tasks status from CODE REVIEW to IN PROGRESS | |
# run: | | |
# temp=$(echo "${{ github.event.pull_request.title }}" | grep -o '\[[^]]*\]' | sed 's/\[//;s/\]//' | tr -d ' ') | |
# IFS=$',' read -ra keys <<< "$temp" | |
# for key in "${keys[@]}"; do | |
# echo "Move $key to IN PROGRESS." | |
# curl -u ${{ secrets.JIRA_USER_EMAIL }}:${{ secrets.JIRA_API_TOKEN }} -X POST --data '{"transition":{"id":"21"}}' -H "Content-Type: application/json" ${{ secrets.JIRA_BASE_URL }}/rest/api/3/issue/$key/transitions | |
# done |