fix(ci): stop pr-review-poster from spamming REQUEST_CHANGES on every push

Branch protection rules block the GITHUB_TOKEN from dismissing reviews
(HTTP 403), so every push added another undismissable REQUEST_CHANGES
review. PR #27004 accumulated 12 identical blocking reviews.

Switch to COMMENT-only reviews. Findings still show inline on the diff
but don't create blocking reviews that require manual maintainer
dismissal. The CI check status (pass/fail) gates merging, not the
review state.

Also enable CMAKE_TESTING=ON in the clang-tidy build so test files get
proper include paths in compile_commands.json. Without this,
clang-tidy-diff runs on test files from the PR diff but can't resolve
gtest headers, producing false positives.

Fixes #27004

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
This commit is contained in:
Ramon Roche
2026-04-10 13:53:13 -07:00
parent c0a45cef70
commit c515f81298
3 changed files with 33 additions and 18 deletions
+2 -2
View File
@@ -60,7 +60,7 @@ jobs:
if: always() && github.event_name == 'pull_request'
run: |
mkdir -p pr-review
git diff -U0 origin/${{ github.base_ref }}...HEAD \
git diff -U0 origin/${{ github.base_ref }}...HEAD -- ':!*/test/*' \
| clang-tidy-diff-18.py -p1 \
-path build/px4_sitl_default-clang \
-export-fixes pr-review/fixes.yml \
@@ -78,7 +78,7 @@ jobs:
--pr-number "${{ github.event.pull_request.number }}" \
--commit-sha "${{ github.event.pull_request.head.sha }}" \
--out-dir pr-review \
--event REQUEST_CHANGES
--event COMMENT
- name: Upload pr-review artifact
if: always() && github.event_name == 'pull_request'