feat(teams): introduce Teams Workflows service #414
Merged
pasha-codefresh merged 13 commits intoargoproj:masterfrom Dec 23, 2025
Merged
feat(teams): introduce Teams Workflows service #414pasha-codefresh merged 13 commits intoargoproj:masterfrom
pasha-codefresh merged 13 commits intoargoproj:masterfrom
Conversation
…entation - Added a new Teams Workflows service as a recommended replacement for the deprecated Office 365 Connectors, which will retire on March 31, 2026. - Updated the Teams documentation to reflect the deprecation notice and migration instructions to Teams Workflows. - Enhanced the overview of Teams services to include details about the new Teams Workflows service and its configuration. - Updated the service structure to accommodate the new Teams Workflows notification type. This change aims to improve notification capabilities and ensure users transition smoothly to the new service.
…nction - Removed error handling from teamsWorkflowsNotificationToAdaptiveCard function, returning only the adaptive card. - Updated the calling function to reflect the change, eliminating unnecessary error checks. This change streamlines the code by assuming successful conversion, enhancing readability and maintainability.
Contributor
ppapapetrou76
left a comment
There was a problem hiding this comment.
Can we please add UTs for the new code?
afzal442
reviewed
Dec 19, 2025
Member
Author
|
It was resolved in this PR |
added 6 commits
December 22, 2025 00:49
…gine into feat/ms-team-webhook-support
…ructure - Added logging for webhook URL when sending Teams Workflows messages. - Introduced new types for adaptive messages and attachments to align with Teams Workflows requirements. - Updated the `teamsWorkflowsNotificationToReader` function to wrap Adaptive Card payloads in the expected message structure. - Enhanced the adaptive card element to include a color property for better customization. These changes improve the integration with Teams Workflows and ensure proper message formatting.
- Updated test cases in `teams-workflows_test.go` to streamline the logic for checking element types in adaptive cards. - Replaced nested conditionals with early continue statements for improved readability and maintainability. - Ensured that the presence of required elements like "TextBlock" and "FactSet" is still validated effectively. These changes enhance the clarity of the test code while maintaining its functionality.
…alidation - Updated the `validateWorkflowsWebhookURL` function to use `errors.New` instead of `fmt.Errorf` for error messages related to webhook URL validation. - This change enhances consistency in error handling and improves readability of the code. These modifications streamline the error reporting process within the Teams Workflows service.
- Consolidated the template parsing logic in the GetTemplater method by reusing the texttemplate instance for all template fields. - This change reduces redundancy and improves code maintainability while ensuring consistent error handling across all template parsing operations. These modifications enhance the clarity and efficiency of the Teams Workflows notification service.
- Enhanced error messages in the Send method of the teamsWorkflowsService to provide more context when failures occur during HTTP client creation, message payload generation, and posting to the webhook. - This change improves the clarity of error reporting, making it easier to diagnose issues in the Teams Workflows integration. These modifications contribute to better maintainability and debugging capabilities within the service.
- Revised the configuration instructions for setting up Power Automate Workflows in Microsoft Teams, enhancing clarity and detail. - Removed deprecated steps related to Office 365 Connectors and emphasized the transition to Power Automate. - Added a note directing users to the dedicated Teams Workflows documentation for comprehensive guidance. These changes improve the user experience by providing clearer and more accurate setup instructions for Teams notifications.
added 3 commits
December 22, 2025 17:30
…entation - Eliminated the outdated webhook URL for Office 365 Connectors from the documentation, aligning with the transition to Power Automate Workflows. - This update ensures that users have access to the most current and relevant information for configuring Teams Workflows. These changes enhance the accuracy of the documentation and support users in adopting the latest integration practices.
- Simplified the template parsing logic in the TeamsWorkflowsNotification by directly creating new texttemplate instances for each field, enhancing code clarity and maintainability. - Updated the test assertions in teams_test.go to reflect the new behavior where a response body of "1" is considered a success, regardless of the status code. - Adjusted the test assertions in teams-workflows_test.go for consistency and clarity. These changes improve the overall structure and readability of the code while ensuring accurate test coverage for the Teams Workflows functionality.
- Deleted the TestWorkflowsURLPattern function from teams_test.go as it contained outdated test cases for deprecated webhook URLs. - This cleanup aligns the test suite with the current state of the Teams Workflows integration, ensuring that only relevant tests are maintained. These changes enhance the maintainability of the test code by removing unnecessary and obsolete tests.
reggie-k
approved these changes
Dec 23, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes: argoproj/argo-cd#18981
This change aims to improve notification capabilities and ensure users transition smoothly to the new service.