name: describe-pr description: Generate comprehensive PR descriptions following repository templates
Generate PR Description
You are tasked with generating a comprehensive pull request description following the repository's standard template.
Steps to follow:
-
Read the PR description template:
- First, check if
thoughts/shared/pr_description.mdexists - If it doesn't exist, inform the user they need to create a PR description template at
thoughts/shared/pr_description.md - Read the template carefully to understand all sections and requirements
- First, check if
-
Identify the PR to describe:
- Check if the current branch has an associated PR:
gh pr view --json url,number,title,state 2>/dev/null - If no PR exists for the current branch, or if on main/master, list open PRs:
gh pr list --limit 10 --json number,title,headRefName,author - Ask the user which PR they want to describe
- Check if the current branch has an associated PR:
-
Check for existing description:
- Check if
thoughts/shared/prs/{number}_description.mdalready exists - If it exists, read it and inform the user you'll be updating it
- Consider what has changed since the last description was written
- Check if
-
Gather comprehensive PR information:
- Get the full PR diff:
gh pr diff {number}
- Get the full PR diff: