| allowed-tools | description |
|---|---|
Bash(git log:*), Bash(git config:*), Bash(git diff:*), Bash(git branch:*), Read, Glob |
Generate a PR description from commits on the current branch |
- Current branch: !
git branch --show-current - Pull request template:
find .github -type f -name "pull_request_template.md"
-
If a PR template is found, read it and use its structure. Otherwise STOP and surface an error to the user.
-
Extract the ticket ID from the branch name if possible (look for patterns like
JIRA-123,TICKET-456,issue-789,#123, etc.) -
Generate a plain markdown PR description that:
- Follows the PR template structure if one exists
- Fills in sections with relevant information based on:
- The ticket ID from the branch name
- Commit messages and summaries
- The diff showing actual code changes
- If no template exists, create a description with:
- Title (derived from branch name or main commit message)
- Ticket/Issue reference (if found in branch name)
- High-level overview of the branch's purpose
- Bullet list of key changes
- Detailed description based on the diff
- Test plan or testing notes
- Notes or questions for reviewers (if relevant)
-
Output ONLY the filled-in markdown template, ready to be pasted into a PR description. The output should be raw markdown.