forked from hazelcast/hazelcast
-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (80 loc) · 2.95 KB
/
jira.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: Create Issue in Jira when to-jira label added
on:
issues:
types: labeled
jobs:
createJiraIssue:
if: ${{ github.event.label.name == 'to-jira' }}
runs-on: ubuntu-latest
steps:
- name: Identify team name
id: get-team
uses: actions/github-script@v7
with:
result-encoding: string
script: |
const labels = ${{ toJson(github.event.issue.labels) }}
const teamLabel = labels.find(label => label.name.includes('Team: '))?.name || ""
const team = teamLabel.replace('Team: ','')
console.log("Team: " + team)
return team
- name: Identify issue type
id: get-issue-type
uses: actions/github-script@v7
with:
result-encoding: string
script: |
const labels = ${{ toJson(github.event.issue.labels) }}
const issueType = labels.some(label => label.name.includes('Test-Failure'))
? "Test Failure"
: "Bug"
console.log("Issue type: " + issueType)
return issueType
- name: Create jira issue
uses: hazelcast/github-jira-tool-action@v5
with:
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
TARGET_JIRA_PROJECT: HZ
ISSUE_TYPE: ${{ steps.get-issue-type.outputs.result }}
JIRA_LABEL: from-gh
TEAM_NAME: ${{ steps.get-team.outputs.result }}
createClientJiraIssue:
if: ${{ github.event.label.name == 'to-client-jira' }}
runs-on: ubuntu-latest
steps:
- name: Create jira issue
uses: hazelcast/github-jira-tool-action@v5
with:
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
TARGET_JIRA_PROJECT: API
JIRA_LABEL: Java
ISSUE_TYPE: Bug
createGuardiansJiraIssue:
if: ${{ github.event.label.name == 'to-hzg-jira' }}
runs-on: ubuntu-latest
steps:
- name: Identify issue type
id: get-issue-type
uses: actions/github-script@v7
with:
result-encoding: string
script: |
const labels = ${{ toJson(github.event.issue.labels) }}
const issueType = labels.some(label => label.name.includes('Test-Failure'))
? "Test Failure"
: "Bug"
console.log("Issue type: " + issueType)
return issueType
- name: Create jira issue
uses: hazelcast/github-jira-tool-action@v5
with:
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
TARGET_JIRA_PROJECT: HZG
ISSUE_TYPE: ${{ steps.get-issue-type.outputs.result }}
JIRA_LABEL: from-gh