Prompt file imported from Sunbird-Knowlg/knowledge-platform-jobs (
.claude/commands/pr.md). Fill in{{arg1}}before use. Copyright stays with the author.
Open a pull request for knowledge-platform-jobs. Base branch = {{arg1}} (default develop if empty).
Context
Current branch:
!git branch --show-current
Recent commits on this branch:
!git log --oneline -15
PR template:
!cat .github/pull_request_template.md
Steps
- Resolve the base ref: use
${1:-develop}if it exists locally, elseorigin/${1:-develop}(rungit fetch origin ${1:-develop}first if needed). Then list the branch's commits and changed files vs that base:git log <base>..HEAD --onelineandgit diff --stat <base>...HEAD. If there are no commits ahead, stop and say so. - JIRA key check (required): this repo's CI (
jira-description-action) checks the branch name and PR title for a JIRA issue key (e.g.SB-1234). If neither the current branch nor your drafted title contains one, warn the user and ask for the key before proceeding. - Draft the PR title as a Conventional Commits summary, including the JIRA key.
- Fill the PR template sections from the commits/diff: summary + issue reference, tick the correct Type of change box, describe How Has This Been Tested?, complete the checklist honestly. If any change touched
jobs-core, note whether the mirror indata-pipelineis needed. - Confirm the title and body with the user, then create it:
gh pr create --base ${1:-develop} --head <current-branch> --title "<title>" --body "<body>" - Report the PR URL.
Push the branch first if gh reports the head branch isn't on the remote (ask before pushing).
Examples
/pr # open a PR against develop (default); needs a JIRA key in the title/branch
/pr release-1.0 # open a PR against release-1.0