]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Require an "open for pull requests" issue label on PRs main
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 10 Aug 2026 22:27:41 +0000 (18:27 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 10 Aug 2026 22:27:41 +0000 (18:27 -0400)
Replace the pull request template with the new contribution policy: a pull
request must reference an issue in this repo that is open and carries the
"open for pull requests" label, or it is closed automatically.

The rule is deliberately without exceptions, including for documentation and
typo fixes, which the previous template explicitly waved through.  A rule with
exceptions is a rule that gets argued about on every pull request that lands
near the boundary, and the argument costs more than labeling a two line issue
does.  CONTRIBUTING describes the process and what each of the issue labels
means for a contributor.

The issue templates gain a note pointing at the same policy, so the
expectation is set when the issue is opened rather than when the pull request
is closed.

The gate is implemented as a github webhook handler in publishthing
(publishthing.apps.prgate), configured per project from build_ln.

Change-Id: Id24e6542b9953b2916e7654ee9859932d4af1bff

.github/CONTRIBUTING.md
.github/ISSUE_TEMPLATE/bug_report.yaml
.github/ISSUE_TEMPLATE/typing.yaml
.github/ISSUE_TEMPLATE/use_case.yaml
.github/pull_request_template.md

index 7c4dcf5191105ddf4a9bedd88912c641056471bb..c62ec003848ff5fdbef28619e4eaaa17b0e893c4 100644 (file)
@@ -3,6 +3,44 @@
 For general developer guidelines, please see out current Developer Guide at
 [Develop](https://www.sqlalchemy.org/develop.html).
 
+## Pull requests require an approved issue ##
+
+**We accept pull requests only for issues that a maintainer has marked with
+the `open for pull requests` label.**  A pull request that doesn't reference
+such an issue is closed automatically, by a bot, as soon as it's opened.
+
+The reason is that the vast majority of unsolicited pull requests are
+solutions to a problem we haven't agreed on yet, and reviewing them costs far
+more than writing them does.  Settling the approach on the issue first means
+nobody writes code that was never going to be merged.
+
+The process is:
+
+1. **Open an issue** describing the problem or the feature, with a complete,
+   runnable example.  For a bug, that means a script we can run that shows the
+   wrong behavior.
+2. **Wait for a maintainer** to look at it.  If we agree the change is wanted
+   and that an outside contribution is the right way to get it, we add the
+   `open for pull requests` label.
+3. **Then open the pull request**, referencing the issue.
+
+Some labels you'll see on issues, and what they mean for contributors:
+
+| label | meaning |
+| --- | --- |
+| `open for pull requests` | we'd welcome a pull request for this |
+| `code review in progress` | someone is already working on it, in a pull request or directly in gerrit |
+| `NO pull requests please` | we're handling this one ourselves; please don't |
+
+An issue with none of these labels hasn't been decided on yet.  Asking on the
+issue is fine; opening a pull request to make the case is not, and it will be
+closed.
+
+This applies to documentation and typo fixes too.  We know that feels heavy
+for a one-line change, but the alternative is a rule with exceptions that have
+to be argued about, and we'd rather have one rule.  A typo is a two-line issue
+and we'll label it quickly.
+
 ## Note on use of AI, agents and bots ##
 
 Some of us here use large language models (LLM) to help us with our work, and
index d72ed558b93bb5bd36f1e5825645b68a1475a738..25102169d38340ec1107ce494beadac6ade82161 100644 (file)
@@ -161,6 +161,15 @@ If the message is a warning, run your program with the ``-Werror`` flag:   ``pyt
     validations:
       required: false
 
+  - type: markdown
+    attributes:
+      value: "
+**Thinking of submitting a pull request for this?**  Please wait until a
+maintainer has added the `open for pull requests` label to this issue.  Pull
+requests that don't reference an issue carrying that label are closed
+automatically.
+"
+
   - type: markdown
     attributes:
       value: "**Have a nice day!**"
index bf21a5f0748644f76a876c760443b72c0ac1b23c..af8f26337e39d72666ba3e1750d4010eae6a5ba8 100644 (file)
@@ -85,6 +85,15 @@ If you need help creating one, you can model yours after the MCV code shared in
     validations:
       required: false
 
+  - type: markdown
+    attributes:
+      value: "
+**Thinking of submitting a pull request for this?**  Please wait until a
+maintainer has added the `open for pull requests` label to this issue.  Pull
+requests that don't reference an issue carrying that label are closed
+automatically.
+"
+
   - type: markdown
     attributes:
       value: "**Have a nice day!**"
index 987000254d53ccb868b3c606b00711a247ddeda9..f926b3d168d5e435967a13d29db6ef5637c87130 100644 (file)
@@ -33,6 +33,15 @@ body:
     validations:
       required: false
 
+  - type: markdown
+    attributes:
+      value: "
+**Thinking of submitting a pull request for this?**  Please wait until a
+maintainer has added the `open for pull requests` label to this issue.  Pull
+requests that don't reference an issue carrying that label are closed
+automatically.
+"
+
   - type: markdown
     attributes:
       value: "**Have a nice day!**"
index 4d6d7fb8d305235aa40a745fdf1936f9d2778676..a09214bbb9b2104315e86ab782092a95e1550e92 100644 (file)
@@ -1,27 +1,33 @@
 <!-- Provide a general summary of your proposed changes in the Title field above -->
 
+**This project accepts pull requests only for issues that a maintainer has
+marked with the `open for pull requests` label.**
+
+A pull request that doesn't reference such an issue **is closed
+automatically**. That isn't a judgment on your change: it's how we settle on
+an approach before anyone spends time writing code, and how we keep two
+people from doing the same work at once.
+
+The issue you reference has to be:
+
+* in this repository,
+* open,
+* labeled `open for pull requests`, and
+* not already labeled `code review in progress`, which means someone is
+  working on it already.
+
+If there's no such issue yet, open one describing the problem or the feature,
+including a complete, runnable example, and wait for a maintainer to add the
+label. Please don't open a pull request first and ask for the label
+afterwards.
+
+### Fixes
+
+<!-- Put the issue number after the "#" below, e.g. "Fixes: #1234".
+     Leaving this blank means this pull request will be closed. -->
+
+Fixes: #
+
 ### Description
-<!-- Describe your changes in detail -->
-
-### Checklist
-<!-- go over following points. check them with an `x` if they do apply, (they turn into clickable checkboxes once the PR is submitted, so no need to do everything at once)
-
--->
-
-This pull request is:
-
-- [ ] A documentation / typographical / small typing error fix
-       - Good to go, no issue or tests are needed
-- [ ] A short code fix
-       - please include the issue number, and create an issue if none exists, which
-         must include a complete example of the issue.  one line code fixes without an
-         issue and demonstration will not be accepted.
-       - Please include: `Fixes: #<issue number>` in the commit message
-       - please include tests.   one line code fixes without tests will not be accepted.
-- [ ] A new feature implementation
-       - please include the issue number, and create an issue if none exists, which must
-         include a complete example of how the feature would look.
-       - Please include: `Fixes: #<issue number>` in the commit message
-       - please include tests.
-
-**Have a nice day!**
+
+<!-- Describe your changes in detail. -->