feat(me): improve create-pr skill with auto update branch detection - #193
Conversation
… execution The pull_request trigger was causing the workflow to run on both: 1. PR merge (pull_request event) 2. The resulting push to main (push event) This created duplicate executions. Now the workflow only triggers on push to main branch, which covers both direct pushes and PR merges. Removed: - pull_request trigger (lines 7-10) - Conditional PR merge logic in Release step The workflow now: - Triggers only on push to main - Runs semantic-release to update version files - Creates a release PR if changes are detected Co-Authored-By: Claude <noreply@anthropic.com>
…-from-release-workflow
📝 WalkthroughWalkthroughThe pull request updates the create-pr skill by adding an explicit base branch option to the workflow, reorganizing documentation steps to include an "Update Branch" phase before conflict checks, and refining messaging. A minor script change updates the user-facing message when branches are out of sync. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@plugins/me/skills/create-pr/SKILL.md`:
- Around line 79-105: The markdown in the "PR Body Template" section of SKILL.md
has fenced code blocks that violate MD031; fix by adding a blank line
immediately before and after each fenced code block (the ```markdown block and
both ```bash blocks) so there is an empty line separating the surrounding text
and headings from the opening and closing ``` fences, ensuring markdownlint
MD031 passes.
🧹 Nitpick comments (1)
plugins/me/skills/create-pr/SKILL.md (1)
30-38: Clarify how--baseargument overrides auto-detected BASE.The
--base <branch>argument is documented in line 18, but the workflow examples use$BASEwithout showing how the override works. Consider adding a note that when--baseis provided, it should be used instead of the auto-detected value from pr-check.sh.
| **PR Body Template:** | ||
| ```markdown | ||
| ## Summary | ||
| - Change 1 (from commits) | ||
| - Change 2 (from commits) | ||
| - Change 1 | ||
| - Change 2 | ||
|
|
||
| ## Test plan | ||
| - [x] Tests pass | ||
| - [x] Manual verification | ||
| ``` | ||
|
|
||
| **After PR creation (NO_PR/MERGED):** | ||
| If `--automerge` flag passed: | ||
| **After PR creation (if --automerge):** | ||
| ```bash | ||
| gh pr merge --auto --squash | ||
| ``` | ||
|
|
||
| ## Auto-Merge (Optional) | ||
|
|
||
| **Default:** Don't auto-merge. Let CI run first. | ||
|
|
||
| Ask user after PR creation: "Wait for CI and merge automatically? (yes/no)" | ||
| Default: Don't auto-merge. Ask user: "Wait for CI and merge automatically? (yes/no)" | ||
|
|
||
| If **yes**: | ||
| If yes: | ||
| ```bash | ||
| gh run watch # Wait for CI | ||
| gh run view --json conclusion,state # Confirm passed | ||
| gh run watch | ||
| gh run view --json conclusion,state | ||
| # If passed, ask: "CI passed. Merge with squash? (y/n)" | ||
| gh pr merge --squash --delete-branch # Only if confirmed | ||
| gh pr merge --squash --delete-branch | ||
| ``` |
There was a problem hiding this comment.
Fix markdownlint MD031 violations: add blank lines around fenced code blocks.
The static analysis tool flagged missing blank lines before code blocks at lines 80, 91, and 100. Per coding guidelines, markdownlint should pass.
📝 Proposed fix
**PR Body Template:**
+
```markdown
## Summary
- Change 1
- Change 2
## Test plan
- [x] Tests pass
- [x] Manual verificationAfter PR creation (if --automerge):
+
gh pr merge --auto --squashAuto-Merge (Optional)
Default: Don't auto-merge. Ask user: "Wait for CI and merge automatically? (yes/no)"
If yes:
+
gh run watch
gh run view --json conclusion,state
# If passed, ask: "CI passed. Merge with squash? (y/n)"
gh pr merge --squash --delete-branch</details>
<!-- suggestion_start -->
<details>
<summary>📝 Committable suggestion</summary>
> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
```suggestion
**PR Body Template:**
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)
80-80: Fenced code blocks should be surrounded by blank lines
(MD031, blanks-around-fences)
91-91: Fenced code blocks should be surrounded by blank lines
(MD031, blanks-around-fences)
100-100: Fenced code blocks should be surrounded by blank lines
(MD031, blanks-around-fences)
🤖 Prompt for AI Agents
In `@plugins/me/skills/create-pr/SKILL.md` around lines 79 - 105, The markdown in
the "PR Body Template" section of SKILL.md has fenced code blocks that violate
MD031; fix by adding a blank line immediately before and after each fenced code
block (the ```markdown block and both ```bash blocks) so there is an empty line
separating the surrounding text and headings from the opening and closing ```
fences, ensuring markdownlint MD031 passes.
Summary
Test plan
Summary by CodeRabbit
Release Notes
New Features
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.