Skip to content

Commit

Permalink
Merge pull request #102 from morgansnyk/testaction
Browse files Browse the repository at this point in the history
joe's version
  • Loading branch information
morgansnyk authored Jul 18, 2023
2 parents 68cd823 + 44ff171 commit 6bc4545
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/SnykNotificationTeam.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: "Snyk Noti Test"

on:
pull_request:
push:
branches:
# Update to master branch
- master

jobs:
prCheck:
# Confirm PR Check status
runs-on: ubuntu-latest
outputs:
output1: ${{ steps.step1.outputs.status }}

steps:
# Checks the status of Snyk PR Checks
- name: 'Wait for status checks'
id: waitforstatuschecks
uses: "WyriHaximus/github-action-wait-for-status@v2"
with:
ignoreActions: ## Note that these names are the human readable names use as status on commits, and show up as status checks on PRs.
checkInterval: 13
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

- name: 'Set Failed status'
id: step1
if: steps.waitforstatuschecks.outputs.status == 'failed'
run: echo "status=failed" >> "$GITHUB_OUTPUT"

prReviewer:
# Add AppSec Reviewer if PR check failed
needs: prCheck
if: needs.prCheck.outputs.output1 == 'failed'
runs-on: ubuntu-latest

steps:
- name: Add Reviewers
uses: madrapps/add-reviewers@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
reviewers: john,kramer,seinfeld
re-request-when-approved: true
re-request-when-changes-requested: true

0 comments on commit 6bc4545

Please sign in to comment.