This is an automated email from the ASF dual-hosted git repository.
janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
The following commit(s) were added to refs/heads/master by this push:
new ac51b3029 ci: Improve workflow check to diff against merge-base
ac51b3029 is described below
commit ac51b3029c6900dc333dffcfc14f401295f87cd9
Author: Szymon Czapracki <[email protected]>
AuthorDate: Tue Jun 24 11:13:29 2025 +0200
ci: Improve workflow check to diff against merge-base
Updated the compliance workflow to diff against the merge-base of HEAD
and origin/master, ensuring only changes introduced in the PR are checked.
Also replaced clang-format-diff with clang-format-diff.py
for more reliable multi-file support.
---
.github/workflows/check_compliance.yml | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/check_compliance.yml
b/.github/workflows/check_compliance.yml
index 81910c0d2..9b9deb230 100644
--- a/.github/workflows/check_compliance.yml
+++ b/.github/workflows/check_compliance.yml
@@ -46,8 +46,9 @@ jobs:
run: |
set +e
INFO_URL="https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md"
- git diff -U0 origin/master...HEAD > diff.patch
- clang-format-diff -p1 -style=file < diff.patch > clang-fmt.patch
+ GIT_BASE=$(git merge-base origin/master HEAD)
+ git diff -U0 "$GIT_BASE"...HEAD > diff.patch
+ clang-format-diff.py -p1 -style=file < diff.patch > clang-fmt.patch
if [ -s clang-fmt.patch ]; then
echo "Code formatting issues found:"
cat clang-fmt.patch