Skip to content

Allow no-commit-to-branch to block commits based on regex matching #375

Closed
@marcjay

Description

@marcjay

Hopefully not alone in wanting this functionality - our use case is we have multiple release branches (e.g. release/1.0.0, release/2.0.0) and no commits should be made to these branches directly, only via pull requests.

This would be to add wildcard matching, so that with args: [--branch, master, --branch, release/*] it would cause pre-commit to fail if a commit is attempted on any of: master, release/1.0.0 or release/2.0.0

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