Skip to content

Commit

Permalink
security
Browse files Browse the repository at this point in the history
Signed-off-by: Oliver Koenig <okoenig@nvidia.com>
  • Loading branch information
ko3n1g committed May 31, 2024
1 parent 87e1d60 commit ede503b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/_watchdog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ jobs:
github.event_name == 'issue_comment' &&
github.event.issue.pull_request &&
startsWith(github.event.comment.body, '/ci') &&
contains('ko3n1g,nouiz,joker-eph,yhtang,terrykong,hemildesai,chaserileyroberts,CliveUnger,DwarKapex,mingxu1067,kocchop,SahilJain314,ashors1,maanug-nv,hmonishN,gspschmid', format('{0},', github.actor))
contains(fromJSON('["ko3n1g","nouiz","joker-eph","yhtang","terrykong","hemildesai","chaserileyroberts","CliveUnger","DwarKapex","mingxu1067","kocchop","SahilJain314","ashors1","maanug-nv","hmonishN","gspschmid"]'), github.actor)
outputs:
test_subset: ${{ steps.state.outputs.test_subset }}
env:
message: ${{ github.event.comment.body }}
steps:
- name: Check out the repository under ${GITHUB_WORKSPACE}
uses: actions/checkout@v4
Expand All @@ -22,7 +24,7 @@ jobs:
shell: bash
id: state
run: |
test_subsets=$(echo "${{ github.event.comment.body }}" | awk '{$1=$1;print}' | cut -d' ' -f2-)
test_subsets=$(echo "$message" | awk '{$1=$1;print}' | cut -d' ' -f2-)
IFS=' ' read -a test_subsets <<< "$test_subsets"
valid_test_subsets=$(yq '.on.workflow_dispatch.inputs.TEST_SUBSET.options | join(",")' .github/workflows/ci.yaml)
Expand All @@ -45,7 +47,7 @@ jobs:
shell: bash
if: always()
run: |
message="${{ github.event.comment.body}}<woof>
message="$message<woof>
---
Expand Down Expand Up @@ -117,7 +119,7 @@ jobs:
echo "${{ steps.message.outputs.message }}" >> $GITHUB_STEP_SUMMARY
# Fetch original commit issue message
message="${{ github.event.comment.body}}"
message="$message"
# Remove previous woof-response
message=$(awk -F '<woof>' '{print $1}' <<< "$message")
Expand Down

0 comments on commit ede503b

Please sign in to comment.