fix(ci): add DCO sign-off to release PR commits#239
Merged
Conversation
The release workflow creates commits via simple-release-action which doesn't support the --signoff flag. This adds a prepare-commit-msg git hook before the action runs to append the Signed-off-by trailer automatically. Also sets the DCO status check on the release PR commit since the DCO workflow doesn't trigger (GITHUB_TOKEN pushes don't cascade workflow events). Signed-off-by: Rhuan Barreto <rhuan.barreto@gmail.com>
Deploying archgate-cli with
|
| Latest commit: |
0cb04ec
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://eeb0ff5a.archgate-cli.pages.dev |
| Branch Preview URL: | https://fix-release-dco-signoff.archgate-cli.pages.dev |
GitHub's "Update branch" button creates merge commits without a Signed-off-by trailer. These are platform-generated and should not require DCO sign-off. Use `git rev-list --no-merges` to skip them. Signed-off-by: Rhuan Barreto <rhuan.barreto@gmail.com>
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.
Summary
prepare-commit-msggit hook beforesimple-release-actionruns, which appends theSigned-off-bytrailer to the release commit automaticallyDCO Sign-off Check) on the release PR commit, since the DCO workflow doesn't trigger on release PRs (pushes viaGITHUB_TOKENdon't cascade workflow events)Context
PR #237 was blocked because:
simple-release-actionhad noSigned-off-bytrailerpull_requestevents, which don't fire whenGITHUB_TOKENcreates/updates a PRThe
@conventional-changelog/git-client(used by simple-release-action) callsgit commit -m <msg>but doesn't support--signoff. Theprepare-commit-msghook intercepts this and appends the trailer. Note:--no-verifyonly skipspre-commitandcommit-msghooks, notprepare-commit-msg.Test plan
Signed-off-by: github-actions[bot] <...>DCO Sign-off Checkstatus appears as ✓ on the release PR