Files
upstream-nats-server/.github/workflows/pull-requests.yml
upstream-mirror 709385cbaa
Some checks failed
NATS Server Tests / Lint (push) Failing after 3s
NATS Server Tests / Build (Latest Go) (push) Has been skipped
NATS Server Tests / Build (Minimum Go) (push) Has been skipped
NATS Server Tests / Build (Minimum Go, windows-2022) (push) Has been skipped
NATS Server Tests / Build (Minimum Go, windows-2025) (push) Has been skipped
NATS Server Tests / Test Stores (push) Has been skipped
NATS Server Tests / Test JetStream (push) Has been skipped
NATS Server Tests / Test Raft (push) Has been skipped
NATS Server Tests / Test JetStream Consumers (push) Has been skipped
NATS Server Tests / Test JetStream Cluster 1 (push) Has been skipped
NATS Server Tests / Test JetStream Cluster 2 (push) Has been skipped
NATS Server Tests / Test JetStream Cluster 3 (push) Has been skipped
NATS Server Tests / Test JetStream Cluster 4 (push) Has been skipped
NATS Server Tests / Test JetStream Supercluster (push) Has been skipped
NATS Server Tests / Test No-Race 1 (push) Has been skipped
NATS Server Tests / Test No-Race 2 (push) Has been skipped
NATS Server Tests / Test MQTT (push) Has been skipped
NATS Server Tests / Test Message Tracing (push) Has been skipped
NATS Server Tests / Test JWT (push) Has been skipped
NATS Server Tests / Test Remaining Server Tests (push) Has been skipped
NATS Server Tests / Test Other Packages (push) Has been skipped
Vulnerability Scan / govulncheck (push) Failing after 12m2s
snapshot of https://github.com/nats-io/nats-server.git (main, 2026-09-15; blobs > 131072B omitted)
2026-09-15 20:16:01 +05:00

60 lines
1.8 KiB
YAML

name: NATS Server PRs
on:
pull_request_target:
types: [opened, synchronize, reopened, ready_for_review]
workflow_dispatch:
permissions:
contents: read
pull-requests: write
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
signoffs:
name: Sign-offs
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number }}
BASE_SHA: ${{ github.event.pull_request.base.sha }}
steps:
- name: Checkout base repository
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Fetch PR head
run: |
set -euo pipefail
git fetch --no-tags origin "$BASE_SHA" "pull/${PR_NUMBER}/head:pr-head"
- name: Check all PR commits are signed off
run: |
set -euo pipefail
range="${BASE_SHA}..pr-head"
missing=0
missing_list=""
while read -r c; do
msg="$(git log -1 --pretty=%B "$c")"
if ! printf '%s\n' "$msg" | grep -q '^Signed-off-by:'; then
echo "::error ::Commit $c has not been signed off"
missing=1
missing_list+=$'\n- '"$c"
fi
done < <(git rev-list --no-merges "$range")
if [ "$missing" -ne 0 ]; then
body="$(printf 'Please review the `CONTRIBUTING.md` guide as some commits are missing `Signed-off-by:` in their commit messages.\n\nTo correct, please amend the following commits and force-push:\n\n%s' "$missing_list")"
gh pr comment "$PR_NUMBER" --repo "$GITHUB_REPOSITORY" --body "$body"
exit 1
fi