Repository navigation
Description
Summary
The PR Gate closes pull requests from maintainers whose get-bb org membership is private. It labels them needs-issue and posts the "Linked issue" comment. The issue requirement from #6189 is meant for outside pull requests, but it only exempts authors whose author_association is OWNER or MEMBER. For an org member with private membership, the pull_request_target event reports COLLABORATOR, so the check applies to them.
Versions and environment
get-bb/bbmain at 3a861f3 (the gate came in with d1bfe7a, Require outside pull requests to close an open issue #6189).- GitHub Actions
pull_request_target, workflow.github/workflows/pr-gate.yml.
Steps to reproduce
- As an org admin whose get-bb membership is private, push a branch to
get-bb/bb(not a fork). - Open a pull request without
Fixes #N.
Expected vs actual
Expected: the PR stays open, because it comes from a maintainer branch in this repository.
Actual: #6195 (author ymichael, branch bb/fix-thread-scroll-position-inconsistency-thr_nbqpibci7w in get-bb/bb) was closed 13 seconds after opening. Run https://github.com/get-bb/bb/actions/runs/40039656279 logged:
PR_AUTHOR: ymichael
PR_AUTHOR_TYPE: User
PR_ASSOCIATION: COLLABORATOR
HEAD_REPO: get-bb/bb
Evidence
- The exemption:
bb/.github/workflows/pr-gate.yml
Line 67 in 3a861f3
if [ "$EVENT_ACTION" != "synchronize" ] && [ "$PR_AUTHOR_TYPE" != "Bot" ] && [ "$PR_ASSOCIATION" != "OWNER" ] && [ "$PR_ASSOCIATION" != "MEMBER" ]; then gh api orgs/get-bb/memberships/ymichaelreturns{"role":"admin","state":"active"}, andgh api orgs/get-bb/public_members/ymichaelreturns 404 (private membership).gh api repos/get-bb/bb/pulls/6195called with an org member's token returnsauthor_association: MEMBER. The event payload the workflow receives saysCOLLABORATOR.
What I ruled out
- Not a missing approval.
COLLABORATORis in the gate's trusted list, so only the issue check failed. - Not a fork. The head repository is
get-bb/bbitself.
Suggested fix
Apply the linked-issue requirement only to pull requests whose head repository is not this repository. Only accounts with write access can push branches here, so that identifies maintainers whatever their membership visibility.
Found in bb thread thr_nbqpibci7w.
AGENT GENERATED
Activity
bb-slop-cop commentedon Oct 23, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotsecurity,no-repro. Filled missing classifications; replaced none.OWNER/MEMBERbut not same-repositoryCOLLABORATORauthors. Main now skips this check for same-repository heads.5f3ceb1649921f1bd2e167aee611561bcb751248. Removing only the added guard reproduces closure. Appliedno-reprobecause current main passes.Skip the PR gate's linked-issue check for branches in this repository (…