Skip to content

Commit 1de4ab7

Browse files
fix(bots): accept CONTRIBUTOR in engineer-followup comment-path gate
A maintainer with PRIVATE org membership is reported as `author_association: CONTRIBUTOR` in the pull_request_review_comment webhook payload (even though REST shows MEMBER). The followup gate only accepted OWNER/MEMBER/COLLABORATOR, so such a maintainer's review comments SILENTLY failed the gate — the job skipped with no error and the bot never engaged. Observed on #868: a review comment (MEMBER per REST) triggered a followup run that skipped, because the payload association was CONTRIBUTOR (membership private). Add CONTRIBUTOR. Low risk: this path already requires a non-fork, OPEN, `engineer-bot`-labeled PR (a maintainer-applied opt-in). Mirrors the engine fix (databricks/databricks-bot-engine#120). Signed-off-by: eric-wang-1990 <e.wang@databricks.com> Co-authored-by: Isaac
1 parent e23254d commit 1de4ab7

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

.github/workflows/engineer-bot-followup.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,15 @@ jobs:
3333
# - skip fork PRs — keep the model + App token out of untrusted code's reach;
3434
# - operate only on non-fork OPEN PRs carrying the `engineer-bot` label
3535
# (maintainer-applied opt-in; label requires triage+);
36-
# - comment path: trusted commenters only (OWNER/MEMBER/COLLABORATOR, or a
37-
# bot — reviewer-bot/Copilot), never the engineer-bot's own comments, and
38-
# never a reviewer-bot reconcile loopback;
36+
# - comment path: trusted commenters only
37+
# (OWNER/MEMBER/COLLABORATOR/CONTRIBUTOR, or a bot — reviewer-bot/Copilot),
38+
# never the engineer-bot's own comments, and never a reviewer-bot reconcile
39+
# loopback. CONTRIBUTOR is included because a maintainer with PRIVATE org
40+
# membership is reported as `author_association: CONTRIBUTOR` in the webhook
41+
# payload (even though REST shows MEMBER) — without it, such a maintainer's
42+
# review comments SILENTLY fail this gate and the bot never engages. Low
43+
# risk: this path already requires a non-fork, OPEN, `engineer-bot`-labeled
44+
# PR (a maintainer-applied opt-in);
3945
# - labeled path: the `engineer-bot` label was just applied by a human.
4046
if: >-
4147
github.event.pull_request.head.repo.fork == false
@@ -47,7 +53,7 @@ jobs:
4753
&& !startsWith(github.event.comment.user.login, 'peco-engineer-bot')
4854
&& !contains(github.event.comment.body, '<!-- pr-review-bot:v1 reconcile -->')
4955
&& (
50-
contains(fromJson('["OWNER","MEMBER","COLLABORATOR"]'), github.event.comment.author_association)
56+
contains(fromJson('["OWNER","MEMBER","COLLABORATOR","CONTRIBUTOR"]'), github.event.comment.author_association)
5157
|| (
5258
github.event.comment.user.type == 'Bot'
5359
&& (

0 commit comments

Comments
 (0)