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'))