diff options
Diffstat (limited to 'server/sonar-web/src/main/js/api/branches.ts')
-rw-r--r-- | server/sonar-web/src/main/js/api/branches.ts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/server/sonar-web/src/main/js/api/branches.ts b/server/sonar-web/src/main/js/api/branches.ts index 9985a20b04f..0bf62d734b6 100644 --- a/server/sonar-web/src/main/js/api/branches.ts +++ b/server/sonar-web/src/main/js/api/branches.ts @@ -42,3 +42,11 @@ export function deletePullRequest(data: { project: string; pullRequest: string } export function renameBranch(project: string, name: string) { return post('/api/project_branches/rename', { project, name }).catch(throwGlobalError); } + +export function excludeBranchFromPurge(projectKey: string, branchName: string, excluded: boolean) { + return post('/api/project_branches/set_automatic_deletion_protection', { + project: projectKey, + branch: branchName, + value: excluded + }).catch(throwGlobalError); +} |