Skip to content

feat(validate-pr): Make advisory; drop close + labels - #163

Merged
stephanie-anderson merged 7 commits into
mainfrom
feat/validate-pr-v4-advisory
May 4, 2026
Merged

feat(validate-pr): Make advisory; drop close + labels#163
stephanie-anderson merged 7 commits into
mainfrom
feat/validate-pr-v4-advisory

Conversation

@stephanie-anderson

@stephanie-andersonstephanie-anderson commented May 4, 2026

Copy link
Copy Markdown
Contributor

Convert the validate-pr action from enforcing (closes PRs + applies labels) to advisory (single warm comment, no labels, never closes), and add a small-PR bypass that ignores common lock-file churn.

  • Behavior change — non-compliant community PRs receive one friendly comment instead of being closed; no labels are applied. PR remains open and reviewable.
  • Small-PR bypass — PRs with fewer than 100 lines changed (excluding Cargo.lock, yarn.lock, package-lock.json, Pipfile.lock, go.sum, etc.) are skipped entirely.
  • Idempotence guard — workflow re-runs on the same PR will not produce duplicate comments.
  • Drop was-closed output — no longer meaningful.
  • Recommended trigger[opened] only (drop reopened).
  • CHANGELOG cleanup — also corrects the original entry that mentioned "enforcing draft status" (removed in fix(validate-pr): Remove draft enforcement from composite action #159, never shipped).

Consumers pin this action by commit SHA. After this lands, each consumer needs to bump the pinned SHA, change the trigger to [opened], and drop any reads of the was-closed output. Handled separately as a fan-out across the SDK repos.

stephanie-andersonand others added 5 commits May 4, 2026 13:51
- Drop close-on-failure and label application; post a single warm
advisory comment instead.
- Add small-PR bypass: skip validation when a PR has fewer than 100
lines changed, excluding common lock files (Cargo.lock, yarn.lock,
package-lock.json, etc.).
- Remove maintainer-reopen-skip (no longer needed without close logic).
- Add idempotence guard via apps.getAuthenticated() to avoid duplicate
comments on workflow re-runs.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Wrap pulls.listFiles in try/catch with fail-through to validation, so
a transient GitHub API error does not abort the advisory action.
- Tighten the bot-login warning to explain the consequence (the
duplicate-comment guard is disabled for that run).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The advisory action no longer closes PRs, so the was-closed output is
meaningless. Dropping it as part of the v4 behavior change.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Document advisory behavior, the small-PR + lock-file bypass, and the
migration path from v3 (close + labels removed).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Also corrects the original v3-era entry to drop the "enforcing draft
status" language — that part of the feature was removed in #159 and
never shipped in a tagged release.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions

github-actionsBot commented May 4, 2026

Copy link
Copy Markdown
Contributor
Warnings
⚠️Could not load custom Dangerfile: .github/test-dangerfile-curl.js Error: ENOENT: no such file or directory, lstat '/github/workspace/.github/test-dangerfile-curl.js'
Messages
📖Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 5ff4eb8

Comment threadvalidate-pr/scripts/validate-pr.js Outdated
@stephanie-andersonstephanie-anderson changed the title feat(validate-pr): v4 advisory modefeat(validate-pr): advisory modeMay 4, 2026
stephanie-andersonand others added 2 commits May 4, 2026 14:19
…otence
The previous code called github.rest.apps.getAuthenticated() to resolve
the bot login, but that endpoint requires JWT auth — our github client
is authenticated with an installation access token, so the call always
failed. The catch handler then left botLogin null, the idempotence
check was skipped, and re-runs of the workflow could produce duplicate
comments.
Pass the app slug via env var from create-github-app-token's app-slug
output (added in v2 of that action) and construct the bot login as
"<slug>[bot]" directly. No API call needed.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Consumers in getsentry/* pin this action by commit SHA, not by @v* tags
or major-version moving tags. Update the README example and the
"updating earlier revisions" section to reflect that. Drop the
"Breaking changes" framing in the changelog — the action has not
shipped in a tagged release, so calling it a breaking change overstates
the impact.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@stephanie-andersonstephanie-anderson changed the title feat(validate-pr): advisory modefeat(validate-pr): Make advisory; drop close + labelsMay 4, 2026
@stephanie-anderson
stephanie-anderson merged commit 43bf14b into mainMay 4, 2026
25 checks passed
@vaind
vaind deleted the feat/validate-pr-v4-advisory branch May 11, 2026 09:40
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@stephanie-anderson