Question 1mediummultiple choice
Read the full Design and implement a source control strategy explanation →AZ-400 Design and implement a source control strategy • Complete Question Bank
Complete AZ-400 Design and implement a source control strategy question bank — all 0 questions with answers and detailed explanations.
Refer to the exhibit.
```json
{
"branch": "refs/heads/feature-123",
"before": "0000000000000000000000000000000000000000",
"after": "abc123def456abc123def456abc123def456abc1",
"commits": [
{
"id": "abc123def456abc123def456abc123def456abc1",
"message": "Add new feature"
}
]
}
```Refer to the exhibit.
```json
{
"status": "completed",
"result": "failed",
"ref": "refs/heads/feature/logging",
"repository": {
"name": "myapp",
"url": "https://dev.azure.com/myorg/myapp/_apis/git/repositories/myapp"
},
"pipeline": {
"name": "CI Pipeline",
"id": 123
}
}
```Refer to the exhibit.
```json
{
"repositorySettings": {
"defaultBranch": "main",
"requireLinearHistory": false,
"allowForcePush": false,
"branchPolicies": [
{
"branchName": "main",
"requiredReviewers": 2,
"checkForLinkedWorkItems": true,
"buildValidation": {
"buildDefinitionId": 123,
"displayName": "CI Build",
"manualQueueOnly": false
}
}
]
}
}
```Refer to the exhibit.
```yaml
# azure-pipelines.yml
trigger:
branches:
include:
- main
- develop
pr:
branches:
include:
- main
pool:
vmImage: 'ubuntu-latest'
steps:
- script: echo "Building..."
```Refer to the exhibit.
```json
{
"branchProtectionRules": [
{
"branch": "main",
"requiredStatusChecks": ["build", "test"],
"enforceAdmins": true,
"requiredPullRequestReviews": {
"requiredApprovingReviewCount": 2,
"dismissStaleReviews": true
}
}
]
}
```Refer to the exhibit.
```yaml
# azure-pipelines.yml
trigger:
branches:
include:
- main
- release/*
pr:
branches:
include:
- main
```{
"policy": {
"rules": [
{
"type": "required_pull_request_review",
"parameters": {
"required_approving_review_count": 2,
"dismiss_stale_reviews": true,
"require_code_owner_review": true
}
},
{
"type": "required_status_checks",
"parameters": {
"strict": true,
"contexts": ["continuous-integration/jenkins/pr-merge", "Azure Policy Check"]
}
}
]
}
}{"isDisabled":false,"isLocked":false,"isFrozen":false,"branch":"refs/heads/main","settings":{"scope":[{"refName":"refs/heads/main","matchKind":"Exact","repositoryId":"e6d5f8a1-..."}],"isBlocking":true,"isDeleted":false,"isEnabled":true,"isCommentRequired":true,"isResetOnSourcePush":false,"allowDeletions":false,"allowForcePush":false,"blockLastPusherReview":true,"requireApprovalCount":2,"requireMandatoryReviewers":true,"requireNoMergeConflict":true,"requireSquashMerge":false,"requireTransitionToApproved":true,"requiredReviewerIds":["a1b2c3d4-..."],"buildDefinitionId":1234,"queueOnSourceUpdateOnly":false,"manualQueueOnly":false,"triggeredBuilds":[],"automaticallyLinkedWorkItems":false,"displayName":"Main branch policy"}}