You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(validate-pr): Rewrite README for v4 advisory mode
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>
Validates non-maintainer pull requests against contribution guidelines.
3
+
Advisory validation for non-maintainer pull requests against contribution guidelines. Posts a single friendly comment when a PR doesn't reference an issue with prior maintainer discussion. **PRs are never closed, and no labels are applied.**
4
4
5
5
## What it does
6
6
7
-
**Validates issue references** — Non-maintainer PRs must reference a GitHub issue where the PR author and a maintainer have discussed the approach. PRs that don't meet this requirement are automatically closed with a descriptive comment.
7
+
For PRs from non-maintainer authors, the action checks that the PR body references a GitHub issue where the PR author and a maintainer have discussed the approach. When that's not the case, the action posts one short advisory comment inviting the contributor to start with an issue. Maintainers (`admin` or `maintain` role) and a hard-coded list of trusted bots are exempt.
8
8
9
-
Maintainers (users with `admin` or `maintain` role) are exempt from validation. When a maintainer reopens a previously closed PR, all checks are skipped — this allows maintainers to override the action's decision.
9
+
Small PRs (< 100 lines changed, excluding lock files) are skipped entirely — typo fixes and tiny bug fixes don't need to go through the issue-discussion loop.
- With optional keywords: `Fixes #123`, `Closes getsentry/repo#123`, etc.
57
77
58
-
A PR is valid if **any** referenced issue passes all checks:
78
+
The PR is considered compliant if **any** referenced issue passes all of:
79
+
59
80
- The issue is fetchable and in a `getsentry` repository
60
-
- If the issue has assignees, the PR author must be one of them
81
+
- If the issue has assignees, the PR author is one of them
61
82
- Both the PR author and a maintainer have participated in the issue discussion
62
83
63
-
## Labels
84
+
If no referenced issue passes, the action posts one advisory comment. The PR remains open and reviewable; no labels or status checks are applied. The comment is idempotent — workflow re-runs on the same PR will not produce duplicates.
85
+
86
+
## Migrating from v3
87
+
88
+
v3 closed non-compliant PRs and applied labels (`violating-contribution-guidelines`, `missing-issue-reference`, `missing-maintainer-discussion`, `issue-already-assigned`). v4 does neither — it only posts a comment.
89
+
90
+
To upgrade, update your workflow:
64
91
65
-
The action creates these labels automatically (they don't need to exist beforehand):
0 commit comments