-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: prevent bad commit messages, fix broken builds (#7086)
Signed-off-by: Alex Collins <alex_collins@intuit.com>
- Loading branch information
Showing
5 changed files
with
72 additions
and
25 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,9 +1,16 @@ | ||
Tips: | ||
Don't bother creating a PR until you've done this: | ||
|
||
* [ ] Run `make pre-commit -B` to fix codegen, lint, and commit message problems. | ||
|
||
Create your PR as a draft. | ||
|
||
* Maybe add you organization to [USERS.md](https://github.com/argoproj/argo-workflows/blob/master/USERS.md). | ||
* Your PR needs to pass the required checks before it can be approved. If the check is not required (e.g. E2E tests) it does not need to pass | ||
* Sign-off your commits to pass the DCO check: `git commit --signoff`. | ||
* Run `make pre-commit -B` to fix codegen or lint problems. | ||
* Your PR needs to pass the required checks before it can be approved. If the check is not required (e.g. E2E tests) it | ||
does not need to pass. | ||
* Once required tests have passed, you can make it "Ready for review". | ||
* Say how how you tested your changes. If you changed the UI, attach screenshots. | ||
|
||
Tips: | ||
|
||
* If changes were requested, and you've made them, then dismiss the review to get it looked at again. | ||
* You can ask for help! | ||
* Add you organization to [USERS.md](https://github.com/argoproj/argo-workflows/blob/master/USERS.md) if you like. | ||
* You can ask for help! |
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
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
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
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,14 @@ | ||
#!/bin/sh | ||
set -eu | ||
|
||
grep -q 'Signed-off-by: ' "$1" || { | ||
echo >&2 'Commits must be signed-off: https://probot.github.io/apps/dco/' | ||
exit 1 | ||
} | ||
|
||
grep -qE '^(?:feat|fix|docs|style|refactor|perf|test|chore)\(?(?:\w+|\s|\-|_)?\)?:\s\w+' "$1" || grep -q 'Merge' "$1" || { | ||
echo >&2 'Commit message must be semantic: https://github.com/zeke/semantic-pull-requests' | ||
exit 1 | ||
} | ||
|
||
echo 'Your commit message is acceptable' |