You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE] Automatic commit message for pull request merge #79
Merge commit should follow message standards, either via:
Automatic web interface commit message upon pull request merge
GH API
Problem Statement
Merge commits do not follow our commit standard
Proposed Solution
Example of message following our standards:
chore: merge pull request #78 from vig-os/feature/58-default-commit-validation
feat(vigutils): add --require-scope flag and strict-by-default hook config
Passes all CI/CD
Refs: #58
merge_commit_message: PR_TITLE → PR_BODY (merge commit body = PR body)
PR titles already follow the commit message standard (type(scope): description), so the merge commit subject is automatically compliant.
PR body template updated to include Refs: line, ensuring traceability in merge commit body.
PR title validated by a CI workflow that reuses validate_commit_msg.py (existing logic, no duplication).
Tasks
Task 1: Add gh-repo-merge-settings recipe to justfile.gh — sets merge_commit_title=PR_TITLE and merge_commit_message=PR_BODY via gh api — justfile.gh — verify: recipe parses (just --list --justfile justfile.gh)
Task 2: Write failing test for PR title validation (test that validate_commit_message correctly validates a PR-title-only string with refs exemption) — packages/vig-utils/tests/ — verify: uv run pytest shows test failing
Task 3: Add CLI support for subject-only validation (all refs optional) to validate_commit_msg.py — packages/vig-utils/src/vig_utils/validate_commit_msg.py — verify: uv run pytest passes
Task 4: Create pr-title-check.yml workflow that validates the PR title using validate-commit-msg on pull_request: opened/edited/synchronize — .github/workflows/pr-title-check.yml — verify: actionlint or yamllint passes
Task 5: Update PR body template to include Refs: # at the bottom so merge commit body contains traceability — .github/pull_request_template.md — verify: visual inspection
Task 6: Update CHANGELOG.md under ## Unreleased — CHANGELOG.md — verify: follows existing format
TDD applies to: Tasks 2–3 (test first, then implementation). TDD skipped for: Tasks 1, 4, 5, 6 (config, workflow YAML, template, docs — not unit-testable).
You might need a placeholder for pr-title-check.yml in main for this to work right away, not sure.
After implementing and merging, I would leave the issue open until we verify it and turn on Auto mergehere. The gh-repo-merge-settings recipe should also set this value.
Task 1: Create setup-gh-repo.sh script that configures repo merge settings (merge_commit_title=PR_TITLE, merge_commit_message=PR_BODY, allow_auto_merge=true) via gh api — assets/workspace/.devcontainer/scripts/setup-gh-repo.sh — verify: bash -n assets/workspace/.devcontainer/scripts/setup-gh-repo.sh
Task 2: Wire setup-gh-repo.sh into post-create.sh — call it after git/gh setup — assets/workspace/.devcontainer/scripts/post-create.sh — verify: bash -n assets/workspace/.devcontainer/scripts/post-create.sh
Task 3: Write failing test for --subject-only mode in validate_commit_msg.py (TDD red) — packages/vig-utils/tests/test_validate_commit_msg.py — verify: just test-vig-utils shows test failing
Task 4: Implement --subject-only flag and subject_only parameter in validate_commit_message() (TDD green) — packages/vig-utils/src/vig_utils/validate_commit_msg.py — verify: just test-vig-utils passes
Task 5: Create pr-title-check.yml workflow — validates PR title using validate-commit-msg --subject-only on pull_request: opened/edited/synchronize — .github/workflows/pr-title-check.yml — verify: yamllint .github/workflows/pr-title-check.yml
Task 6: Update PR body template to include Refs: # placeholder — .github/pull_request_template.md — verify: visual inspection
Task 7: Update CHANGELOG.md under ## Unreleased — CHANGELOG.md — verify: follows existing format
TDD applies to: Tasks 3–4 (test first, then implementation). TDD skipped for: Tasks 1, 2, 5, 6, 7 (shell scripts, workflow YAML, template, docs — not unit-testable).
Post-merge action: Run setup-gh-repo.sh manually against vig-os/devcontainer since the container won't be recreated just for this change.
Activity
gerchowl commentedon Feb 18, 2026
Implementation Plan
Issue: #79
Branch:
feature/79-auto-merge-commit-messageDesign Decisions (from brainstorm)
gh api:merge_commit_title:MERGE_MESSAGE→PR_TITLE(merge commit subject = PR title)merge_commit_message:PR_TITLE→PR_BODY(merge commit body = PR body)type(scope): description), so the merge commit subject is automatically compliant.Refs:line, ensuring traceability in merge commit body.validate_commit_msg.py(existing logic, no duplication).Tasks
gh-repo-merge-settingsrecipe tojustfile.gh— setsmerge_commit_title=PR_TITLEandmerge_commit_message=PR_BODYviagh api—justfile.gh— verify: recipe parses (just --list --justfile justfile.gh)validate_commit_messagecorrectly validates a PR-title-only string with refs exemption) —packages/vig-utils/tests/— verify:uv run pytestshows test failingvalidate_commit_msg.py—packages/vig-utils/src/vig_utils/validate_commit_msg.py— verify:uv run pytestpassespr-title-check.ymlworkflow that validates the PR title usingvalidate-commit-msgonpull_request: opened/edited/synchronize—.github/workflows/pr-title-check.yml— verify:actionlintor yamllint passesRefs: #at the bottom so merge commit body contains traceability —.github/pull_request_template.md— verify: visual inspectionCHANGELOG.mdunder## Unreleased—CHANGELOG.md— verify: follows existing formatTDD applies to: Tasks 2–3 (test first, then implementation).
TDD skipped for: Tasks 1, 4, 5, 6 (config, workflow YAML, template, docs — not unit-testable).
cc @c-vigo — does this plan look good to you?
c-vigo commentedon Feb 19, 2026
Looks good to me! COuple of points:
pr-title-check.ymlinmainfor this to work right away, not sure.Auto mergehere. Thegh-repo-merge-settingsrecipe should also set this value.gerchowl commentedon Feb 20, 2026
Implementation Plan
Issue: #79
Branch:
feature/79-auto-merge-commit-messageTasks
setup-gh-repo.shscript that configures repo merge settings (merge_commit_title=PR_TITLE,merge_commit_message=PR_BODY,allow_auto_merge=true) viagh api—assets/workspace/.devcontainer/scripts/setup-gh-repo.sh— verify:bash -n assets/workspace/.devcontainer/scripts/setup-gh-repo.shsetup-gh-repo.shintopost-create.sh— call it after git/gh setup —assets/workspace/.devcontainer/scripts/post-create.sh— verify:bash -n assets/workspace/.devcontainer/scripts/post-create.sh--subject-onlymode invalidate_commit_msg.py(TDD red) —packages/vig-utils/tests/test_validate_commit_msg.py— verify:just test-vig-utilsshows test failing--subject-onlyflag andsubject_onlyparameter invalidate_commit_message()(TDD green) —packages/vig-utils/src/vig_utils/validate_commit_msg.py— verify:just test-vig-utilspassespr-title-check.ymlworkflow — validates PR title usingvalidate-commit-msg --subject-onlyonpull_request: opened/edited/synchronize—.github/workflows/pr-title-check.yml— verify:yamllint .github/workflows/pr-title-check.ymlRefs: #placeholder —.github/pull_request_template.md— verify: visual inspectionCHANGELOG.mdunder## Unreleased—CHANGELOG.md— verify: follows existing formatTDD applies to: Tasks 3–4 (test first, then implementation).
TDD skipped for: Tasks 1, 2, 5, 6, 7 (shell scripts, workflow YAML, template, docs — not unit-testable).
Post-merge action: Run
setup-gh-repo.shmanually againstvig-os/devcontainersince the container won't be recreated just for this change.feat(vig-utils): add --subject-only flag to validate-commit-msg
feat(devcontainer): add setup-gh-repo.sh for merge commit settings
ci: add PR title validation workflow
docs: add Refs placeholder to PR template and update changelog
feat: automatic commit message for pull request merge (#79) (#120)
fix: remove issue number from PR title format in pr:create skill
fix: remove issue number from PR title to prevent duplicate refs in m…
chore: release 0.3.0 (#270)