Skip to content

Commit

Permalink
feat(subject): no longer prevent commit subjects from starting with a…
Browse files Browse the repository at this point in the history
… capital letter
  • Loading branch information
adyxax committed Aug 11, 2023
1 parent af6ccfc commit 2971507
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 8 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ A brief but meaningfull description of the change.
Here are recommandations for writing your subject:

- use the imperative, present tense: "change" not "changed" nor "changes"
- don't capitalize first letter
- no "." (dot) at the end

### Body
Expand Down
1 change: 0 additions & 1 deletion git-commit-template
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ type(scope): subject
# A brief but meaningful description of the change. Here are some
# recommendation for writing your subject:
# - use the imperative, present tense: "change" not "changed" nor "changes"
# - don't capitalize first letter
# - no "." (dot) at the end

## Body
Expand Down
5 changes: 0 additions & 5 deletions validator.bats
Original file line number Diff line number Diff line change
Expand Up @@ -414,11 +414,6 @@ BROKEN:
[ "$status" -eq $ERROR_SUBJECT ]
}

@test "subject cannot start with a capitalized letter" {
run validate_subject "Plop"
[ "$status" -eq $ERROR_SUBJECT ]
}

@test "subject cannot end with a point" {
run validate_subject "plop."
[ "$status" -eq $ERROR_SUBJECT ]
Expand Down
2 changes: 1 addition & 1 deletion validator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ fi
readonly HEADER_PATTERN="^([^\(]+)\(([^\)]+)\): (.+)$"
readonly TYPE_PATTERN="^(feat|fix|docs|gen|lint|refactor|test|chore)$"
readonly SCOPE_PATTERN="^([a-z][a-z0-9]*)(-[a-z0-9]+)*$"
readonly SUBJECT_PATTERN="^([a-z0-9].*[^ ^\.])$"
readonly SUBJECT_PATTERN="^([A-Za-z0-9].*[^ ^\.])$"
readonly JIRA_PATTERN="[A-Z]{2,6}[0-9]{0,6}-[0-9]{1,6}"
readonly JIRA_FOOTER_PATTERN="^(${JIRA_PATTERN} ?)+$"
readonly JIRA_HEADER_PATTERN="^.*[^A-Z](${JIRA_PATTERN}).*$"
Expand Down

0 comments on commit 2971507

Please sign in to comment.