Skip to content

Commit

Permalink
chore: fix regex for PR title (DEV-1504) (#257)
Browse files Browse the repository at this point in the history
  • Loading branch information
jnussbaum committed Nov 17, 2022
1 parent 1dc8483 commit d4feb68
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
5 changes: 1 addition & 4 deletions .github/pull_request_template.md
Expand Up @@ -3,10 +3,7 @@
Important! Please follow the guidelines for naming Pull Requests:
https://docs.dasch.swiss/latest/developers/dsp/contribution/#pull-request-guidelines

**Note:** When squash-merging a PR into the main branch, the PR title will be taken as squash-merge commit message that
appears in the main branch. But this automatism only works for PRs that consist of more than one commit. If a PR consists
of *only one* commit, GitHub will take the name of the commit as squash-merge-commit message. In this case, you have to
manually ensure that the squash-merge commit message is identical to the PR title.
**Note:** When squash-merging a PR into the main branch, the PR title will be taken as squash-merge commit message that appears in the main branch. But this automatism only works for PRs that consist of more than one commit. If a PR consists of *only one* commit, GitHub will take the name of the commit as squash-merge-commit message. In this case, you have to manually ensure that the squash-merge commit message is identical to the PR title.

===REMOVE===

Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/check-pr-title.yml
Expand Up @@ -9,12 +9,11 @@ jobs:
name: Check PR Title
runs-on: ubuntu-latest
steps:
# check PR title
- uses: deepakputhraya/action-pr-title@master
with:
regex: '([a-z])+(\(([0-9a-z\-_, ])+\))?!?: [a-z].+\(DEV-\d+\)$' # Regex the title should match.
allowed_prefixes: "fix,refactor,feat,docs,chore,style,test" # title should start with the given prefix
disallowed_prefixes: "feature,hotfix" # title should not start with the given prefix
prefix_case_sensitive: true # title prefix are case insensitive
min_length: 7 # Min length of the title
max_length: 120 # Max length of the title
regex: '[a-z]+(\([0-9a-z\-_, ]+\))?!?: [a-z].+\(DEV-\d+\)$|chore: release \d+\.\d+\.\d+$'
allowed_prefixes: "fix,refactor,feat,docs,chore,style,test"
disallowed_prefixes: "feature,hotfix"
prefix_case_sensitive: true
min_length: 7
max_length: 120

0 comments on commit d4feb68

Please sign in to comment.