Skip to content

chore: reject unsigned commits in PRs #363

chore: reject unsigned commits in PRs

chore: reject unsigned commits in PRs #363

Workflow file for this run

name: Git Checks
on:
- pull_request
jobs:
block-fixup:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Block Fixup Commit Merge
uses: 13rac1/[email protected]
unsigned-commits:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Reject unsigned commits
run: |
set -euo pipefail
unsigned_commits="$(curl -fsSL \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}"\
"${{ github.event.pull_request.commits_url }}" \
| jq '.[] | select(.commit.verification.verified == false) | .sha')"
if [[ -n "$unsigned_commits" ]]; then
echo "Unsigned commits found, please sign them with GPG:"
echo
echo "$unsigned_commits"
exit 1
fi