From 06dd47550fc5f8bcc6ba854d7a7cfb1d0d8af0d5 Mon Sep 17 00:00:00 2001 From: Jacob Dahl <37091262+dakejahl@users.noreply.github.com> Date: Fri, 12 Jun 2026 13:31:36 -0600 Subject: [PATCH] ci(flash-analysis): skip PR comment when flash delta is zero (#27660) #27473 removed the +/-50 byte threshold so small deltas were no longer suppressed, but that also made zero-impact PRs get a comment. Restore suppression only for exactly 0-byte deltas on all targets. An existing comment is still always updated so it never goes stale. Signed-off-by: Jacob Dahl --- .github/workflows/flash_analysis.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/flash_analysis.yml b/.github/workflows/flash_analysis.yml index 2b0f9784f2c..0798bd4d08b 100644 --- a/.github/workflows/flash_analysis.yml +++ b/.github/workflows/flash_analysis.yml @@ -155,12 +155,26 @@ jobs: V6X-SUMMARY-MAP-PERC: ${{ fromJSON(fromJSON(needs.analyze_flash.outputs.px4_fmu-v6x-bloaty-summary-map).vm-percentage) }} if: github.event.pull_request steps: + - name: Find Comment + uses: peter-evans/find-comment@v4 + id: fc + with: + issue-number: ${{ github.event.pull_request.number }} + comment-author: 'github-actions[bot]' + body-includes: '' + - name: Set Build Time id: bt run: | echo "timestamp=$(date +'%Y-%m-%dT%H:%M:%S')" >> $GITHUB_OUTPUT - name: Write pr-comment artifact + # Skip only when the diff is exactly 0 bytes on all targets and no comment exists yet. + # This can't be moved to the job-level conditions, as GH actions don't allow a job-level if condition to access the env. + if: | + steps.fc.outputs.comment-id != '' || + env.V5X-SUMMARY-MAP-ABS != 0 || + env.V6X-SUMMARY-MAP-ABS != 0 run: | mkdir -p pr-comment cat > pr-comment/manifest.json <