Skip to content

docs: propose issue-assignment requirement for PRs#5386

Open
ocelotl wants to merge 2 commits into
open-telemetry:mainfrom
ocelotl:issue_5385
Open

docs: propose issue-assignment requirement for PRs#5386
ocelotl wants to merge 2 commits into
open-telemetry:mainfrom
ocelotl:issue_5385

Conversation

@ocelotl

@ocelotl ocelotl commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Summary

This implements the process proposed in #5385: PRs should be tied to an issue that has been discussed and assigned before the PR is opened, so our small group of maintainers and approvers can focus review time on changes the community has already agreed are worth making.

It has two parts: documentation of the process in CONTRIBUTING.md, and automation that enforces and maintains it.

Documentation (CONTRIBUTING.md)

Documents the issue/PR-assignment process: anyone can open an issue, an approver/maintainer assigns it once there is consensus, and every PR must reference an issue its author is assigned to. Draft PRs are welcome for illustrating a proposal while it is still being discussed.

require-assigned-issue workflow

Automatically closes PRs that don't reference an issue (via closing keywords or manual linking) the author is assigned to, with a comment pointing to the process. Exemptions:

  • Draft PRs are exempt until marked ready for review.
  • dependabot[bot] and otelbot[bot] are exempt.
  • Maintainers and approvers — anyone with write, maintain or admin permission on the repository — may open PRs without a linked, assigned issue.
  • The do-not-auto-close label keeps any other PR open, but it is a maintainer/approver-only escape hatch: the label is honored only when the person who applied it has write access. When added by anyone else it is automatically removed and has no effect.

Uses pull_request_target (fork PRs need write access to comment/close) and never checks out PR code — it only calls the GitHub API.

unassign-stale-issues workflow

A scheduled workflow (daily) that keeps issue assignments fresh so issues don't get silently reserved forever:

  • When an assigned issue has had no progress for STALE_ASSIGNMENT_WEEKS (default 3 weeks), all assignees are removed and a comment explains why.
  • WARNING_LEAD_WEEKS (default 1 week) before that — i.e. after 2 weeks of inactivity — the assignee is warned with a comment. The warning is posted at most once per stale period (deduped via a hidden marker).
  • "Progress" is any real activity on the issue: a non-bot comment, a linked/cross-referenced PR or commit, or a (re)assignment. The bot's own warning comments are deliberately ignored so they don't reset the clock.
  • Both thresholds live in the workflow's env block so they are easy to change in one place.

Test plan

  • Community discussion/consensus on Proposal for a new process to submit PRs #5385 regarding the process itself
  • Review of the workflow logic (uses pull_request_target; does not check out PR code)
  • Manually verify require-assigned-issue against test PRs: no linked issue, linked-but-unassigned, linked+assigned, draft vs ready-for-review, maintainer author, do-not-auto-close applied by a maintainer vs by a non-maintainer
  • Manually verify unassign-stale-issues via workflow_dispatch against a test issue in the warning window and in the stale window

Fixes #5385

@ocelotl

ocelotl commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

Try out this github action here.

@ocelotl
ocelotl marked this pull request as ready for review July 3, 2026 14:54
@ocelotl
ocelotl requested a review from a team as a code owner July 3, 2026 14:54
ocelotl added 2 commits July 3, 2026 08:55
Requires every PR to reference an assigned issue, closing automatically
otherwise. Motivated by the growing volume of AI-generated PRs making
review unsustainable for the current pool of maintainers/approvers.
Closes PRs automatically that don't reference an issue via GitHub's
closing keywords/manual linking, or whose author isn't assigned to
that issue. Draft PRs and dependabot/otelbot are exempt.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Proposal for a new process to submit PRs

1 participant