Skip to content

Fix Snyk integration #54

Fix Snyk integration

Fix Snyk integration #54

Workflow file for this run

name: Raise Jira Issue
on:
pull_request:
types: [opened, reopened]
jobs:
gajira:
name: Raise Jira Issue
runs-on: ubuntu-latest
if: ${{ contains(github.event.pull_request.title, 'snyk') }}
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: Process PR data
id: process_pr_data
run: |
repo_name=$(basename ${{ github.repository }})
echo "${{ github.event.pull_request.body }}" > pr_body.txt
stripped_body=$(sed 's/<[^>]*>//g' pr_body.txt | tr -d '\r' | tr '\n' ' ' | tr -s ' ')
echo "repo_name=$repo_name" >> $GITHUB_ENV
echo "stripped_body=$stripped_body" >> $GITHUB_ENV
- name: Create
id: create
uses: atlassian/gajira-create@master
with:
project: LGA
issuetype: Task
summary: "[Snyk] - ${{ env.repo_name }} - ${{ github.event.pull_request.title }}"
description: ${{ env.stripped_body }}