Skip to content

Commit 198018e

Browse files
committed
fix(pr-workflow): remove git parent dependency from github pr rule
- remove requirement to execute git parent command before creating pr - move original rule to ai-stuff/disabled directory for reference - simplify pr creation process by removing base branch specification
1 parent 5e61b39 commit 198018e

File tree

2 files changed

+65
-7
lines changed

2 files changed

+65
-7
lines changed

.cursor/rules/tool-rules/github-pr-manual.mdc

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ alwaysApply: false
55
---
66

77
<critical-rules>
8-
- Before interpreting the Diff context, execute `git parent` command to dynamically get the base branch which will be used as the value for the `--base` flag.
98
- You will NOT use the `run_terminal_cmd` tool, you will generate the command in text format surrounded with ```bash code block.
109
</critical-rules>
1110

@@ -28,15 +27,10 @@ alwaysApply: false
2827

2928
<example>
3029
User: "Create a pull request based on @PR Diff"
31-
Agent: Getting the base branch
32-
```bash
33-
git parent
34-
```
35-
3630
Agent: Analyzing the diff context
3731

3832
```bash
39-
gh pr create --base <base-branch> --title "feat: implement user authentication" --body "## Summary
33+
gh pr create --title "feat: implement user authentication" --body "## Summary
4034

4135
Added user authentication functionality using JWT tokens.
4236

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
---
2+
description: ALWAYS use when you are asked to create a pull request. This rule guides generating GitHub PR creation commands to ensure standardized PR structure with proper formatting, comprehensive descriptions, and adherence to commitizen conventions. This rule ensures consistent PR structure with detailed summaries, change lists, and additional notes.
3+
globs:
4+
alwaysApply: false
5+
---
6+
7+
<critical-rules>
8+
- Before interpreting the Diff context, execute `git parent` command to dynamically get the base branch which will be used as the value for the `--base` flag.
9+
- You will NOT use the `run_terminal_cmd` tool, you will generate the command in text format surrounded with ```bash code block.
10+
</critical-rules>
11+
12+
# GitHub Pull Request Creation Standards
13+
14+
## Critical Rules
15+
16+
- Always use `gh pr create` as the base command
17+
- Use the `--title` flag with a concise title following the commitizen convention
18+
- Use the `--body` flag to provide a comprehensive description
19+
- Structure the PR body with these mandatory sections:
20+
- `## Summary` - Brief overview of changes
21+
- `## Changes` - Bullet list of specific modifications
22+
- `## Additional Notes` - Extra information, limitations, or follow-ups
23+
- Escape all backticks within the PR body using backslashes (`\``)
24+
- Never use newline characters in the command itself
25+
- Always wrap the entire command in a ```bash code block for easy copy-pasting
26+
27+
## Examples
28+
29+
<example>
30+
User: "Create a pull request based on @PR Diff"
31+
Agent: Getting the base branch
32+
```bash
33+
git parent
34+
```
35+
36+
Agent: Analyzing the diff context
37+
38+
```bash
39+
gh pr create --base <base-branch> --title "feat: implement user authentication" --body "## Summary
40+
41+
Added user authentication functionality using JWT tokens.
42+
43+
## Changes
44+
45+
- Created AuthService for token generation and validation
46+
- Added login and register endpoints
47+
- Implemented middleware for protected routes
48+
- Added unit tests for auth functionality
49+
50+
## Additional Notes
51+
52+
Future work: Add refresh token capability"
53+
```
54+
</example>
55+
56+
<example type="invalid">
57+
gh pr create --base main --title "User auth" --body "Added authentication"
58+
59+
// Problems:
60+
// - Not wrapped in code block
61+
// - Hardcoded base branch
62+
// - Insufficient title (not following commitizen)
63+
// - Inadequate body without proper sections
64+
</example>

0 commit comments

Comments
 (0)