Skip to content

Check that every PR description starts with Fixes #N for an open issue #4173

Closed

Description

@anth-volk

Every pull request description in the Public API is meant to start with Fixes #ISSUE_NUMBER (rule api.process.pr-tracking-issue), but nothing checks it: the rule is doc-only. Recent PRs show the gap, for example #3776 (the Fixes line is on line 37) and every automated PolicyEngine bundle update, such as #4169, whose description starts with ## Summary.

Add a PR description workflow job, ported from the simulation API's check (PolicyEngine/policyengine-sim-api#862), that runs on every pull request event that can change the description (opened, edited, reopened, synchronize) and fails unless:

  • the first line of the description is exactly Fixes #N; and
  • issue N exists and is open in this repository (looked up with gh api and the job's read-only token).

Then:

  • enforce api.process.pr-tracking-issue with that job, with proof fixtures and tests;
  • make the automated bundle-update PRs open or reuse a tracking issue and start their descriptions with Fixes #N (the daily relock PR already does).

Making the check required on master is a separate repository-settings change after this merges.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions