ci: Check for signed commits in PR - #6559
Conversation
|
There also used to be a check that the terminal commit of releases was from a specific list of developers so not just that it was signed but who signed it. |
Do you happen to recall where that check was and why it was removed? |
Not exactly, GitHub writes:
Example: #6579 But it's difficult to notice, I agree. Let's implement this workflow in actions, because it might be reused. |
|
If only the most recent commit is unsigned, you can run:
If multiple commits are unsigned, you can run:
If you're new to commit signing, there are different ways to set it up: Sign commits with
|
mathbunnyru
left a comment
There was a problem hiding this comment.
Sign the commits and it will be good to go 🙂
Co-authored-by: Bart <11445373+bthomee@users.noreply.github.com>
High Level Overview of Change
This change adds a CI workflow that checks if all commits are signed.
Context of Change
When commits in a PR are unsigned, we currently only notice it right at the time when we want to merge the PR. This change will immediately notify the author when an unsigned commit has been added, and will provide instructions for how to amend and sign the commit.
Note that the
pull_request_targetevent runs in the context of the default branch of the base repository, rather than in the context of the merge commit, as thepull_requestevent does. This prevents execution of unsafe code from the head of the pull request that could alter the repository or steal any secrets used in the workflow. This also means that this workflow will not run yet as part of this PR, but only going forward once it has been merged.