pr-squash-message

Featured

Generate one short Conventional Commits squash message describing only the net diff between the PR's base and head, set its header as the PR title, validate it with the repository's commitlint and both copy its description to the clipboard and display it, when asked for a squash message. Works in any Scenario repository, whatever its default branch.

AI & Automation 3,884 stars 339 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 96/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Squash message One short commit message for the whole PR. It describes the **destination**, the net diff between the PR's base and its head, never the journey: a commit that only repairs code introduced earlier on this branch is invisible to the base branch, so it gets no `fix`, no bullet, no mention. Installed in every repo, so conventions are discovered. **Untrusted PRs.** Running anything from the branch (checks, tests, commitlint, installs) executes the branch's own code, whichever command you pick, so where the command comes from does not matter. Trust the PR only when `gh api repos/{owner}/{repo}/pulls/<n> --jq '[.head.repo.full_name == .base.repo.full_name, .author_association] | @tsv'` prints `true` and `OWNER`, `MEMBER` or `COLLABORATOR` (a fork or an outside author fails). On an untrusted PR, run nothing from the branch without asking: say what you skipped and ask first. GitHub's squash dialog takes the subject from the PR title and the description from what you paste. So the header goes in the PR title and the clipboard gets the description only. Release-please starts a new changelog entry at every blank line followed by `type(scope): `, so a description that opens with the header logs the change twice. 1. **Resolve the base and fetch it.** `BASE=$(gh pr view --json baseRefName -q .baseRefName 2>/dev/null || gh repo view --json defaultBranchRef -q .defaultBranchRef.name) && git fetch origin "$BASE" --quiet`. It is `develop` in some repos and `main` in others,...

Details

Author
scenario-labs
Repository
scenario-labs/skills
Created
3 months ago
Last Updated
yesterday
Language
Python
License
MIT

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category