github / github/gh-gei

ADO wildcard branch protection of type `branch/*` needs to change to `branch/**/*`

Open
#1,459 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
C#
Stars
478
Forks
146
Avg merge
7d 21h
Merged PRs (30d)
2

Description

## Description
When wildcard branch protections are created in ADO, they follow a pattern of `branch/*` and that works for all branches like `branch/test`, `branch/test2`, etc. But also for sub-folders like `branch/test/test1`, `branch/mysubfolder/folder1` and other nested sub-folders.

When the branch protection is migrated, it comes across as `branch/*` but on the GitHub side, this will only apply to `branch/test` and not to `branch/test/test1` (won't work if there are nested sub-folders)

So what worked in ADO, because of the way ADO implements branch protection pattern matching, would break in GitHub

While there is no way for GEI to know that there are sub-folders and the pattern needs to change from `branch/*` to `branch/**/*`, we could consider just changing the all the patterns of the form `branch/*` to `branch/**/*`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.