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

chore: fix regex for PR title (DEV-1504) #257

Merged
merged 2 commits into from Nov 17, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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