Writing here so we don't forget.
See https://github.com/qualcomm/commit-msg-check-action for an example implementation.
We can use ${{ github.event.pull_request.base.sha }} and ${{ github.event.pull_request.head.sha }} to get the commitish ranges to do a git log between, and then simply count the number of commit messages and the number of Signed-off-by statements to ensure they match.
This also provides us with a mechanism to do any other basic commit sanity checks we may wish to do.
Writing here so we don't forget.
See https://github.com/qualcomm/commit-msg-check-action for an example implementation.
We can use
${{ github.event.pull_request.base.sha }}and${{ github.event.pull_request.head.sha }}to get the commitish ranges to do agit logbetween, and then simply count the number of commit messages and the number of Signed-off-by statements to ensure they match.This also provides us with a mechanism to do any other basic commit sanity checks we may wish to do.