v4.0.x: GitHub Action git commit checker#8663
Merged
gpaulsen merged 4 commits intoopen-mpi:v4.0.xfrom Mar 22, 2021
Merged
Conversation
added 4 commits
March 21, 2021 08:32
This will replace the old "Signed-off-by checker" and "Commit email
checker". Both of those checks are now subsumed into this Github
Action, and we also introduce a new functionality: checking the
"cherry picked from commit xyz" messages (slightly obfuscated here in
the commit message so that it does not cause the test to fail!).
1. If a `cherry picked from commit abc123` message is found in a git
commit message, verify that that commit actually exists in the main
Open MPI repo. If it doesn't, fail the CI test.
2. The config file in the git repo
`.github/workflows/git-commit-checks.json` indicates whether
cherry-pick messages are _required_ in commit messages.
1. The contents of that file on the target branch determine
whether cherry pick messages are required on that branch or
not. Meaning: we'll set the contents of that file to _not_
require cherry pick messages on master. When we branch for
releases, we change that config file on the new branch to
require cherry pick messages.
2. When cherry pick messages are required and the PR contains
commits that do not have cherry pick messages, fail the CI
test.
3. When cherry-pick messages are required, Reverts, Merge commits,
and commits that are entirely comprised of submodule updates
are explicitly excluded from this requirement. Example:
1. A PR is created to a target branch with the cherry pick
message requirement is enabled.
2. The PR branch contains commits with `(cherry picked from
commit ....)` messages, and the commit hashes mentioned all
exist on master.
3. The PR branch contains a Revert commit.
4. The PR branch contains a Merge commit.
5. The CI test will pass.
4. If a magic token is present in the PR description (e.g.,
`bot:notacherrypick`), then the requirement for cherry pick
messages is disabled for all commits on that PR.
Signed-off-by: Jeff Squyres <jsquyres@cisco.com>
(cherry picked from commit f54b614)
(cherry picked from commit bf62e33)
Signed-off-by: Jeff Squyres <jsquyres@cisco.com> (cherry picked from commit 2f042fb)
bwbarrett
approved these changes
Mar 22, 2021
Member
|
@jsquyres please remind me how this is suppose to work with non-cherry-picked commits? Do I need to add a key-word or phrase in the commit message? |
Member
Author
In the main description of the PR (not an arbitrary comment), put |
hppritcha
approved these changes
Mar 22, 2021
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bring the new GitHub Action git commit checker to the v4.0.x branch (these are cherry-picked from the v4.1.x branch).
Cherry picks will be required when this PR is merged (just like the v4.1.x branch).