Skip to content

Commit e9f9fb9

Browse files
committed
Auto trigger PR reviews when they are from branches in repo
Pull request events identify members as "contributors", so the workflows are not auto-triggered. But there are some contributors who are not members, so workflows would fail on forks. In this change, we switch the condition for PR events to check for whether the PR was created from a branch in the repo or from a fork. Note that only users with write access to the repo can create branches.
1 parent e4b0716 commit e9f9fb9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

.github/workflows/gemini-dispatch.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
if: |-
4747
(
4848
github.event_name == 'pull_request' &&
49-
contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.pull_request.author_association)
49+
github.event.pull_request.head.repo.fork == false
5050
) || (
5151
github.event.sender.type == 'User' &&
5252
startsWith(github.event.comment.body || github.event.review.body || github.event.issue.body, '@gemini-cli') &&

0 commit comments

Comments
 (0)