improv: add temporary permissions checks

This commit is contained in:
Tomasz Stefaniak 2025-08-12 10:23:52 -07:00
parent a7e2d6f520
commit e623242d3c

View file

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