Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .claude/commands/pr.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 —
Expand Down
5 changes: 3 additions & 2 deletions .claude/skills/pr/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
1 change: 1 addition & 0 deletions .clinerules/workflows/pr.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 —
Expand Down
1 change: 1 addition & 0 deletions .github/prompts/pr.prompt.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 —
Expand Down
4 changes: 2 additions & 2 deletions modules/repo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 15 additions & 1 deletion modules/repo/pr_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down