fix: skip commitlint for PR merge commits

This commit is contained in:
JerrettDavis 2026-04-20 22:52:20 -05:00
parent 043045feb1
commit c6c43f41f1
3 changed files with 22 additions and 3 deletions

11
.github/act/push-merge-pr.json vendored Normal file
View file

@ -0,0 +1,11 @@
{
"ref": "refs/heads/main",
"head_commit": {
"message": "Merge pull request #217 from JerrettDavis/fix/openclaw-local-node-publish\n\nFix OpenClaw GPR package build"
},
"commits": [
{
"message": "Merge pull request #217 from JerrettDavis/fix/openclaw-local-node-publish\n\nFix OpenClaw GPR package build"
}
]
}

View file

@ -215,9 +215,10 @@ jobs:
name: dist
path: dist/
commitlint:
runs-on: ubuntu-latest
steps:
commitlint:
if: github.event_name != 'push' || !startsWith(github.event.head_commit.message, 'Merge pull request ')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

View file

@ -36,3 +36,10 @@ def test_create_release_runs_after_successful_build_even_if_other_publishes_fail
)
assert "always()" in content
assert "needs.build.result == 'success'" in content
def test_ci_commitlint_skips_default_github_merge_commits() -> None:
content = (ROOT / ".github" / "workflows" / "ci.yml").read_text(encoding="utf-8")
assert "github.event_name != 'push'" in content
assert "!startsWith(github.event.head_commit.message, 'Merge pull request ')" in content