Skip to content

Commit 93e4f52

Browse files
authoredNov 16, 2020
Update jira sync github action (#411)
1 parent ee4e532 commit 93e4f52

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed
 

‎.github/workflows/jira.yaml

+7-8
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ on:
55
types: [opened, closed, reopened]
66
issue_comment: # Also triggers when commenting on a PR from the conversation view
77
types: [created]
8-
workflow_dispatch:
98

109
name: Jira Sync
1110

@@ -36,9 +35,9 @@ jobs:
3635
JIRA_USER_EMAIL: ${{ secrets.JIRA_SYNC_USER_EMAIL }}
3736
JIRA_API_TOKEN: ${{ secrets.JIRA_SYNC_API_TOKEN }}
3837

39-
- name: Set ticket type
40-
if: github.event.action == 'opened' && !steps.vault-team-role.outputs.role
41-
id: set-ticket-type
38+
- name: Preprocess
39+
if: github.event.action == 'opened' || github.event.action == 'created'
40+
id: preprocess
4241
run: |
4342
if [[ "${{ github.event_name }}" == "pull_request_target" ]]; then
4443
echo "::set-output name=type::PR"
@@ -48,15 +47,15 @@ jobs:
4847
4948
- name: Create ticket
5049
if: github.event.action == 'opened' && !steps.vault-team-role.outputs.role
51-
uses: tomhjp/gh-action-jira-create@v0.1.3
50+
uses: tomhjp/gh-action-jira-create@v0.2.0
5251
with:
5352
project: VAULT
5453
issuetype: "GH Issue"
55-
summary: "${{ github.event.repository.name }} [${{ steps.set-ticket-type.outputs.type }} #${{ github.event.issue.number || github.event.pull_request.number }}]: ${{ github.event.issue.title || github.event.pull_request.title }}"
54+
summary: "${{ github.event.repository.name }} [${{ steps.preprocess.outputs.type }} #${{ github.event.issue.number || github.event.pull_request.number }}]: ${{ github.event.issue.title || github.event.pull_request.title }}"
5655
description: "${{ github.event.issue.body || github.event.pull_request.body }}\n\n_Created from GitHub Action for ${{ github.event.issue.html_url || github.event.pull_request.html_url }} from ${{ github.actor }}_"
5756
# customfield_10089 is Issue Link custom field
5857
# customfield_10091 is team custom field
59-
extraFields: '{"fixVersions": [{"name": "TBD"}], "customfield_10091": ["ecosystem"], "customfield_10089": "${{ github.event.issue.html_url || github.event.pull_request.html_url }}"}'
58+
extraFields: '{"fixVersions": [{"name": "TBD"}], "customfield_10091": ["ecosystem", "runtime"], "customfield_10089": "${{ github.event.issue.html_url || github.event.pull_request.html_url }}"}'
6059

6160
- name: Search
6261
if: github.event.action != 'opened'
@@ -68,7 +67,7 @@ jobs:
6867

6968
- name: Sync comment
7069
if: github.event.action == 'created' && steps.search.outputs.issue
71-
uses: tomhjp/gh-action-jira-comment@v0.1.0
70+
uses: tomhjp/gh-action-jira-comment@v0.2.0
7271
with:
7372
issue: ${{ steps.search.outputs.issue }}
7473
comment: "${{ github.actor }} ${{ github.event.review.state || 'commented' }}:\n\n${{ github.event.comment.body || github.event.review.body }}\n\n${{ github.event.comment.html_url || github.event.review.html_url }}"

0 commit comments

Comments
 (0)
Please sign in to comment.