ci: push fix branches instead of attempting gh pr create - #1317
Open
abueide wants to merge 2 commits into
Open
Conversation
GitHub Actions cannot create pull requests in this org - it's blocked at the enterprise level (confirmed via a real run against issue #1309: `gh pr create` failed with "GitHub Actions is not permitted to create or approve pull requests", and a repo-level API attempt to enable it was rejected with "The enterprise does not allow..."). This applied to both claude-doc-sync.yml and claude-issue-investigate.yml identically, and neither had ever actually reached that step in a real run before. Rather than routing around the restriction with a PAT, both workflows now just push the branch and stop. Each writes a result file ( doc-sync-result.md / investigation-report.md) with a ready-to-click compare link (.../compare/base...branch?expand=1) so a maintainer can open the PR themselves in one click. Drops pull-requests: write from both workflows' permissions - neither reads or writes PR data anymore. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Step 2 now asks for a real regression test in the appropriate existing test file (not just a throwaway script) that fails on current code for the same reason the issue describes. Step 4 requires re-running that same test after the fix and reporting both results (failing before, passing after) as evidence the fix addresses the diagnosed cause, rather than just asserting the fix is correct. Steps 3, 5, 6, and 8 now explicitly forbid presenting a guess as a finding: if the root cause, the fix, or the reproduction itself is uncertain, the report must say so plainly and state what information or access is needed, rather than filling the gap with speculation. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GitHub Actions cannot create pull requests in this org — confirmed by a real run against issue #1309, where
gh pr createfailed with "GitHub Actions is not permitted to create or approve pull requests." I tried enabling the usual repo-level fix ("Allow GitHub Actions to create and approve pull requests") via the API and got rejected outright: "The enterprise does not allow GitHub Actions to create or approve pull requests." This is a hard block above repo/org admin level.This applies identically to both
claude-doc-sync.ymlandclaude-issue-investigate.yml— neither had ever actually reached itsgh pr createstep in a real run before now, so this was a latent bug in both.Considered routing around it with a dedicated PAT (a human-authenticated token isn't subject to the enterprise's Actions-specific restriction), but decided against circumventing an org-level policy that was presumably set deliberately.
Fix: both workflows now push the fix branch and stop — no
gh pr createattempt. Each writes a result file (doc-sync-result.md/investigation-report.md) containing a ready-to-click compare link (.../compare/base...branch?expand=1) so a maintainer can open the PR themselves in one click, uploaded as a job artifact same as before. Also dropspull-requests: writefrom both workflows' permissions, since neither reads or writes PR data anymore — onlycontents: writeto push the branch.Follow-up commit, based on that same real #1309 run's output: the investigation prompt now requires a genuine proof of fix rather than an assertion:
chunk()returns a sparse array when one event exceedsmaxKB, stalling the event queue (regression in 2.23.0) #1309 run (it verified its 3 new tests were "not vacuous" by checking they failed without the fix and passed with it).🤖 Generated with Claude Code