Use when opening a Fabric.js pull request. Generates a conventional-commit style PR title, writes a concise PR description, includes `close
Use this skill when the user asks to open a PR for fabricjs/fabric.js.
Collect or infer:
master)Issue-number handling:
Create a short meaningful title using conventional commits style:
<type>(<optional-scope>): <summary>feat, fix, docs, ci, test, refactor, choreExamples:
ci(): fix coverage artifact download in comment workflowfix(coverage): flatten playwright istanbul outputdocs(changelog): align next entry formatPR body must include:
close #<issue-num> only when an issue number is providedBefore opening the PR, ensure CHANGELOG.md under ## [next] contains one line in this style:
- <pr title> [#<predictedPrNum>](https://github.com/fabricjs/fabric.js/pull/<predictedPrNum>)
Rules:
[next] list.From repo root, determine next issue/PR number:
latest_num=$(gh api repos/fabricjs/fabric.js/issues --paginate -F per_page=1 -F state=all --jq '.[0].number' | head -n1)
predicted_pr_num=$((latest_num + 1))
Preferred faster command (usually enough):
latest_num=$(gh api repos/fabricjs/fabric.js/issues?state=all\&per_page=1 --jq '.[0].number')
predicted_pr_num=$((latest_num + 1))
Use predicted_pr_num in the changelog line before creating PR.
close #<issue-num> in PR body; otherwise do not include issue-closing text.npm run lint
npm run prettier:check
master before opening the PR:git fetch origin master
git merge origin/master
CHANGELOG.md [next] line with predicted number and title.--no-verify; pre-commit hooks must run and pass.gh pr create --base <base> --head <branch> --title "<title>" --body-file <file>.If the user asks to finish or unblock an existing Fabric.js PR:
origin/master.origin/master into the PR branch locally.CHANGELOG.md, resolve it locally as part of the merge instead of asking the user whether to do that.CHANGELOG.md or if the resolution is ambiguous.Before finishing, verify:
close #<issue-num>.npm run lint passes.npm run prettier:check passes.--no-verify and pre-commit hooks passed.master before PR creation.origin/master was merged into the PR branch if that was enough to clear a CHANGELOG.md-only conflict.CHANGELOG.md has exactly one new [next] line for this PR.https://github.com/fabricjs/fabric.js/pull/<prNum>.