From e623242d3cf06dbe2fb547968d014b13e5443783 Mon Sep 17 00:00:00 2001 From: Tomasz Stefaniak Date: Tue, 12 Aug 2025 10:23:52 -0700 Subject: [PATCH] improv: add temporary permissions checks --- .github/workflows/continue-review.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/continue-review.yaml b/.github/workflows/continue-review.yaml index 225a3e351..f6f898bec 100644 --- a/.github/workflows/continue-review.yaml +++ b/.github/workflows/continue-review.yaml @@ -16,9 +16,14 @@ jobs: name: AI Code Review runs-on: ubuntu-latest timeout-minutes: 10 - # Only run if it's a PR event OR if it's a comment with @continue-review on a PR + # Only run if: + # - It's a PR event from a team member (with write/admin permissions) + # - OR it's a comment with @continue-review on a PR (from anyone) if: | - github.event_name == 'pull_request' || + (github.event_name == 'pull_request' && + (github.event.pull_request.author_association == 'OWNER' || + github.event.pull_request.author_association == 'MEMBER' || + github.event.pull_request.author_association == 'COLLABORATOR')) || (github.event_name == 'issue_comment' && github.event.issue.pull_request && contains(github.event.comment.body, '@continue-review'))