From 3a1be087e0980335ac6d7c997f1a0b4f060bf47e Mon Sep 17 00:00:00 2001 From: Noa Date: Thu, 26 Oct 2023 12:33:34 -0500 Subject: [PATCH] Fix benchmarks please contributor check (#479) --- .github/workflows/benchmarks.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index 3c58973e0d..05fef856a3 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -31,9 +31,11 @@ jobs: run: echo "1" | sudo tee /sys/devices/system/cpu/cpufreq/boost - name: Check membership - if: ${{ env.PR_NUMBER }} + if: ${{ github.event_name == 'issue_comment' }} + env: + COMMENT_AUTHOR: ${{ github.event.comment.user.login }} run: | - if [[ $(gh api --paginate /orgs/{owner}/members --jq 'any(.login == env.GITHUB_ACTOR)') != true ]]; then + if [[ $(gh api --paginate /orgs/{owner}/members --jq 'any(.login == env.COMMENT_AUTHOR)') != true ]]; then gh pr comment $PR_NUMBER -b "Sorry, you don't have permission to run benchmarks." exit 1 fi