Skip to content

Commit de650c8

Browse files
docs: Update CONTRIBUTING.md with contribution requirements and TOC (#5896)
Restructures CONTRIBUTING.md to reflect the new automated PR validation gates and improve navigability. - Merges the previously separate "Submitting Changes" and "Pull Requests" sections into a single "Submitting Changes" section with clear subsections: "Before You Start", "Making Your Contribution", "Pull Request Requirements", "AI Use", and "Automated Checks" - Adds an "Automated Checks" subsection documenting the three gates enforced by the new `close-unvetted-pr.yml` workflow (issue reference, prior discussion, assignee check) - Adds a table of contents for easier navigation Companion to #5895. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 851e94c commit de650c8

File tree

1 file changed

+35
-10
lines changed

1 file changed

+35
-10
lines changed

CONTRIBUTING.md

Lines changed: 35 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,39 @@ We welcome contributions to `sentry-python` by the community.
44

55
This file outlines the process to contribute to the SDK itself. For contributing to the documentation, please see the [Contributing to Docs](https://docs.sentry.io/contributing/) page.
66

7+
## Table of Contents
8+
9+
- [How to Report a Problem](#how-to-report-a-problem)
10+
- [Submitting Changes](#submitting-changes)
11+
- [Development Environment](#development-environment)
12+
- [Running Tests](#running-tests)
13+
- [Debugging](#debugging)
14+
- [Adding a New Integration](#adding-a-new-integration)
15+
- [Releasing a New Version](#releasing-a-new-version)
16+
- [Contributing to Sentry AWS Lambda Layer](#contributing-to-sentry-aws-lambda-layer)
17+
718
## How to Report a Problem
819

920
Please search the [issue tracker](https://github.com/getsentry/sentry-python/issues) before creating a new issue (a problem or an improvement request). Please also ask in our [Sentry Community on Discord](https://discord.com/invite/Ww9hbqr) before submitting a new issue. There are a ton of great people in our Discord community ready to help you!
1021

1122
## Submitting Changes
1223

13-
Before submitting a pull request, please check whether the issue you're planning to address, if there is one, is assigned to anyone. If you want to help with an issue that already has an assignee, comment on it first to coordinate with the person assigned whether the contribution would make sense before opening a pull request.
24+
### Before You Start
25+
26+
1. **Find or create an issue.** Every contribution must be tied to a GitHub issue. If one doesn't exist, open one describing the problem or feature.
27+
2. **Discuss your approach with a maintainer.** Comment on the issue and wait for a maintainer to respond before you start working. This avoids wasted effort on both sides.
28+
3. **Check the assignee.** If the issue is already assigned to someone else, coordinate with them in the issue before starting work.
1429

15-
To make a contribution:
30+
PRs that don't meet these requirements will be automatically closed. See [Automated Checks](#automated-checks) below.
31+
32+
### Making Your Contribution
1633

1734
- Fork the `sentry-python` repo and prepare your changes.
1835
- Add tests for your changes to `tests/`.
1936
- Run tests and make sure all of them pass.
20-
- Submit a pull request, referencing any issues your changes address. Please follow our [commit message format](https://develop.sentry.dev/commit-messages/#commit-message-format) when naming your pull request.
21-
22-
We will review your pull request as soon as possible. Thank you for contributing!
23-
24-
### AI Use
25-
26-
You are welcome to use whatever tools you prefer for making a contribution. However, any changes you propose have to be reviewed and tested by you, a human, first, before you submit a pull request with them for the Sentry team to review. If we feel like that didn't happen, we will close the PR outright. For example, we won't review visibly AI-generated PRs from an agent instructed to look for and "fix" open issues in the repo.
37+
- Submit a pull request, referencing the issue(s) your changes address. Please follow our [commit message format](https://develop.sentry.dev/commit-messages/#commit-message-format) when naming your pull request.
2738

28-
## Pull Requests
39+
### Pull Request Requirements
2940

3041
All PRs must be created as **drafts**. Non-draft PRs will be automatically converted to draft. Mark your PR as "Ready for review" once:
3142

@@ -37,6 +48,20 @@ A PR should do one thing well. Don't mix functional changes with unrelated refac
3748

3849
For the full set of PR standards, see the [code submission standard](https://develop.sentry.dev/sdk/getting-started/standards/code-submission/#pull-requests).
3950

51+
### AI Use
52+
53+
You are welcome to use whatever tools you prefer for making a contribution. However, any changes you propose have to be reviewed and tested by you, a human, first, before you submit a pull request with them for the Sentry team to review. If we feel like that didn't happen, we will close the PR outright. For example, we won't review visibly AI-generated PRs from an agent instructed to look for and "fix" open issues in the repo.
54+
55+
### Automated Checks
56+
57+
To maintain the quality of contributions, we use automated workflows that enforce the following rules for PRs from non-maintainers:
58+
59+
- **Issue reference required.** Your PR body must reference a GitHub issue in the `getsentry` organization (e.g. `#123`, `getsentry/sentry#456`, or a full GitHub issue URL).
60+
- **Prior discussion required.** The referenced issue must show a conversation between you and a maintainer. Opening the issue counts as participation — but a maintainer must have also responded.
61+
- **Respect existing assignees.** If the referenced issue is assigned to someone other than you, the PR will be closed. Coordinate in the issue first.
62+
63+
PRs that don't meet these criteria are automatically closed and labeled `violating-contribution-guidelines`. If your PR was closed by mistake, comment on the issue to discuss with a maintainer and then open a new PR.
64+
4065
## Development Environment
4166

4267
### Set up Python

0 commit comments

Comments
 (0)