-
Notifications
You must be signed in to change notification settings - Fork 38
69 lines (64 loc) · 2.18 KB
/
jira-issue-create-template.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
# Template for jira issue creation in order to creates jira tickets for new github issues to help triage
# Notice that the change of this temple might effect jira issue creation for other repositories
name: Jira Issue Creator
on:
workflow_call:
inputs:
label:
description: 'Label for Repository'
type: string
required: true
subcomponent:
description: 'The Subcomponent for the Repository'
type: string
required: true
secrets:
JIRA_BASE_URL:
description: 'Jira Base Url'
required: true
JIRA_USER_EMAIL:
description: 'Jira User Email'
required: true
JIRA_API_TOKEN:
description: 'Jira Token'
required: true
JIRA_PROJECT:
description: 'Jira Project'
required: true
jobs:
build:
runs-on: ubuntu-20.04
environment: Jira
name: SDK Bot Jira Issue Creation
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: Convert Label String
id: string
uses: ASzc/change-string-case-action@v1
with:
string: ${{ inputs.label }}
- name: Create issue
id: create
uses: atlassian/gajira-create@master
with:
project: ${{ secrets.JIRA_PROJECT }}
issuetype: Task
summary: |
[SDK - ${{ inputs.label }}] ${{ github.event.issue.title }}
description: |
${{ github.event.issue.html_url }}
fields: '{
"customfield_11416": {"value": "GitHub"},
"components": [{"name": "SDK"}],
"customfield_12028": ["${{ inputs.subcomponent }}"],
"labels": ["${{ steps.string.outputs.lowercase }}"],
"customfield_11481": {"value": "Governance"},
"customfield_11200": {"value": "Developer Experience"}
}' # Source, Component, Subcomponents, Labels, Pillar, Pod
- name: Log created issue
run: echo "Issue AMP-${{ steps.create.outputs.issue }} was created"