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
Copy file name to clipboardExpand all lines: CHANGELOG.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,9 @@
4
4
5
5
### Features
6
6
7
-
- Add validate-pr composite action for validating non-maintainer PRs against contribution guidelines and enforcing draft status ([#153](https://github.com/getsentry/github-workflows/pull/153))
7
+
- Validate PR - Action is advisory: it posts a single friendly comment on community PRs that don't reference an issue with maintainer discussion. PRs are not closed and no labels are applied. Recommended trigger is `types: [opened]`.
8
+
- Validate PR - Skip validation for PRs with fewer than 100 lines changed, excluding common lock files (`Cargo.lock`, `yarn.lock`, `package-lock.json`, `Pipfile.lock`, etc.). Tiny PRs no longer go through the issue-discussion loop.
9
+
- Add validate-pr composite action for validating non-maintainer PRs against contribution guidelines ([#153](https://github.com/getsentry/github-workflows/pull/153))
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.
Pin to a specific commit SHA (consumers in `getsentry/*` already follow this convention). The `pull-requests: write` permission is needed because the action posts comments on the PR.
35
+
34
36
## Inputs
35
37
36
38
| Input | Required | Description |
37
39
|-------|----------|-------------|
38
40
| `app-id` | Yes | GitHub App ID for the SDK Maintainer Bot |
39
41
| `private-key` | Yes | GitHub App private key for the SDK Maintainer Bot |
40
42
41
-
## Outputs
43
+
## Validation rules
42
44
43
-
| Output | Description |
44
-
|--------|-------------|
45
-
| `was-closed` | `'true'` if the PR was closed by validation, unset otherwise |
45
+
### Skipped entirely
46
46
47
-
## Validation rules
47
+
- PR author is in the trusted-bot allowlist (Dependabot, Renovate, Codecov AI, etc.)
48
+
- PR author has `admin`, `maintain`, `push`, or `write` access on the repo
49
+
- PR has fewer than 100 lines changed (`additions + deletions`), excluding common lock files
- 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
+
## Updating from earlier revisions
87
+
88
+
Earlier revisions of this action closed non-compliant PRs and applied labels (`violating-contribution-guidelines`, `missing-issue-reference`, `missing-maintainer-discussion`, `issue-already-assigned`). The current version does neither — it only posts a comment.
89
+
90
+
To update an existing consumer:
64
91
65
-
The action creates these labels automatically (they don't need to exist beforehand):
92
+
- Bump the pinned commit SHA to the latest on `main`.
0 commit comments