draft-pr

star 1

Draft a pull request with Jira linking from the branch name

aerospike By aerospike schedule Updated 3/1/2026

name: draft-pr description: Draft a pull request with Jira linking from the branch name disable-model-invocation: true

Draft a pull request for the current branch.

Instructions

  1. Run git branch --show-current to get the current branch name.
  2. Extract the Jira ticket key if present (pattern: uppercase letters + hyphen + digits, e.g., INFRA-370, ENG-123). The ticket may appear anywhere in the branch name.
  3. Determine the base branch — use main unless the user specifies otherwise via $ARGUMENTS.
  4. Run git log and git diff against the base branch to understand ALL changes (not just the latest commit).
  5. Check if the branch has been pushed to the remote. If not, ask before pushing.
  6. Draft the PR:
    • Title: Must follow conventional commits format: type(context): [JIRA] description
      • Determine the type by reviewing ALL commits on the branch and bubbling up to a single conventional commit type (e.g., if commits include feat and fix, use feat since it's the higher-level change)
      • Common types: feat, fix, refactor, docs, test, ci, chore, build, perf
      • context is the area/scope of the change (e.g., workflows, actions, deploy)
      • [JIRA] is the Jira ticket key in brackets if found (e.g., [INFRA-370])
      • Keep under 70 characters total
      • Examples: feat(workflows): [INFRA-370] add artifacts-cicd integration tests, fix(deploy): [ENG-123] correct artifact routing logic
    • Body using this structure:
## Summary
<1-3 bullet points summarizing what changed and why>

## Jira
<link to ticket if found, otherwise omit this section>

## Changes
<Bulleted list of specific changes, grouped by area if needed>

## Test plan
<How to verify these changes — mention any tests added/run>
  1. Generate a Changes Breakdown table by file type. Categorize each changed file and sum additions/deletions:

    gh api repos/{owner}/{repo}/pulls/{number}/files --paginate \
      --jq '.[] | "\(.filename)\t\(.additions)\t\(.deletions)"'
    

    Categorize by extension: .yaml/.yml → YAML (workflows), .bats → Bats (tests), .sh → Shell scripts, .md → Markdown/Docs, etc. Present as a table:

    ## Changes Breakdown
    
    | Category     | +add     | -del    | net       | files  |
    | ------------ | -------- | ------- | --------- | ------ |
    | Bats (tests) | 698      | 0       | +698      | 3      |
    | ...          | ...      | ...     | ...       | ...    |
    | **Total**    | **1512** | **286** | **+1226** | **22** |
    

    Add a brief note explaining the largest categories (e.g., "Shell script churn is mostly linter reformatting").

  2. Present the draft to the user for review before creating the PR.

  3. Create using gh pr create.

Jira URL

Construct Jira links as: https://aerospike.atlassian.net/browse/{TICKET_KEY}

User arguments

If the user provides arguments, treat them as additional context about the PR (e.g., base branch, extra description, or ticket details). $ARGUMENTS

Install via CLI
npx skills add https://github.com/aerospike/shared-workflows --skill draft-pr
Repository Details
star Stars 1
call_split Forks 2
navigation Branch main
article Path SKILL.md
More from Creator