Skip to content

Conversation

@jsquyres
Copy link
Member

See individual git commit messages.

Amusingly, we have to say "not a cherry pick" on this PR because one of the commits is a standalone commit (not a cherry pick) to enable the mandatory cherry pick checker on this branch. Also, the commit message from the initial github action commit contains some fake cherry pick messages, which causes the checker to fail the test (because the commits they refer to do not exist).

bot:notacherrypick

@jsquyres
Copy link
Member Author

An equivalent PR was just merged on the v4.1.x branch (#8482); if everything is ok over there after a while, we can merge this one.

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)
Signed-off-by: Jeff Squyres <jsquyres@cisco.com>
(cherry picked from commit d4d1bcf)
Signed-off-by: Jeff Squyres <jsquyres@cisco.com>
(cherry picked from commit 2f042fb)
@jsquyres jsquyres force-pushed the pr/v4.0.x/git-commit-checker-github-action branch from fba514d to 25eef97 Compare February 18, 2021 20:18
@jsquyres
Copy link
Member Author

This got replaced by (functionally identical) #8663.

@jsquyres jsquyres closed this Mar 22, 2021
@jsquyres jsquyres deleted the pr/v4.0.x/git-commit-checker-github-action branch March 22, 2021 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant