-
Notifications
You must be signed in to change notification settings - Fork 3
33 lines (32 loc) · 1.2 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
name: Create JIRA ISSUE
on:
pull_request:
types: [opened]
jobs:
security-jira:
if: ${{ github.actor == 'dependabot[bot]' || github.actor == 'snyk-bot' || contains(github.event.pull_request.head.ref, 'snyk-fix-') || contains(github.event.pull_request.head.ref, 'snyk-upgrade-')}}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Login into JIRA
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: Create a JIRA Issue
id: create
uses: atlassian/gajira-create@master
with:
project: ${{ secrets.JIRA_PROJECT }}
issuetype: ${{ secrets.JIRA_ISSUE_TYPE }}
summary: |
${{ github.event.pull_request.title }}
description: |
PR: ${{ github.event.pull_request.html_url }}
fields: "${{ secrets.JIRA_FIELDS }}"
- name: Transition issue
uses: atlassian/gajira-transition@v3
with:
issue: ${{ steps.create.outputs.issue }}
transition: ${{ secrets.JIRA_TRANSITION }}