Prompt file imported from aldelar/context-aware-vision-grounded-kb-agent (
.github/prompts/pr.prompt.md). Copyright stays with the author.
Create Pull Request
Create a GitHub pull request from the current branch to main.
Steps
- Run
git branch --show-currentto get the current branch name. If onmain, stop and tell the user. - Run
git statusto check for uncommitted changes. If there are any, stop and tell the user to commit first. - Run
git log main..HEAD --onelineto get the list of commits. If there are no commits ahead of main, stop and tell the user. - Run
git diff main..HEAD --statto get the changed files summary. - Extract the repository owner/repo from
git remote get-url origin. - Compose a clear PR title using conventional commit format based on the changes.
- Compose a PR body with:
- A Summary section describing what changed and why
- A Changes section listing the key modifications
- Create the PR using the GitHub MCP tool targeting
mainas the base branch. - Output exactly one line in this format:
PR created: #<number> — <title> (<clickable URL>)