This is an automated email from the ASF dual-hosted git repository.
acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push:
new 04d8bd52d .github/workflows/check.yml: Compute the checkpatch range
from the merge base.
04d8bd52d is described below
commit 04d8bd52dad7dc89eadf9a942fedcc4e26c2ad97
Author: Marco Casaroli <[email protected]>
AuthorDate: Thu Oct 15 23:40:09 2026 +0200
.github/workflows/check.yml: Compute the checkpatch range from the merge
base.
The check job checked github.event.pull_request.base.sha..HEAD. HEAD is
the merge commit that GitHub made for the pull request, and that merge
commit can be on an older base than base.sha. checkpatch then diffs the
two endpoints, so every change on master since that older base looks
like a change of the pull request. Old files in that range fail the
check.
Fetch the base branch and check from the merge base of the base branch
and HEAD. This is the same change as apache/nuttx#20696.
Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marco Casaroli <[email protected]>
---
.github/workflows/check.yml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml
index a183d0c12..2d233f741 100644
--- a/.github/workflows/check.yml
+++ b/.github/workflows/check.yml
@@ -48,7 +48,8 @@ jobs:
source .venv/bin/activate
pip install codespell cmake-format black isort flake8 cvt2utf
cd apps
- commits="${{ github.event.pull_request.base.sha }}..HEAD"
+ git fetch origin ${{ github.base_ref }}
+ commits="$(git merge-base origin/${{ github.base_ref }} HEAD)..HEAD"
git log --oneline $commits
echo "../nuttx/tools/checkpatch.sh -c -u -m -g $commits"
../nuttx/tools/checkpatch.sh -c -u -m -g $commits