Skip to content

Commit

Permalink
Merge pull request #227 from sergenyalcin/update-comment-trigger
Browse files Browse the repository at this point in the history
Prevent external contributors from triggering workflows via PR comments
  • Loading branch information
sergenyalcin authored Feb 27, 2025
2 parents 22db921 + 5a27ec3 commit 3c7f19d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pr-comment-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
echo "github.event.comment.author_association: ${{ github.event.comment.author_association }}"
get-example-list:
if: ${{ (github.event.comment.author_association == 'OWNER' || github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'COLLABORATOR' || github.event.comment.author_association == 'CONTRIBUTOR' ) &&
if: ${{ (github.event.comment.author_association == 'OWNER' || github.event.comment.author_association == 'MEMBER') &&
github.event.issue.pull_request &&
contains(github.event.comment.body, inputs.trigger-keyword ) }}
runs-on: ${{ inputs.runs-on }}
Expand Down Expand Up @@ -112,7 +112,7 @@ jobs:
-f context="Uptest-${{ steps.get-example-list-name.outputs.example-hash }}"
uptest:
if: ${{ (github.event.comment.author_association == 'OWNER' || github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'COLLABORATOR' || github.event.comment.author_association == 'CONTRIBUTOR' ) &&
if: ${{ (github.event.comment.author_association == 'OWNER' || github.event.comment.author_association == 'MEMBER') &&
github.event.issue.pull_request &&
contains(github.event.comment.body, inputs.trigger-keyword ) }}
runs-on: ${{ inputs.runs-on }}
Expand Down

0 comments on commit 3c7f19d

Please sign in to comment.