Repository navigation
ci: keep outsiders' review threads from closing community pull requests - #997
Conversation
An unresolved review thread whose newest reply came from anyone but the author counted against the author. Another contributor could leave a thread open on someone else's pull request, reply after the author, get a bot to reply, or comment from an account deleted later, and get the pull request nudged and then closed, where it would otherwise wait on maintainers and never close. Only the author's and the team's comments, and a bot's that opened the thread, now decide whose court a thread is in.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
There was a problem hiding this comment.
1 issue found across 5 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name=".github/scripts/community-pr-followup.mjs">
<violation number="1" location=".github/scripts/community-pr-followup.mjs:288">
P2: Deleted-account thread comments still do not delay follow-up: GraphQL represents their author as `null`, which `isBotUser` treats as a bot, so this branch skips `lastHumanThreadAt`. Count a null author as activity for the delay clock while continuing to exclude it from ownership decisions.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Anyone can get a bot such as CodeRabbit to repeat text, and the sweep read a follow-up marker from any bot's comment, so a repeated check-in could start the closing countdown. Only GitHub Actions' markers count now. Outsiders' recent thread comments are also tested to delay a follow-up.
Problem
Community PR follow-up (#946) treats an unresolved review thread as waiting on the author whenever its newest reply comes from anyone but the author. Someone outside the team can use that against another contributor's pull request. They can leave a review comment, reply after the author's answer, get CodeRabbit to reply by mentioning it, or comment and then delete their account (GitHub returns no author for that comment, which counted as a bot). The pull request then moves from "waiting on maintainers", which never closes, to "waiting on the author". If the author stays quiet, it gets a check-in after 7 days and is closed 7 days later.
The sweep also reads its check-in marker from any bot's comment. Someone who gets a bot to repeat a check-in, marker included, starts the closing countdown without the bot ever posting a real check-in.
Changes
community-pr-followup.mjs: three kinds of comment now decide whose court an unresolved thread is in:A thread from cubic or CodeRabbit still waits on the author, as before; this repository requires every thread to be resolved before merging. A bot's later reply, which anyone can trigger, no longer counts. That also stops CodeRabbit's "thanks" after the author's fix from putting the thread back on the author. Comments from other users don't count either. They still delay a follow-up as before, but they can no longer push a pull request towards closing. A deleted account's comment has no author and counts for neither, as before.
readFollowupMarkerreads a marker only from GitHub Actions, the account the workflow comments as.Tests: one new test covers each thread case: an outsider's thread, a bot's thread, a bot replying after the author, a deleted account, an outsider replying after the author, an outsider's "+1" after a maintainer's request, and outsiders' recent comments still delaying a follow-up. The marker test now also checks that another bot's marker doesn't count.
CONTRIBUTING.md,DECISIONS.mdand the workflow's header now say the threads are the team's or a review bot's.The store got the same fix in stablebox/stablebar-packages#78, which ports this workflow.
Testing
node --test .github/scripts/community-pr-followup.test.mjs: 15 pass.main'scommunity-pr-followup.mjsand pass with this change.actionlinton the workflow: no findings.app-release.test.mjsdidn't run locally because its npm packages weren't installed. This change doesn't touch it.Merging
Two
ci:commits, which release nothing. Any merge method works.Claude Opus 5.5 via Claude Code