Skip to content

No Merge button on pull requests you cannot merge; review token at push time - #7

Merged
hollandcloud merged 2 commits into
mainfrom
fix/merge-without-write-access
Oct 28, 2026
Merged

hollandcloud merged 2 commits into
mainfrom
fix/merge-without-write-access

Conversation

@hollandcloud

Copy link
Copy Markdown
Owner

Two commits. Tracked on the board as LAB-11 (the fix) and LAB-9 (App Store).

1. Fix: Merge offered where GitHub refuses it

The pull request list is every open PR you opened, which includes PRs to projects you only contribute to. A green one got a Merge button that GitHub then refused, because opening a pull request doesn't give you write access to the repository.

The query now reads viewerPermission. READ or TRIAGE withholds the button with the reason no write access; a missing value is treated as unknown and changes nothing.

Found while preparing App Review: a token scoped to one demo repository can still read every public repository, so the reviewer would have seen the developer's open PR to a public project.

Version 0.4.2, build 5.

2. Review token, filled in at push time

The review notes now describe the demo repository the reviewer signs in to, hollandcloud/gitcleared-demo. asc.py review takes the token from GITCLEARED_REVIEW_TOKEN, so it is never written into this repository. asc.py submit refuses while App Store Connect's copy of the notes still has the placeholder.

Verification

  • 82 tests pass, including the permission mapping and the new readiness cases.
  • GitCleared's own client code, run read-only against live GitHub:
    • the demo repository's held run is approvable;
    • the demo PR is ready to merge, and the draft is in flight;
    • the developer's PR to a public project is in flight with no Merge button.

🤖 Generated with Claude Code

hollandcloud and others added 2 commits October 28, 2026 16:25
The pull request list is every open PR you opened, which includes PRs
to projects you only contribute to. When one of those was green and
mergeable, GitCleared offered Merge, and GitHub refused it: authoring a
pull request does not give you write access to its repository.

Read the repository's viewerPermission in the same query. READ or TRIAGE
withholds the button with the reason "no write access"; a missing value
is treated as unknown and changes nothing. The reason comes after checks
and reviews, which are still worth seeing on a contribution, and before
GitHub's own merge verdict, which it may not have worked out for a
repository you cannot push to.

Found while setting up the App Review demo: a token scoped to one demo
repository can still read every public repository, so the reviewer
would have seen the developer's open PR to a public project, possibly
with a Merge button that fails.

0.4.2, build 5.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…thout it

The review notes describe the demo repository the reviewer signs in to,
hollandcloud/gitcleared-demo, and what they will see there. The token
line stays a placeholder in the repository. `asc.py review` substitutes
GITCLEARED_REVIEW_TOKEN when it is set, and `asc.py submit` refuses
while App Store Connect's copy of the notes still has the placeholder,
since a reviewer who cannot sign in rejects the build.

The owner's section has the token's exact settings and what to do
before each submission: hold a fresh deployment, send the notes with
the token, submit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@hollandcloud
hollandcloud merged commit 684e94e into main Oct 28, 2026
3 of 4 checks passed
@hollandcloud
hollandcloud deleted the fix/merge-without-write-access branch October 28, 2026 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant