Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(ci): add more valid PR title types #2559

Merged
merged 1 commit into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 17 additions & 11 deletions .github/workflows/pull_request_title_lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,29 +23,35 @@ jobs:
# Configure which types are allowed (newline-delimited).
# ref: CONTRIBUTING.md
types: |
build
chore
ci
docs
feat
fix
docs
test
chore
perf
refactor
release
test
# Configure that a scope must always be provided.
requireScope: false
# Configure which scopes are disallowed in PR titles (newline-delimited).
# For instance by setting the value below, `chore(release): ...` (lowercase)
# and `ci(e2e,release): ...` (unknown scope) will be rejected.
# Configure which scopes are disallowed in PR titles.
# These are regex patterns auto-wrapped in `^ $`.
#
# We disable the following scopes:
# - `release` because we have the `release` type
# - UPPERCASE titles because we promote the use of lowercase
disallowScopes: |
release
[A-Z]+
[A-Z_-]+
# Configure additional validation for the subject based on a regex.
# This example ensures the subject doesn't start with an uppercase character.
subjectPattern: ^(?![A-Z]).+$
# Ensures that the subject doesn't start with an uppercase character.
subjectPattern: ^[^A-Z]
# If `subjectPattern` is configured, you can use this property to override
# the default error message that is shown when the pattern doesn't match.
# The variables `subject` and `title` can be used within the message.
subjectPatternError: |
The subject "{subject}" found in the pull request title "{title}"
didn't match the configured pattern. Please ensure that the subject
doesn't start with an uppercase character.
didn't match the configured pattern.
Please ensure that the subject doesn't start with an uppercase character.
The scope should not be in UPPERCASE.
9 changes: 6 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,13 +269,16 @@ The following this convention encourages commit best-practices and facilitates c

The following commit prefixes are supported:

- `build:`, a change that affects the build system or external dependencies
- `chore:`, project housekeeping
- `ci:`, a change that affects CI
- `docs:`, a documentation update
- `feat:`, a new feature
- `fix:`, a bugfix
- `docs:`, a documentation update
- `test:`, a test update
- `chore:`, project housekeeping
- `perf:`, project performance
- `refactor:`, refactor of the code without change in functionality
- `release:`, release of a new version
- `test:`, a test update

Below are examples of well-formatted commits:

Expand Down