Skip to content

Automatically blocking PRs depending on the type of change #122

@gouttegd

Description

@gouttegd

During the PR review on April 1st 2026, the possibility was raised of using a GitHub Action-based mechanism to automatically prevent some PRs from being merged without explicit review.

For reference, here is an example of such an action in the repository for the Uberon anatomy ontology: https://github.com/obophenotype/uberon/blob/master/.github/workflows/check-modified-inferences.yml

The action checks whether the PR it is called on is making any change to the ontology’s logical definitions (EquivalentClasses axioms), and determines how many classes would be affected by the changes. If two many classes would be affected (where “two many” = “more than 10”), then:

  • an automatic review is added to request changes, in effect blocking the PR from being merged until the review is explicitly dimissed;
  • selected members of the Uberon team are being assigned to review.

Another example of such an action has recently been proposed to the repository for the OBO Foundry website: https://github.com/OBOFoundry/OBOFoundry.github.io/pull/2876/changes

(That one is simpler because the type of change it tries to prevent from being merged without review is much simpler to detect: the action just has to grep the diff of the PR for any change that affects a line containing activity_status. But the principle is overall the same.)

@joshmoore
@lubianat

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