GitHub - branch protection provider (#179789)

* Initial implementation

* Update default setting state
This commit is contained in:
Ladislau Szomoru
2023-04-12 17:42:51 +02:00
committed by GitHub
parent cc8733af74
commit bb7570f4f8
9 changed files with 184 additions and 2 deletions

View File

@@ -268,6 +268,11 @@ export interface PushErrorHandler {
handlePushError(repository: Repository, remote: Remote, refspec: string, error: Error & { gitErrorCode: GitErrorCodes }): Promise<boolean>;
}
export interface BranchProtectionProvider {
onDidChangeBranchProtection: Event<Uri>;
provideBranchProtection(): Map<string, string[]>;
}
export type APIState = 'uninitialized' | 'initialized';
export interface PublishEvent {
@@ -294,6 +299,7 @@ export interface API {
registerCredentialsProvider(provider: CredentialsProvider): Disposable;
registerPostCommitCommandsProvider(provider: PostCommitCommandsProvider): Disposable;
registerPushErrorHandler(handler: PushErrorHandler): Disposable;
registerBranchProtectionProvider(root: Uri, provider: BranchProtectionProvider): Disposable;
}
export interface GitExtension {