GitHub - leveral repository rules for branch protection (#180416)

* WIP - switching to use repository ruleset information

* Handle includes

* Refactor to add support for exclusion

* Fix exclude condition

* Fix request string

* Add logging

* Update setting description
This commit is contained in:
Ladislau Szomoru
2023-04-20 16:43:42 +02:00
committed by GitHub
parent 3f6a54de51
commit 5ea57c3b48
7 changed files with 182 additions and 46 deletions

View File

@@ -42,7 +42,7 @@ export class GitBranchProtectionProvider implements BranchProtectionProvider {
.map(bp => typeof bp === 'string' ? bp.trim() : '')
.filter(bp => bp !== '');
this.branchProtection = { remote: '', branches };
this.branchProtection = { remote: '', rules: [{ include: branches }] };
this._onDidChangeBranchProtection.fire(this.repositoryRoot);
}