Skip to content

[Feature] Allow excluded users (ex. bots) in branch protection implementation #220

@TimidRobot

Description

@TimidRobot

Problem

Repositories updated by bots are excluded (reduced security):

EXEMPT_REPOSITORIES:
# special purpose repo
- australian-chapter
# exempted for bot pushes to default branch
- creativecommons.github.io-source
# exempted for bot pushes to default branch
- creativecommons.github.io
# special purpose repo
- global-network-strategy
# special purpose repo
- network-platforms
# exempted for bot pushes to default branch
- quantifying
# special purpose repo
- sre-wiki-js
# special purpose repo
- tech-support

Description

Protections can be maintained with specific users (bots) excluded

In the GitHub GUI, the specific user exclusions look like this, for example:
Screenshot 2024-10-03 at 13 37 05

The script (normalize_repos.py) already handles:

  • Protect matching branches
    • Require a pull request before merging
      • Require approvals

It needs to be updated to also handle (with ability to specify one or more users):

  • Protect matching branches
    • Allow specified actors to bypass required pull requests

Additional context

Implementation

  • I would be interested in implementing this feature.

Metadata

Metadata

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions