Skip to content

Commit 8f1f2b8

Browse files
committed
Add gh to jira action.
Signed-off-by: Humair Khan <[email protected]>
1 parent ddb30e9 commit 8f1f2b8

File tree

1 file changed

+77
-0
lines changed

1 file changed

+77
-0
lines changed

.github/workflows/gh-to-jira.yaml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: Create Jira Issue from GH Release
2+
run-name: GH Release to Jira.
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
component:
7+
default: 'Data Science Pipelines'
8+
description: 'ODH Component'
9+
required: true
10+
target_release:
11+
description: 'Target Downstream Release'
12+
required: true
13+
gh_org:
14+
default: 'opendatahub-io'
15+
description: 'Upstream GH Org'
16+
required: true
17+
repos:
18+
default: |
19+
[{"repo_name":"data-science-pipelines","target_release":"UPDATE","previous_release":"UPDATE"},{"repo_name":"data-science-pipelines-operator","target_release":"UPDATE","previous_release":"UPDATE"}]
20+
description: 'Upstream Source Repos & Tags'
21+
required: true
22+
labels:
23+
default: 'qe/verify'
24+
required: true
25+
description: ""
26+
jira_server:
27+
default: 'https://issues.redhat.com'
28+
required: true
29+
description: "Jira Server"
30+
jira_project:
31+
default: "RHODS"
32+
required: true
33+
description: "Jira Project"
34+
jira_labels:
35+
default: "MLOps"
36+
required: true
37+
description: "Jira Labels to Add"
38+
jira_issue_type:
39+
default: "Story"
40+
required: true
41+
description: "Jira Issue Type"
42+
jira_priority:
43+
default: 'Normal'
44+
required: true
45+
description: "Jira Priority to Set"
46+
47+
jobs:
48+
gh-to-jira:
49+
runs-on: ubuntu-latest
50+
steps:
51+
- name: Git checkout
52+
uses: actions/checkout@v3
53+
with:
54+
repository: HumairAK/gh-to-jira
55+
fetch-depth: '0'
56+
- name: Set up Python 3.10
57+
uses: actions/setup-python@v1
58+
with:
59+
python-version: '3.10'
60+
- name: Install dependencies
61+
run: |
62+
pip install -r requirements.txt
63+
- name: Submit Jira
64+
env:
65+
GITHUB_TOKEN: ${{ secrets.GTJ_GH_TOKEN }}
66+
JIRA_TOKEN: ${{ secrets.GTJ_JIRA_TOKEN }}
67+
REPOS: ${{ inputs.repos }}
68+
run: |
69+
python src --component="${{ inputs.component }}" \
70+
--target_release="${{ inputs.target_release }}" \
71+
--org="${{ inputs.gh_org }}" \
72+
--labels="${{ inputs.labels }}" \
73+
--jira_server="${{ inputs.jira_server }}" \
74+
--jira_project="${{ inputs.jira_project }}" \
75+
--jira_labels="${{ inputs.jira_labels }}" \
76+
--jira_issue_type="${{ inputs.jira_issue_type }}" \
77+
--jira_priority="${{ inputs.jira_priority }}"

0 commit comments

Comments
 (0)