Skip to content

Commit eadb53c

Browse files
committed
[red] Check the PR head for DCO
Signed-off-by: Viwat Vchirawongkwin <viwat.v@chula.ac.th>
1 parent 2ac4034 commit eadb53c

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

tests/firmware_tests/test_dco_signoff.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@ _ASSERT_NAME="test_dco_signoff"
2626
run() {
2727
require_gate "$DCO_CHECK" "build-smith · tools/ci/dco_check.sh (or confirm GitHub DCO app)" || return 0
2828

29+
# GitHub checks out a synthetic merge commit for pull_request events. The DCO
30+
# range must stop at the contributor-owned PR head, otherwise the unsigned
31+
# GitHub-generated merge commit is incorrectly treated as contributor work.
32+
check "PR DCO range ends at the contributor-owned head SHA" \
33+
grep -Fq 'PYBLE_DCO_RANGE="origin/${{ github.base_ref }}..${{ github.event.pull_request.head.sha }}"' \
34+
"$REPO_ROOT/.github/workflows/ci.yml"
35+
2936
# Build a throwaway repo with one signed and one unsigned commit.
3037
local tmp; tmp="$(mk_tmp)"
3138
git init -q "$tmp"

0 commit comments

Comments
 (0)