【发布时间】:2022-01-08 23:22:33
【问题描述】:
我正在使用 ADO API 调用为使用 ADO API 的分支创建 REPO 和相关治理。看看我的 repo.yml 有所有 API 细节。 在创建回购时;我从中得到“master”和“develop”分支。但是主分支设置为默认分支。我想将开发分支设为默认。我怎样才能做到这一点?什么是正确的 API?
---
branches:
-
master:
bypass: false
content:
- placeholder.txt
policies:
-
merge:
id: -3
isBlocking: true
isDeleted: false
isEnabled: true
settings:
allowNoFastForward: true
allowRebase: false
allowRebaseMerge: true
allowSquash: false
scope:
-
matchKind: Exact
refName: refs/heads/master
repositoryId: ~
useSquashMerge: true
type: ~
url: ""
-
approval_count:
id: -2
isBlocking: true
isDeleted: false
isEnabled: true
settings:
allowDownvotes: false
creatorVoteCounts: false
minimumApproverCount: 1
resetOnSourcePush: true
scope:
-
matchKind: Exact
refName: refs/heads/master
repositoryId: ~
type: ~
url: ""
-
build:
id: -250
isBlocking: true
isDeleted: false
isEnabled: true
settings:
buildDefinitionId: 1
displayName: "Main Pipeline"
manualQueueOnly: false
queueOnSourceUpdateOnly: true
scope:
-
matchKind: Exact
refName: refs/heads/master
repositoryId: ~
validDuration: 0
type: ~
url: ""
-
example:
id: -4
isBlocking: true
isDeleted: false
isEnabled: true
settings:
addedFilesOnly: false
filenamePatterns: []
ignoreIfSourceIsInScope: false
message: ""
requiredReviewerIds: 1
scope:
-
matchKind: Exact
refName: refs/heads/master
repositoryId: ~
type: ~
url: ""
-
develop:
bypass: true
content:
- azure-pipelines.yml
- placeholder.txt
- params.json
- .gitignore
policies: []
organization_url: "https://xxxx.visualstudio.com/"
project: CloudTeam
【问题讨论】:
标签: azure-devops azure-devops-rest-api