Skip to content

ci(pr-check): loosen start and middle rules for message [skip ci], for #7513 - #7515

Merged
stasadev merged 1 commit into
ddev:mainfrom
stasadev:20250807_stasadev_pr_title
Aug 7, 2025
Merged

stasadev merged 1 commit into
ddev:mainfrom
stasadev:20250807_stasadev_pr_title

Conversation

@stasadev

@stasadev stasadev commented Aug 7, 2025

Copy link
Copy Markdown
Member

The Issue

Unable to start message with uppercase or quote.
Unable to have , fixes ddev/ddev-mongo#24

How This PR Solves The Issue

Allow at the PR message start:

  • uppercase letter
  • ' single quote
  • " double quote
  • ` backtick

It’s practically impossible to specify all allowed characters, so I added .* in the middle. This made (?:, (?:fixes|for) #\d+)* effectively useless, but I kept it as a hint that the message can end with these.

Manual Testing Instructions

^(build|chore|ci|docs|feat|fix|perf|refactor|style|test)(\([a-z][a-z0-9-]*\))?!?:\s(?!.* )[A-Za-z''"`].*[A-Za-z0-9\]\)''"`](?:, (?:fixes|for) #\d+)*$

https://regex101.com/r/9HTbYi/7

## ✅ Happy Cases (should pass)

### Basic formats
ci(pr): testing pr-checker.yml
feat: Add something [skip ci]
feat: add something (extra)
fix: correct the bug
docs(readme): update installation guide
feat: add new_feature to enhance parsing logic
feat: allow multi-sections in configuration files
fix: handle edge_case with underscores
perf: optimize data-loading-speed
style: fix indentation_issues
test(api): add unit-tests for feature_x
ci(pr): testing pr-checker.yml
feat: handle `'quoted'` terms correctly
feat: support `"double-quoted"` values in config
docs: clarify use of `backticks` in examples
chore(deps): bump "mutagen"
chore(deps): bump `docker-compose`
chore(deps): bump 'docker'
chore(deps): "mutagen" bump
chore(deps): `docker-compose` bump
chore(deps): 'docker' bump
ci(pr-title): allow uppercase, quotes at start; loosen middle content rules
chore(deps): bump "mutagen", `docker-compose`, 'docker', for #123
fix: allow .DS_Store when doing ddev composer create-project [skip ci]
refactor: use `compose-spec/compose-go/v2` for `fixupComposeYaml`
docs: add `.wslconfig` example

### With scope
feat(ui): add button component
fix(auth): handle token expiration
chore(deps): update dependencies to latest
docs(api-docs): improve examples with multi-part keys
feat(parser): allow '`' character in identifiers
fix(format): handle `'apostrophe` edge-cases
style(code): clean up `"double quoted"` formatting

### With breaking change
refactor!: Drop support for Node 12
chore(deps)!: update major version
perf(core)!: overhaul caching mechanism

### With fixes/for references
fix: handle null case, fixes #123
feat: implement feature, for #456
docs: update examples, fixes #123, for #456
fix: resolve issue, for #789, fixes #101
fix(api): patch race condition, fixes #234
feat(storage): add multi-region support, for #567
ci: use `skip-package-name-checks`, pin `golangci-lint` to v2.2.1, remove `only-new-issues`, for #7415
fix(traefik): improve router port discovery and optimize YAML writes, fixes ddev/ddev-mongo#24

### Mixed case messages
feat: add something Important
fix: handle Special Cases
feat: enable feature-request handling
fix: correct multi_section parsing
feat: handle `'Mixed Quoting'` inside message

## ❌ Invalid Cases (should fail)

### Type errors
FEAT: add something
feature: new stuff
: missing type

### Scope errors
feat(UI): component
fix(123): invalid
feat(scope!): invalid

### Description errors
fix: 123 numbers first
docs: 
refactor!!: drop support for Node 12
fix: _starts_with_underscore
feat: ends-with-hyphen-
fix: ends_with_underscore_
feat: multiple  spaces  inside
fix: trailing space 

### Reference format errors
feat: something, Fixes #123
fix: something, fixes#123
docs: something, fixes #abc
fix: something fixes #123
feat: something, for #123, fixes
feat: something, fixes #123, , for #456
feat: something, fixes #, for #456
feat: something, fixes #123, for 456
feat: something, fixes #123, for #

### Structural errors
feat:missing space
feat(some-scope!invalid): description
fix(scope): , fixes #123
fix(scope): fixes #123,
feat(scope): invalid_char$

We lose validation in these cases, but anyway, it's not too important:

feat: something, Fixes #123
fix: something, fixes#123
docs: something, fixes #abc
fix: something fixes #123
feat: something, for #123, fixes
feat: something, fixes #123, , for #456
feat: something, fixes #, for #456
feat: something, fixes #123, for 456

Automated Testing Overview

Release/Deployment Notes

@stasadev
stasadev requested a review from a team as a code owner August 7, 2025 13:26
@stasadev stasadev changed the title ci(pr-title): loosen start and middle rules for message, for #7513 [skip ci] ci(pr-title): loosen start and middle rules for message, for #7513 Aug 7, 2025
@stasadev

stasadev commented Aug 7, 2025 •

Copy link
Copy Markdown
Member Author

Also, the change will allow this PR message, which I can't use right now because of validation error:

ci(pr-check): loosen start and middle rules for message, for #7513 [skip ci]

@stasadev stasadev changed the title ci(pr-title): loosen start and middle rules for message, for #7513 ci(pr-check): loosen start and middle rules for message, for #7513 Aug 7, 2025
@rfay rfay changed the title ci(pr-check): loosen start and middle rules for message, for #7513 ci(pr-check): loosen start and middle rules for message, for #7513 [skip ci] Aug 7, 2025

@rfay rfay left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks, pull when you're happy. If it's not perfect, we'll keep working on it! I changed title to [skip ci] so it wouldn't interrupt the test in progress.

@rfay rfay changed the title ci(pr-check): loosen start and middle rules for message, for #7513 [skip ci] ci(pr-check): loosen start and middle rules for message [skip ci], for #7513 Aug 7, 2025
@stasadev
stasadev merged commit 56a3ea2 into ddev:main Aug 7, 2025
@stasadev
stasadev deleted the 20250807_stasadev_pr_title branch August 7, 2025 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants