From b8ee05c12504545ff6960ea16b2316f80181cc1c Mon Sep 17 00:00:00 2001 From: Levon Becker Date: Tue, 28 Jul 2026 23:09:48 -0700 Subject: [PATCH] Push repository: Automated commit 2026-07-28 23:09:44 --- .claude/commands/pr.md | 1 + .claude/skills/pr/SKILL.md | 5 +++-- .clinerules/workflows/pr.md | 1 + .github/prompts/pr.prompt.md | 1 + modules/repo/README.md | 4 ++-- modules/repo/pr_create.py | 16 +++++++++++++++- 6 files changed, 23 insertions(+), 5 deletions(-) diff --git a/.claude/commands/pr.md b/.claude/commands/pr.md index a9bdf36..9db099c 100644 --- a/.claude/commands/pr.md +++ b/.claude/commands/pr.md @@ -18,6 +18,7 @@ Then create the pull request: 2. Draft a concise PR title (under 70 characters) summarizing the change. 3. Run: `uv run --no-sync invoke repo.pr_create --title="" --content="<notes>"` + (this also assigns the PR to the calling user via `--assignee @me`) 4. Report the PR URL to the user. If a PR already exists for this branch, `repo.pr_create` reports its URL instead of erroring — diff --git a/.claude/skills/pr/SKILL.md b/.claude/skills/pr/SKILL.md index 9879754..bc1afdb 100644 --- a/.claude/skills/pr/SKILL.md +++ b/.claude/skills/pr/SKILL.md @@ -15,5 +15,6 @@ uv run --no-sync invoke repo.pr_create --title="<title>" --content="<notes>" ``` This drafts notes and opens the PR but does not push first — push separately (see the `push` -skill) if the branch isn't already up to date on the remote. If a PR already exists for this -branch, `repo.pr_create` reports its URL instead of erroring. +skill) if the branch isn't already up to date on the remote. The PR is assigned to the calling +user (`--assignee @me`). If a PR already exists for this branch, `repo.pr_create` reports its URL +instead of erroring. diff --git a/.clinerules/workflows/pr.md b/.clinerules/workflows/pr.md index e32eaf6..f875e70 100644 --- a/.clinerules/workflows/pr.md +++ b/.clinerules/workflows/pr.md @@ -15,6 +15,7 @@ Then create the pull request: 2. Draft a concise PR title (under 70 characters) summarizing the change. 3. Run: `uv run --no-sync invoke repo.pr_create --title="<title>" --content="<notes>"` + (this also assigns the PR to the calling user via `--assignee @me`) 4. Report the PR URL to the user. If a PR already exists for this branch, `repo.pr_create` reports its URL instead of erroring — diff --git a/.github/prompts/pr.prompt.md b/.github/prompts/pr.prompt.md index e436225..622ac2d 100644 --- a/.github/prompts/pr.prompt.md +++ b/.github/prompts/pr.prompt.md @@ -18,6 +18,7 @@ Then create the pull request: 2. Draft a concise PR title (under 70 characters) summarizing the change. 3. Run: `uv run --no-sync invoke repo.pr_create --title="<title>" --content="<notes>"` + (this also assigns the PR to the calling user via `--assignee @me`) 4. Report the PR URL to the user. If a PR already exists for this branch, `repo.pr_create` reports its URL instead of erroring — diff --git a/modules/repo/README.md b/modules/repo/README.md index 4034e4b..f3128a4 100644 --- a/modules/repo/README.md +++ b/modules/repo/README.md @@ -22,8 +22,8 @@ counterparts. Every file exposes a `main()` entry point, runnable standalone via exposes `PROTECTED_BRANCHES`, `current_branch()`, and `detect_base_branch()` shared by the other `pr_*`/`push.py`/`pr_cleanup.py` modules (`repo.pr_diff`) - `pr_notes.py` — save PR notes markdown to `tmp/pull_requests/` (`repo.pr_notes_save`) -- `pr_create.py` — open a GitHub Pull Request for the current branch via `gh` (`repo.pr_create` - / `/pr`) +- `pr_create.py` — open a GitHub Pull Request for the current branch via `gh`, assigned to the + calling user (`--assignee @me`) (`repo.pr_create` / `/pr`) - `pr_cleanup.py` — confirm the current branch's PR is merged (`gh pr view`), switch to the detected default branch, pull latest, then force-delete the local feature branch (`git branch -D` — safe here since the merge was already confirmed via GitHub, which handles diff --git a/modules/repo/pr_create.py b/modules/repo/pr_create.py index 51d9953..ca6f809 100644 --- a/modules/repo/pr_create.py +++ b/modules/repo/pr_create.py @@ -27,7 +27,21 @@ def main(title: str | None = None, content: str | None = None) -> None: click.echo(f"Creating PR: {branch} -> {base_name}") result = subprocess.run( - ["gh", "pr", "create", "--base", base_name, "--head", branch, "--title", title, "--body", content], + [ + "gh", + "pr", + "create", + "--base", + base_name, + "--head", + branch, + "--title", + title, + "--body", + content, + "--assignee", + "@me", + ], cwd=repo_path, capture_output=True, text=True,