Table of Contents
Question
You use GitHub for source control and Microsoft Teams for collaboration. You need to send a notification to a Teams channel for each commit. The solution must minimize development effort. What should you do?
A. Use Azure Automation to connect to the GitHub Actions API and send a message to the Teams channel.
B. Use the Microsoft Teams for GitHub app and configure a subscription to receive notifications in the Teams channel.
C. Use GitHub Actions with a dispatch to send a message to the Teams channel by using the Teams API.
D. Use Azure Functions to connect to the GitHub REST API and send a message to the Teams channel.
Answer
C. Use GitHub Actions with a dispatch to send a message to the Teams channel by using the Teams API.
Explanation
To send a notification to a Teams channel for each commit, while minimizing development effort, you should choose option C: Use GitHub Actions with a dispatch to send a message to the Teams channel by using the Teams API. Here’s a detailed explanation:
Option A: Use Azure Automation to connect to the GitHub Actions API and send a message to the Teams channel.
- Azure Automation is not the recommended solution for this scenario as it is primarily used for managing and automating recurring tasks in Azure.
- It might require additional development effort to configure Azure Automation to connect to the GitHub Actions API and send messages to the Teams channel.
Option B: Use the Microsoft Teams for GitHub app and configure a subscription to receive notifications in the Teams channel.
- While the Microsoft Teams for GitHub app can be used to receive notifications in Teams, it may not be the most efficient solution for this specific requirement.
- Configuring subscriptions and managing notifications through the app might involve additional complexity and effort.
Option C: Use GitHub Actions with a dispatch to send a message to the Teams channel by using the Teams API.
- GitHub Actions is a powerful tool for automating workflows and integrating with various services.
- By using GitHub Actions with a dispatch event, you can trigger a workflow whenever a commit occurs.
- Within the workflow, you can use the Teams API to send a message to the desired Teams channel, notifying the team about the commit.
- This option offers a straightforward and native integration between GitHub and Teams, minimizing development effort.
Option D: Use Azure Functions to connect to the GitHub REST API and send a message to the Teams channel.
- While Azure Functions can be used to connect to the GitHub REST API and send messages to Teams, it might involve additional setup and configuration.
- This option adds an extra layer of complexity compared to option C, which directly uses GitHub Actions.
In summary, option C (Use GitHub Actions with a dispatch to send a message to the Teams channel by using the Teams API) is the most suitable choice as it leverages the native integration between GitHub Actions and Teams, minimizing development effort and providing a straightforward solution.
Reference
- Find the right app | Microsoft AppSource
- GitHub Apps – Microsoft Teams for GitHub · GitHub
- Microsoft Teams for GitHub · GitHub Marketplace · GitHub
- GitHub – integrations/microsoft-teams: Bringing your code and work to the conversations you care about with the GitHub and Microsoft integration
- GitHub + Microsoft Teams
- Actions · integrations/microsoft-teams · GitHub
Designing and Implementing Microsoft DevOps Solutions AZ-400 certification exam practice question and answer (Q&A) dump with detail explanation and reference available free, helpful to pass the Designing and Implementing Microsoft DevOps Solutions AZ-400 exam and earn Designing and Implementing Microsoft DevOps Solutions AZ-400 certification.