Repository navigation
ci: require conventional commits and DCO sign-offs - #6
Merged
Merged
Conversation
Signed-off-by: cc <cclonelycc@outlook.com>
ZhouAo-ZA
approved these changes
Oct 11, 2026
pppppppppper
approved these changes
Oct 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Apply the commit policy from EmbodiRun PR #9: Conventional Commits 1.0 subjects, a 72-character subject limit, the same eleven categories, and DCO 1.1 sign-offs matching each commit's author and named human coauthors. PR titles follow the same subject rules. The contribution guide documents categories, scopes, breaking changes, layout, and repair commands; the PR checklist links to the policy.
Add
Commit policyas a separate CI job in its own workflow. It needs only Git and Python's standard library, checks every introduced commit (including contributor-created merges), and reruns on PR edits without rerunning the CPU/lint/docs workflow. It uses the event's actual base/head range and Git's trailer parser; existing main history and GitHub's temporary test-merge commit are excluded.Verification
python -m pytest tests/test_commit_policy.py -q: 20 passed using real temporary Git histories. Covers unsigned earlier commits, author mismatch, invalid/nonterminal trailers, coauthors, merges, invalid messages, PR title/event handling, and missing/empty ranges.ruff check scripts/check_commit_policy.py tests/test_commit_policy.py: passed.ruff format --check scripts/check_commit_policy.py tests/test_commit_policy.py: passed.mkdocs build --strictandmkdocs build --strict -f mkdocs.zh.yml: passed.git diff --check: passed.Hardware: CPU only. Weights: none. Numerical parity: not applicable; no inference, engine, policy, backend, dependency, or lock-file changes.
Rollout
Main's branch protection now requires
Commit policyfrom the GitHub Actions app. The existing two-review requirement, stale-review dismissal, and enforcement for administrators are preserved; this check does not add a requirement for branches to be up to date.Merge this PR to make the workflow available to other PRs. Existing PRs need a fresh policy run (for example, by updating their branch or reopening the PR) and must fix any violations; merged history is not rewritten. Maintainers must retain the contributors' DCO trailers and use compliant final commit messages when squashing, rebasing, or creating a merge commit, since the PR job cannot inspect a future GitHub-generated commit.
Checklist