Skip to content

ci: require conventional commits and DCO sign-offs - #6

Merged
anHappyDog merged 1 commit into
mainfrom
ci/commit-policy
Oct 12, 2026
Merged

anHappyDog merged 1 commit into
mainfrom
ci/commit-policy

Conversation

@anHappyDog

@anHappyDog anHappyDog commented Oct 10, 2026 •

Copy link
Copy Markdown
Collaborator

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 policy as 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 --strict and mkdocs build --strict -f mkdocs.zh.yml: passed.
  • git diff --check: passed.
  • GitHub CI: 566 passed, 93 skipped; lint and strict EN/ZH documentation builds passed.
  • Live negative title check: an invalid PR title failed as expected; restoring the compliant title passed. Only the independent policy workflow reran on these edits.

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 policy from 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

  • The PR title and introduced commit follow the policy and have the author's DCO sign-off.
  • Contribution is licensed under Apache-2.0.
  • Existing CPU/lint/docs jobs are unchanged; only the requested independent policy job is added.

Signed-off-by: cc <cclonelycc@outlook.com>
@anHappyDog anHappyDog changed the title ci: require conventional commits and DCO sign-offs Update commit policy Oct 10, 2026
@anHappyDog anHappyDog changed the title Update commit policy ci: require conventional commits and DCO sign-offs Oct 10, 2026
@anHappyDog
anHappyDog merged commit ee8dc7d into main Oct 12, 2026
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants