This repository has been archived by the owner on Mar 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ENH: Enforce prefixes for pull request titles (#713)
Enforce prefixes for pull request titles Co-authored-by: Anton Schwaighofer <[email protected]>
- Loading branch information
Showing
3 changed files
with
57 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,18 @@ | ||
Write a detailed description of your PR here. | ||
Please make sure to follow all the tasks in the checklist below. Then, delete this line and write a detailed description of your pull request here. | ||
|
||
Please follow the guidelines for PRs contained [here](docs/pull_requests.md). Checklist: | ||
<!-- | ||
## Guidelines | ||
- [ ] Ensure that your PR is small, and implements one change. | ||
- [ ] Add unit tests for all functions that you introduced or modified. | ||
- [ ] Run PyCharm's code cleanup tools on your Python files. | ||
- [ ] Link the correct GitHub issue for tracking. | ||
- [ ] When merging your PR, replace the default merge message with a description of your PR, | ||
and if needed a motivation why that change was required. | ||
Please follow the guidelines for pull requests (PRs) in [CONTRIBUTING](/docs/contributing.md). Checklist: | ||
- Ensure that your PR is small, and implements one change | ||
- Give your PR title one of the prefixes ENH, BUG, STYLE, DOC, DEL to indicate what type of change that is (see [CONTRIBUTING](/docs/contributing.md)) | ||
- Link the correct GitHub issue for tracking | ||
- Add unit tests for all functions that you introduced or modified | ||
- Run automatic code formatting / linting on all files ("Format Document" Shift-Alt-F in VSCode) | ||
## Change the default merge message | ||
When completing your PR, you will be asked for a title and an optional extended description. By default, the extended description will be a concatenation of the individual | ||
commit messages. Please DELETE/REPLACE that with a human readable extended description for non-trivial PRs. | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: 'Check pull request title' | ||
on: | ||
pull_request: | ||
types: [edited, opened, synchronize, reopened] | ||
|
||
jobs: | ||
title-check: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.pull_request.user.login != 'dependabot[bot]' }} | ||
steps: | ||
- uses: naveenk1223/action-pr-title@master | ||
with: | ||
regex: '^[A-Z]+\:\s[A-Z].+[^\.]$' # Regex the title should match. | ||
allowed_prefixes: 'ENH,BUG,STYLE,DOC,DEL' # title should start with the given prefix | ||
prefix_case_sensitive: true # title prefixes are case ensitive | ||
min_length: 10 # Min length of the title | ||
max_length: 72 # Max length of the title |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters