Skip to content

Add a GitHub action to enforce branch names are of a known format #339

Open
@jeffngo

Description

@jeffngo

Is your feature request related to a problem? Please describe.
The virtualization-sdk is using GitFlow as a branching strategy. We configured a set of branch protection rules for the following branches:
projects/**
docs/**
dependabot//
hotfix/**
gh-pages
release
master
develop

We used to have a / catch all rule that applies a rule to every branch that matched that regex. We've removed that check and now it's possible for people to push to the virtualization under a different branch prefix that has no protection. We should enforce that branches which are created outside of these accepted formats are rejected on creation. We would like to avoid branches that are created based on the user's discretion (i.e. abc/**).

Describe the solution you'd like
Run a GitHub action each time a new branch is created in the delphix/virtualization-sdk repository. Only allow branches to be created if they follow a format that we expect.

Describe alternatives you've considered

Additional context
Perhaps also include in a README-dev.md section that we expect branch names to be of a certain format.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions