Skip to content

fix: allow merge commits in PR validation - #57

Merged
ltclm merged 1 commit into
masterfrom
bug/merge-commit-validation
Sep 16, 2026
Merged

ltclm merged 1 commit into
masterfrom
bug/merge-commit-validation

Conversation

@ltclm

@ltclm ltclm commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

The PR workflow treated merge commits as invalid because it checked only the commit subject text. That made valid Git merge commits fail the Jira/Conventional Commit pattern check.

The validation now ignores commits with more than one parent before applying the pattern, while still validating all normal single-parent commits.

For example the commit checks in this pr are failing with the current code, there are two merge commits in it.
https://github.com/geoadmin/bgdi-scripts/pull/2529/commits

image commit : bb8473ff7d8f53bbce07f5854c8a4454322661b5

seems like merge commits created with the update branch button in the web gui are not whitelisted with the current implementation.

The PR workflow treated merge commits as invalid because it checked only the commit subject text. That made valid Git merge commits fail the Jira/Conventional Commit pattern check.

The validation now ignores commits with more than one parent before applying the pattern, while still validating all normal single-parent commits.
@github-actions github-actions Bot added the bug Something isn't working as expected label Sep 16, 2026
@ltclm
ltclm requested a review from ltshb September 16, 2026 14:52

@ltshb ltshb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be probably good to also add this to swissgeo/.github

@ltclm
ltclm merged commit 612be37 into master Sep 16, 2026
15 checks passed
@ltclm
ltclm deleted the bug/merge-commit-validation branch September 16, 2026 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working as expected

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants