Microsoft DevOps Engineer Expert AZ-400 Practice Question
Your company uses GitHub Flow and stores all code in a GitHub Enterprise Cloud organization that is connected to Azure Pipelines. You must shorten the feedback cycle when a build job fails. The solution has to meet the following requirements:
A new GitHub issue must be created automatically and assigned to the author of the last commit that triggered the failed pipeline.
Team members subscribed to the repository must receive the standard GitHub e-mail and in-app notifications for the new issue.
The implementation must require as little custom scripting as possible.
You create a fine-grained personal access token (PAT) that has the issues:write permission and add it to the pipeline as a secret variable.
Which action should you add to the failed branch of the Azure Pipeline to meet the requirements?
Configure a GitHub Service Hook that triggers on the "build completed" event from Azure Pipelines and creates an issue.
Enable a branch protection rule that requires a successful check and sets "Include administrators" to ON.
Add the GitHub Issues task from the Azure Pipelines Marketplace and configure it to create an issue that is assigned to $(Build.RequestedForEmail).
Add a Bash script task that uses curl to call the GitHub REST API v3 and open an issue in the repository.
The GitHub Issues Marketplace task lets you create or update issues in a repository directly from an Azure Pipeline without writing custom REST calls. By using the task, you can supply the previously stored PAT, set the action to Create, assign the issue to $(Build.RequestedForEmail) (the last pusher), and apply any required labels. When the task runs after a failed job, GitHub automatically sends its normal e-mail and web notifications to everyone watching the repository, fulfilling the notification requirement.
Using a Bash script or an Azure CLI task would work but would involve hand-crafting REST requests, increasing maintenance. A Service Hook in GitHub cannot be triggered from Azure Pipelines; service hooks send events out of GitHub, not into it. A branch protection rule only blocks merges and does not generate issues or notifications, so it does not meet the stated goals.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is a GitHub Issues task in Azure Pipelines?
Open an interactive chat with Bash
What is a fine-grained Personal Access Token (PAT) and how is it used in Azure Pipelines?
Open an interactive chat with Bash
Why didn’t the other options meet the requirements in the question?
Open an interactive chat with Bash
What is a fine-grained personal access token (PAT) and how is it used in Azure Pipelines?
Open an interactive chat with Bash
How does the GitHub Issues task in Azure Pipelines simplify collaboration?
Open an interactive chat with Bash
Why are service hooks from GitHub inappropriate for this implementation?
Open an interactive chat with Bash
Microsoft DevOps Engineer Expert AZ-400
Design and implement processes and communications
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .