DRAG DROP (Drag and Drop is not supported)You create a Git repository named Repo1 in Azure Repos.You need to configure Repo1 to meet the following requirements:Work items must be linked to a pull request.Pull requests must have a minimum of two reviewers.Pull requests must complete a code review by using a third-party tool.The solution must minimize administrative effort.Which type of policy should you use for each requirement? To answer, drag the appropriate policy types to the correct requirements. Each type policy may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.Note: Each correct selection is worth one point.Select and Place:
Answer(s): A
Box 1: Check-inWork items must be linked to a pull request.In the Add Check-in Policy dialog box, select the policy types you want, and then select OK.You can select from the following policies:*-> Work Items requires that one or more work items be associated with every check-in. Builds requires that the last build was successful before any new changes can be checked in. Changeset Comments Policy requires users to provide check-in comments. Code Analysis requires that code analysis be run before code can be checked in. Custom Path Policy scopes the other policies to specific folders or file types. Forbidden Patterns Policy prevents check-ins that have files with forbidden filename patterns. Work Item Query Policy specifies a work item query whose results are the only legal work items to associate with a check-in.Box 2: StatusPull requests must complete a code review by using a third-party tool.A status policy requires that an external service posts a status to the pull request. In this case, the external service could be SonarCloud. SonarCloud can analyze the code and check whether it meets the defined quality standards (Quality Gates). If it does, SonarCloud can then post a Passed status to the pull request. The status policy will then check this status before allowing the pull request to be merged.Box 3 BranchPull requests must have a minimum of two reviewers.Require a minimum number of reviewersCode reviews are important for software development projects. To ensure that teams review and approve PRs, you can require approval from a minimum number of reviewers. The basic policy requires that a specified number of reviewers approve the code, with no rejections.To set the policy, under Branch Policies, set Require a minimum number of reviewers to On. Enter the required number of reviewers, and select any of the following options:
https://learn.microsoft.com/bs-latn-ba/azure/devops/repos/tfvc/add-check-policies https://learn.microsoft.com/en-us/azure/devops/repos/git/branch-policies https://azuredevopslabs.com/labs/vstsextend/sonarcloud/
DRAG DROP (Drag and Drop is not supported)You have a GitHub repository.You need to configure Dependabot dependency scanning. The solution must meet the following requirements:Automatically open a pull request to resolve an alert.Automatically open a pull request when a dependency is updated.What should you enable for each requirement? To answer, drag the appropriate features to the correct requirements. Each feature may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.Note: Each correct selection is worth one point.Select and Place:
Box 1: A dependency graphAutomatically open a pull request to resolve an alert.GitHub generates Dependabot alerts when we detect that the default branch of your codebase is using dependencies with known security risks. For repositories where Dependabot security updates are enabled, when GitHub detects a vulnerable dependency in the default branch, Dependabot creates a pull request to fix it.GitHub starts generating the dependency graph immediately and generates alerts for any insecure dependencies as soon as they are identified. The graph is usually populated within minutes but this may take longer for repositories with many dependencies.Box 2: Security updatesAutomatically open a pull request when a dependency is updated.Dependabot security updates make it easier for you to fix vulnerable dependencies in your repository. If you enable this feature, when a Dependabot alert is raised for a vulnerable dependency in the dependency graph of your repository, Dependabot automatically tries to fix it.About updates for vulnerable dependencies in your repository GitHub generates Dependabot alerts when we detect that the default branch of your codebase is using dependencies with known security risks. For repositories where Dependabot security updates are enabled, when GitHub detects a vulnerable dependency in the default branch, Dependabot creates a pull request to fix it. The pull request will upgrade the dependency to the minimum possible secure version needed to avoid the vulnerability.
https://docs.github.com/en/code-security/dependabot/dependabot-security-updates/about-dependabot-security- updates https://docs.github.com/en/code-security/dependabot/dependabot-alerts/viewing-and-updating-dependabot- alerts
DRAG DROP (Drag and Drop is not supported)You need to find and isolate shared code. The shared code will be maintained in a series of packages.Which three actions should you perform in sequence? To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order.Select and Place:
Step 1: Create a dependency graph for the applicationBy linking work items and other objects, you can track related work, dependencies, and changes made over time. All links are defined with a specific link type. For example, you can use Parent/Child links to link work items to support a hierarchical tree structure. Whereas, the Commit and Branch link types support links between work items and commits and branches, respectively.Step 2: Group the related components.Packages enable you to share code across your organization: you can compose a large product, develop multiple products based on a common shared framework, or create and share reusable components and libraries.Step 3: Assign ownership to each component graph
https://docs.microsoft.com/en-us/azure/devops/boards/queries/link-work-items-support-traceability? view=azure-devops&tabs=new-web-form https://docs.microsoft.com/en-us/visualstudio/releasenotes/tfs2017-relnotes
You use GitHub Enterprise for source control repositories. The repositories store C# code.You need to enable CodeQL scanning for the repositories.What should you do?
Answer(s): D
You have a GitHub repository.You need to create a tag named v3.0.5 and ensure that the tag is available in the remote repository.Which two commands should you run? Each correct answer presents part of the solution.Note: Each correct selection is worth one point.
Answer(s): B,C
C: You can create tags for GitHub by either using:the Git command line, or GitHub's web interface.Creating tags from the command lineTo create a tag on your current branch, run this:git tag <tagname>If you want to include a description with your tag, add -a to create an annotated tag:git tag <tagname> -aB: Pushing commits to a remote repositoryUse git push to push commits made on your local branch to a remote repository.About git pushThe git push command takes two arguments:A remote name, for example, originA branch name, for example, mainFor example:git push REMOTE-NAME BRANCH-NAMEAs an example, you usually run git push origin main to push your local changes to your online repository.
https://docs.github.com/en/get-started/using-git/pushing-commits-to-a-remote-repository https://stackoverflow.com/questions/18216991/create-a-tag-in-a-github-repository
Post your Comments and Discuss Microsoft AZ-400 exam prep with other Community members:
Our website is free, but we have to fight against AI bots and content theft. We're sorry for the inconvenience caused by these security measures. You can access the rest of the AZ-400 content, but please register or login to continue.