diff options
| author | Yuriy Andamasov <yuriy@vyos.io> | 2026-05-10 23:58:30 +0300 |
|---|---|---|
| committer | Yuriy Andamasov <yuriy@vyos.io> | 2026-05-10 23:58:30 +0300 |
| commit | 2d56ca8f842c3902fdd5214de2447a1cf2393628 (patch) | |
| tree | 3607dc66e8b411491ef6bbe773e4eaf2118daf84 | |
| parent | be0085e6697de97de71a8d35855afb13309514f5 (diff) | |
| download | vyos-documentation-2d56ca8f842c3902fdd5214de2447a1cf2393628.tar.gz vyos-documentation-2d56ca8f842c3902fdd5214de2447a1cf2393628.zip | |
ci: gate skip-notice on opened/reopened only
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
| -rw-r--r-- | .github/workflows/ai-validation.yml | 7 |
1 files changed, 6 insertions, 1 deletions
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: | |
