AZ-400 Question 58
Single answerYour company uses GitHub for source control and Microsoft Teams for collaboration. You need to configure Microsoft Teams so that each time a new pull request (PR) is created or updated in the main GitHub repository, a notification automatically posts in the associated Teams channel. Which action should you take to achieve this?
- A
Enable the Azure DevOps app in Microsoft Teams and link your GitHub repository to it.
- B
Add the Teams channel email address as a GitHub repo watcher to receive PR updates via email forwarding.
- C
Enable Microsoft Teams from the GitHub Webhooks settings and manually specify JSON payload delivery.
- D
Install the GitHub app in Microsoft Teams and configure a subscription to pull request events for the repository.
Show answer and explanation
Correct answer: D
Explanation
To integrate GitHub pull request notifications in Microsoft Teams, you must install and configure the GitHub app in Teams. Then, from the Teams channel, you can subscribe to specific GitHub repository events such as pull requests, issues, and commits. This official integration is documented in GitHub and Microsoft Teams documentation, ensuring easy setup and an optimal user experience for collaboration.
- A. Incorrect.
Incorrect. The Azure DevOps app in Microsoft Teams is intended for Azure DevOps services (e.g., Boards, Pipelines) and does not directly connect to GitHub repos for PR notifications.
- B. Incorrect.
Incorrect. Simply adding a Teams channel email address to GitHub watchers is not a supported method for automated PR notifications in Microsoft Teams. Watchers receive email notifications only for updates to the repo, and forwarding emails to Teams does not offer real-time integration or links to PR details.
- C. Incorrect.
Incorrect. While GitHub Webhooks can send JSON payloads to external services, setting them up manually to integrate directly with Teams is more complex and typically requires intermediate services or custom code. It is not the recommended or simplest approach for integrating PR notifications into Teams.
- D. Correct.
Correct. Microsoft Teams provides an official GitHub app. Installing the app in your Teams channel and creating a subscription to pull request events is the supported way to receive automated notifications for new and updated pull requests in your GitHub repository.