Skip to content

fix(harness): assign bot PRs as a soft-fail follow-up, not inline - #54

Merged
robercano-ghbot merged 1 commit into
mainfrom
fix/bot-gh-assign-scope-fallback
Jul 6, 2026
Merged

fix(harness): assign bot PRs as a soft-fail follow-up, not inline#54
robercano-ghbot merged 1 commit into
mainfrom
fix/bot-gh-assign-scope-fallback

Conversation

@robercano-ghbot

Copy link
Copy Markdown
Collaborator

Summary

Some bot tokens (classic PATs scoped to repo only, no read:org) can create PRs fine but have the assignee-resolution step rejected. The old code appended --assignee inline to gh pr create, so that rejection took the whole PR create down with it — no PR at all. This splits it into create-then-assign: the PR always gets created, and assignment is a soft-fail follow-up (warns on stderr if it can't assign, doesn't lose the PR).

Also adds a MIGRATION.md diligence step: diff each generic file against the plugin's shipped copy before deleting it during a hand-copied-to-plugin migration, since a local install can carry real patches (this bug's reDeploy workaround being the concrete example) that a blanket delete would silently lose.

Test plan

  • GATES_FILE=.claude/self/gates.json gate.sh lint passes
  • GATES_FILE=.claude/self/gates.json gate.sh test passes
  • bash -n .claude/scripts/bot-gh.sh syntax-checks clean

Some bot tokens (classic PATs scoped to repo only, no read:org) can create
PRs fine but have the assignee-resolution step rejected. Doing it inline via
`gh pr create --assignee` meant that failure took the whole PR create down
with it. Split it into create-then-assign so a scope-rejected assignment just
leaves the PR unassigned (warned on stderr) instead of losing the PR.

Also adds a MIGRATION.md diligence step: diff each generic file against the
plugin's shipped copy before deleting it, since a hand-copied install can
carry real local patches (this bug's reDeploy workaround being the concrete
example) that a blanket delete would silently lose.
@robercano-ghbot
robercano-ghbot merged commit d7329a9 into main Jul 6, 2026
9 checks passed
@robercano-ghbot
robercano-ghbot deleted the fix/bot-gh-assign-scope-fallback branch July 6, 2026 14:51
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.

2 participants