From 2d56ca8f842c3902fdd5214de2447a1cf2393628 Mon Sep 17 00:00:00 2001 From: Yuriy Andamasov Date: Sun, 10 May 2026 23:58:30 +0300 Subject: ci: gate skip-notice on opened/reopened only MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CodeRabbit minor finding on the paired canonical PR (VyOS-Networks/vyos-docs-opus-reviewer#14): the `Notify on PR (when skipping)` step posts a fresh `gh pr comment` on every `synchronize` event. On a fork PR to a repo where the AI-validation secrets are not configured, every push during PR iteration would duplicate the skip notice, flooding the conversation thread. Gate the step to fire only on `opened`/`reopened` — those are the moments where the PR author benefits from being told once that validation is skipped. Further pushes add no new information; the workflow-run-page `::notice::` annotation is still emitted on every run for maintainers. `concurrency.cancel-in-progress: true` alone is not sufficient — most synchronize events would be cancelled before the notify step ran, but any run that completed the notify step before the next push still posts the comment. Paired canonical commit: VyOS-Networks/vyos-docs-opus-reviewer@ea88567 --- .github/workflows/ai-validation.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/ai-validation.yml b/.github/workflows/ai-validation.yml index 19ebd9f6..4c1984e6 100644 --- a/.github/workflows/ai-validation.yml +++ b/.github/workflows/ai-validation.yml @@ -172,8 +172,13 @@ jobs: # addition to the workflow ::notice:: annotation (which only appears # on the run page). This way a maintainer reviewing the PR sees the # skip in the same place as other automated review feedback. + # Gate on opened/reopened only — without this guard every push (a + # `synchronize` event) would post a fresh duplicate skip notice, + # flooding the PR conversation on rapid push sequences while the + # secrets stay missing. Open/reopen is the right moment to inform + # the PR author once; further pushes don't add new information. - name: Notify on PR (when skipping) - if: steps.secrets-check.outputs.skip == 'true' + if: steps.secrets-check.outputs.skip == 'true' && (github.event.action == 'opened' || github.event.action == 'reopened') env: GH_TOKEN: ${{ github.token }} run: | -- cgit v1.2.3