5
5
types : [opened, closed, reopened]
6
6
issue_comment : # Also triggers when commenting on a PR from the conversation view
7
7
types : [created]
8
- workflow_dispatch :
9
8
10
9
name : Jira Sync
11
10
36
35
JIRA_USER_EMAIL : ${{ secrets.JIRA_SYNC_USER_EMAIL }}
37
36
JIRA_API_TOKEN : ${{ secrets.JIRA_SYNC_API_TOKEN }}
38
37
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
42
41
run : |
43
42
if [[ "${{ github.event_name }}" == "pull_request_target" ]]; then
44
43
echo "::set-output name=type::PR"
@@ -48,15 +47,15 @@ jobs:
48
47
49
48
- name : Create ticket
50
49
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
52
51
with :
53
52
project : VAULT
54
53
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 }}"
56
55
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 }}_"
57
56
# customfield_10089 is Issue Link custom field
58
57
# 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 }}"}'
60
59
61
60
- name : Search
62
61
if : github.event.action != 'opened'
68
67
69
68
- name : Sync comment
70
69
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
72
71
with :
73
72
issue : ${{ steps.search.outputs.issue }}
74
73
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