Updated script to create, update and close github issues

Signed-off-by: Harry Hogg <hhogg@spotify.com>
This commit is contained in:
Harry Hogg
2021-10-28 13:04:14 +01:00
parent bf76bb7a1d
commit 7205d37a14
4 changed files with 124 additions and 93 deletions
@@ -1,27 +0,0 @@
name: Create and Update Github Issues from Snyk report
on:
[push, pull_request]
# workflow_dispatch:
# pull_request:
# schedule:
# - cron: '0 */4 * * *' # every 4 hours
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run Snyk to check for vulnerabilities
uses: snyk/actions/node@master
continue-on-error:
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
args: --yarn-workspaces --strict-out-of-sync=false
json: true
- name: Run the Snyk Github Issue command
run: yarn ts-node scripts/snyk-github-issue-sync.ts
+5
View File
@@ -43,9 +43,14 @@ jobs:
--org=backstage-dgh
--strict-out-of-sync=false
--sarif-file-output=snyk.sarif
--json-file-output=snyk.json
json: true
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
- name: Upload Snyk report
uses: github/codeql-action/upload-sarif@v1
with:
sarif_file: snyk.sarif
- name: Update Github issues
run: yarn ts-node scripts/snyk-github-issue-sync.ts