Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .config/ci/check_commits.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@
# We copy Wireshark's contributing guide, thanks to them for the idea !
# This script is inspired by https://gitlab.com/wireshark/wireshark/-/blob/master/.gitlab-ci.yml

commits=$(git rev-list --no-merges --after="2026-01-00T00:00:00" --max-count=$((PR_FETCH_DEPTH - 1)) HEAD)
# On pull_request, actions/checkout creates a merge of the PR into the base
# branch (HEAD^1=base tip, HEAD^2=PR tip). Restrict the check to PR commits
# so base-branch history is not false-failed for missing trailers.
if git rev-parse -q --verify HEAD^2 >/dev/null 2>&1; then
commits=$(git rev-list --no-merges HEAD^1..HEAD^2)
else
commits=$(git rev-list --no-merges --after="2026-01-00T00:00:00" --max-count=$((PR_FETCH_DEPTH - 1)) HEAD)
fi
if [ -z "$commits" ]; then
echo "No commit to check in PR. OK."
exit 0
Expand Down
Loading