Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create close-jira-ticket.yml #183

Merged
merged 1 commit into from
Apr 21, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/close-jira-ticket.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Complete JIRA ticket to DONE

on:
issues:
types: [closed, deleted]

jobs:
set_done_for_closed_issued:
name: Move JIRA ticket to DONE
runs-on: ubuntu-latest
steps:
- name: Login
uses: atlassian/gajira-login@master
env:
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}

- name: Find comment with ticket number
uses: peter-evans/find-comment@v1
id: botComment
with:
issue-number: ${{ github.event.issue.number }}
body-includes: Internal ticket number is DRV-

- name: Parse ticket number
id: ticketNumber
uses: atlassian/gajira-find-issue-key@master
with:
string: ${{ steps.botComment.outputs.comment-body }}

- name: Close ticket
uses: atlassian/gajira-transition@master
with:
issue: ${{ steps.ticketNumber.outputs.issue }}
transition: "DONE"