UNPKG

@rocketspark/domain-checker

Version:
77 lines (54 loc) 2.62 kB
Create a pull request for the current branch using the repository's PR template. Arguments (optional): $ARGUMENTS ## Instructions 1. First, gather information about the current branch and changes: - Run `git branch --show-current` to get the current branch name - Run `git log origin/main..HEAD --oneline` to see all commits on this branch - Run `git diff origin/main...HEAD --stat` to see changed files summary - Run `git diff origin/main...HEAD` to see the actual changes 2. Analyze the changes to understand: - What functionality was added, changed, or fixed - Which files were modified and their purpose - Whether any security-sensitive areas were touched (endpoints, auth, data access) - Whether high-risk areas were affected (Login, Signup, Billing, Checkout, etc.) 3. Generate a PR title: - Keep it under 70 characters - Use the format: `<type>: <description>` where type is feat, fix, refactor, docs, test, etc. - If the branch name contains a ticket ID (e.g., RCK-12345), include it in the title 4. Generate a PR description following this template structure: ```markdown # Description of change: [Summarize what was changed and why in 2-4 sentences] ## Testing notes [Describe how to test the changes. Include: - Steps to reproduce/verify the changes work - Any specific test data or setup needed - Note if automated tests were added/updated] ## Stability Risk Factor Prevention [Assess the risk level: - Does this affect critical paths? (Login, Signup, Billing, Checkout, Design Partners, content editing) - If yes, recommend appropriate testing/review level - If no, state "This PR does not affect high-risk critical paths."] ## Security [Assess security implications: - If new/changed endpoints: note that SC1/SC2 documentation may be needed - If changes to data access: note what was changed - If no security implications: state "No security-sensitive changes in this PR."] ### Required checks [Add any context-specific checks based on the changes] ### Additional optional checks ``` 5. Create the PR using: ```bash gh pr create --title "<title>" --body "$(cat <<'EOF' <generated description> EOF )" ``` 6. If $ARGUMENTS contains "draft", add the `--draft` flag to create a draft PR. 7. After creating the PR, display the PR URL to the user. ## Important Notes - If the branch has no commits ahead of main, inform the user and do not create a PR - If the branch is not pushed to remote, push it first with `git push -u origin <branch>` - Use a HEREDOC for the PR body to preserve formatting - Include the co-author line at the end of the body