| name | qv-addon-pr-create |
| description | Generate PR descriptions for addon packages (non-SDK inference addons, decoder, OCR). Use when creating a PR description or user asks to "prepare PR description" for an addon package. |
Addon PR Description Generator
What
Generate PR descriptions for addon packages (non-SDK packages like inference addons, decoder, OCR). Collects changes from the remote tracked branch, validates the version bump, and fills in the PR template.
When to Use
- Creating a PR description for an addon package
- User explicitly asks to "generate a PR description" or "prepare PR description" while working in an addon package
Instructions
Step 1: Identify base/head, collect changes, and verify version bump
Identify the PR base/head, collect the full change set from the remote tracked branch, and validate the version bump in package.json against main:
-
Find the PR base and head: The base is main (or the branch configured as default). The head is the current branch.
-
Collect changes from the remote tracked branch:
- Compare
main...origin/<current-branch> (or the PR base commit...origin/) to list commits and diffs.
- The rule: only the remote tracked branch is considered.
-
Mandatory version bump check:
- Always compare
package.json between main and origin/<current-branch>.
- If the
version in package.json is unchanged compared to main, display this exact warning to the user:
WARNING: VERSION BUMP MAY BE REQUIRED
The version in package.json is unchanged compared to main.
If this PR includes any changes that must be released in the package, you must bump the package version, commit/push it and re-run this command.
- Still proceed with the next steps
-
Do not include uncommitted changes or untracked files: If any uncommitted/untracked files are present, or if there are local-only commits, ignore them.
-
If there's a release notes file in release-notes/ that matches the new version in package.json, read it for additional context. If it's missing, warn the user.
The goal is a single combined change set: all commits on the remote tracked branch vs main, while ensuring no unwanted changes end up in the PR description.
Step 2: Generate the PR description
Use .github/PULL_REQUEST_TEMPLATE/addon.md as the template. If there are additional instructions in the template file, follow them too.
Fill in the template based on the combined change set. Return the completed PR description to the user as a message.
Do NOT create or modify any additional files when producing the PR description.