Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Snyk integration #22

Open
wants to merge 39 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
3a1f50e
Use PR title rather than labels for checking if the PR was created by…
BenMillar-MOJ Aug 14, 2024
c0a6d24
Improved repo_name formatting
BenMillar-MOJ Aug 14, 2024
8f5c44d
Fix typo
BenMillar-MOJ Aug 14, 2024
6d567ce
Add apostrophes around the stripped_body env variable.
BenMillar-MOJ Aug 14, 2024
b7b0549
Start on reopened PR
BenMillar-MOJ Aug 14, 2024
9da4250
Changed apostrophe order
BenMillar-MOJ Aug 14, 2024
09773b6
Remove echo
BenMillar-MOJ Aug 14, 2024
258b7d5
Change functionality
TawneeOwl Aug 14, 2024
20f5946
Change to python
TawneeOwl Aug 14, 2024
751f2e3
Add in bracket
TawneeOwl Aug 14, 2024
24c9974
Move pr_body
TawneeOwl Aug 14, 2024
d9da23f
Move pr body
TawneeOwl Aug 14, 2024
29fd23f
Sanitize input
TawneeOwl Aug 14, 2024
a88213b
Add in bracket
TawneeOwl Aug 14, 2024
1adadd3
Remove echo
TawneeOwl Aug 14, 2024
ab1d634
Clean body via txt
TawneeOwl Aug 14, 2024
cd00906
Change body format
TawneeOwl Aug 14, 2024
f194bc3
Remove PR clean
TawneeOwl Aug 14, 2024
c5e7ff8
Fix formatting
TawneeOwl Aug 14, 2024
fff3b3c
Try with base name
TawneeOwl Aug 14, 2024
965abf2
Remove echo
TawneeOwl Aug 15, 2024
e5d51d1
Add to string
TawneeOwl Aug 15, 2024
cbf4252
Add in set output
TawneeOwl Aug 15, 2024
591ddc8
Change layout of output
TawneeOwl Aug 15, 2024
c20592f
Try set output
TawneeOwl Aug 15, 2024
de45b4e
Merge to new version of github output
TawneeOwl Aug 15, 2024
61fa486
Further change to outputs
TawneeOwl Aug 15, 2024
4d40d92
WIP update
TawneeOwl Aug 15, 2024
faa08e8
Add in debug
TawneeOwl Aug 15, 2024
6fbc157
remove quotes from pr
TawneeOwl Aug 15, 2024
99ad183
remove quotes
TawneeOwl Aug 15, 2024
7e42823
Add in EOF
TawneeOwl Aug 15, 2024
4460720
Change pr body to txt
TawneeOwl Aug 15, 2024
7ee2446
Change to env again
TawneeOwl Aug 15, 2024
2669434
WIP 2
TawneeOwl Aug 15, 2024
de6fe1d
WIP 3 to json
TawneeOwl Aug 15, 2024
d47b1d2
Change to txt
TawneeOwl Aug 15, 2024
14714df
Dont remove spaces
TawneeOwl Aug 15, 2024
fd87ea2
Revert to json
TawneeOwl Aug 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/gajira.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ name: Raise Jira Issue

on:
pull_request:
types: [opened]
types: [opened, reopened]

jobs:
gajira:
name: Raise Jira Issue
runs-on: ubuntu-latest
if: ${{ contains(github.event.pull_request.labels, 'snyk') }}
if: ${{ contains(github.event.pull_request.title, 'snyk') }}
steps:
- name: Login
uses: atlassian/gajira-login@master
Expand All @@ -20,10 +20,10 @@ jobs:
- name: Process PR data
id: process_pr_data
run: |
repo_name=$(echo "$GITHUB_REPOSITORY" | cut -d'/' -f2 | sed 's/ *(.*)//')
repo_name=$(basename ${{ github.repository }})

pr_body="${{ github.event.pull_request.body }}"
stripped_body=$(echo "$pr_body" | sed 's/<[^>]*>//g')
pr_body=$(jq -r '.pull_request.body' <<< '${{ toJson(github.event) }}')
stripped_body=$(echo "$pr_body" | sed 's/<[^>]*>//g' | tr '\n' ' ' | tr -s ' ')

echo "repo_name=$repo_name" >> $GITHUB_ENV
echo "stripped_body=$stripped_body" >> $GITHUB_ENV
Expand Down
Loading