Assign repo owner as reviewer on Claude-opened PRs#109
Conversation
When the claude.yml workflow opens a draft PR for an issue trigger, it now requests the repository owner as a reviewer via `gh pr edit --add-reviewer`, so Claude's draft attempts land in the maintainer's review queue instead of sitting unnoticed. Uses `github.repository_owner` so the behavior follows the repo into downstream books created from this template, and runs as a non-fatal follow-up to PR creation so a reviewer-request error degrades to a warning rather than failing the run. Addresses #105.
|
Claude finished @d-morrison's task in 1m 18s —— View job Code Review: PR #109 — Assign reviewer on Claude-opened PRs
SummaryThe change is correct and clean. The core choices are sound:
One minor comment posted inline: the 8-line comment block outlining the rationale exceeds the project's "comment only the non-obvious WHY" convention, especially since the PR description already covers all of it. A one-liner covering the non-obvious structural choice (separate Otherwise, this is ready to merge. |
There was a problem hiding this comment.
Pull request overview
Updates the claude.yml workflow so that when it opens a draft PR in response to an issue trigger, it also requests the repository owner as a reviewer—making these Claude-created drafts appear in the maintainer’s review queue (per Issue #105).
Changes:
- After creating a new draft PR, run
gh pr edit ... --add-reviewer ${{ github.repository_owner }}and downgrade failures to a workflow warning (non-fatal).
Per review on #109: the 8-line comment block restated context already covered by the PR description. Collapse it to the one non-obvious point — why a separate `gh pr edit` (not a `--reviewer` flag on `gh pr create`): so a reviewer-request failure degrades to a warning instead of failing PR creation.
|
Claude finished @d-morrison's task in 1m 8s —— View job Review comment addressed
The inline review comment has been addressed in commit Before (8 lines): # Issue #105: request the repository owner as a reviewer on the
# freshly-opened PR so Claude's drafts land in their review queue.
# Done as a separate `gh pr edit` (not a `--reviewer` flag on
# `gh pr create`) so a reviewer-request failure — e.g. the owner
# is an org rather than a user, or happens to be the PR author —
# degrades to a warning instead of failing PR creation. Uses
# `github.repository_owner` so the request follows the repo into
# downstream books created from this template.After (3 lines): # Issue #105: request the repo owner as a reviewer. Separate from
# `gh pr create` so a failure (e.g. owner is an org) degrades to a
# warning rather than failing PR creation.The result is one line longer than the suggestion (which dropped the issue-reference line), but the same spirit: only the non-obvious structural WHY remains. The PR is ready to merge. |
|
Claude finished @d-morrison's task in 1m 42s —— View job Code Review: PR #109 — Assign reviewer on Claude-opened PRs
SummaryThis is a re-review after the branch was synced with The change is correct and ready to merge. Specific checks:
No new inline comments needed — the one substantive finding from the prior cycle has been addressed. |
|
What
When the
claude.ymlworkflow opens a draft PR for an issue trigger, it now requests the repository owner as a reviewer, so Claude's draft attempts land in the maintainer's review queue instead of sitting unnoticed.Why
Issue #105: "when claude creates a PR, assign me as a reviewer." Previously a Claude-opened PR had no reviewer assigned, so there was nothing to surface it in a review queue.
How
In the "Push branch and open draft PR for issue trigger" step, after a PR is freshly opened, run:
github.repository_ownerrather than a hard-coded username so the behavior follows the repo into downstream books created from this template.gh pr edit(rather than a--reviewerflag ongh pr create) and made non-fatal (|| echo "::warning::..."), so a reviewer-request error — e.g. the owner is an org rather than a user, or happens to be the PR author — degrades to a warning instead of failing the run.Addresses #105.
https://claude.ai/code/session_01S2Cvpp3iGd7KSC9jWnDKxs
Generated by Claude Code