Skip to content

Commit ebdafbe

Browse files
tzssangglasszhuizhuhaomeng
authored andcommitted
tests: fix the PR title check broken by the action bump to v6.1.1
Since v6.1.0 each line of the `types` input is treated as a regex pattern auto-wrapped in `^ $` (amannn/action-semantic-pull-request#292), so the trailing "# comment" became part of the pattern: the line "bugfix # bug fixes" means regex ^bugfix # bug fixes$, which can never match the type token in a PR title. Every PR has failed the "Lint PR" check since the bump in db281a3. Under @v4 the input was split on whitespace into plain strings, so "bugfix # bug fixes" accidentally yielded the bare token "bugfix", which matched. That accidental tolerance is gone in v6. Fix: list each type as one bare line on the strip block scalar (`|-`), as the v6 docs describe and as other repos pinning the same v6.1.1 SHA do: https://github.com/projen/projen/blob/main/.github/workflows/pull-request-lint.yml#L23-L30
1 parent db281a3 commit ebdafbe

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

‎.github/workflows/semantic-pull-request.yml‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ jobs:
1818
with:
1919
# Configure which types are allowed.
2020
# Default: https://github.com/commitizen/conventional-commit-types
21-
types: |
22-
bugfix # bug fixes
23-
change # backward incompatible changes
24-
doc # documentation changes including code comments
25-
editor # code editor related configurations
26-
feature # implementing a new feature
27-
optimize # performance optimizations
28-
refactor # code refactoring and other code rearrangement
29-
style # coding style changes
30-
tests # test suite changes
21+
types: |-
22+
bugfix
23+
change
24+
doc
25+
editor
26+
feature
27+
optimize
28+
refactor
29+
style
30+
tests

0 commit comments

Comments
 (0)