-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2732da7
commit e733acd
Showing
3 changed files
with
104 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Set JIRA ticket to DONE | ||
|
||
on: | ||
issues: | ||
types: [closed, deleted] | ||
|
||
jobs: | ||
set_done_for_closed_issued: | ||
name: Set 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: comment | ||
with: | ||
issue-number: ${{ github.event.issue.number }} | ||
body-includes: Internal ticket number is FE- | ||
|
||
- name: Get ticket number | ||
id: ticket | ||
uses: atlassian/gajira-find-issue-key@master | ||
with: | ||
string: ${{ steps.comment.outputs.comment-body }} | ||
|
||
- name: Close | ||
uses: atlassian/gajira-transition@master | ||
with: | ||
issue: ${{ steps.ticket.outputs.issue }} | ||
transition: 'DONE' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Create JIRA ticket for GH issue | ||
|
||
on: | ||
issues: | ||
types: [opened] | ||
|
||
jobs: | ||
create_ticket_from_issue: | ||
name: Create JIRA ticket | ||
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: Create | ||
id: create | ||
uses: atlassian/gajira-create@master | ||
with: | ||
project: FE | ||
issuetype: Bug | ||
summary: Issue ${{ github.event.issue.number }} ${{ github.event.issue.title }} | ||
description: ${{ github.event.issue.html_url }} | ||
fields: '{"labels": ["github", "issue", "dx-ops"], "components": [{ "name": "V10 JavaScript Driver" }]}' | ||
|
||
- name: Comment | ||
uses: peter-evans/create-or-update-comment@v1 | ||
with: | ||
issue-number: ${{ github.event.issue.number }} | ||
body: Internal ticket number is ${{ steps.create.outputs.issue }} | ||
|
||
- name: Complete | ||
if: ${{ steps.create.outputs.issue }} | ||
run: echo "Issue ${{ steps.create.outputs.issue }} was created" |
31 changes: 31 additions & 0 deletions
31
.github/workflows/create-jira-ticket-from-pull-request.yml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Create JIRA ticket for GH pull request | ||
|
||
on: | ||
pull_request: | ||
types: [opened] | ||
|
||
jobs: | ||
create_ticket_from_pr: | ||
name: Create JIRA ticket | ||
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: Create | ||
id: create | ||
uses: atlassian/gajira-create@master | ||
with: | ||
project: FE | ||
issuetype: Task | ||
summary: Pull Request ${{ github.event.pull_request.number }} ${{ github.event.pull_request.title }} | ||
description: ${{ github.event.pull_request.html_url }} | ||
fields: '{"labels": ["github", "pr", "dx-ops"], "components": [{ "name": "V10 JavaScript Driver" }]}' | ||
|
||
- name: Complete | ||
if: ${{ steps.create.outputs.issue }} | ||
run: echo "Issue ${{ steps.create.outputs.issue }} was created" |