MCPcopy Create free account
hub / github.com/bytebase/bytebase / isPowerAutomateURL

Function isPowerAutomateURL

backend/plugin/webhook/teams/teams.go:108–115  ·  view source on GitHub ↗

isPowerAutomateURL returns true if the webhook URL is a Power Automate Workflow URL (*.powerplatform.com or legacy *.logic.azure.com) rather than a legacy Office 365 Connector URL.

(webhookURL string)

Source from the content-addressed store, hash-verified

106// isPowerAutomateURL returns true if the webhook URL is a Power Automate Workflow URL
107// (*.powerplatform.com or legacy *.logic.azure.com) rather than a legacy Office 365 Connector URL.
108func isPowerAutomateURL(webhookURL string) bool {
109 u, err := url.Parse(webhookURL)
110 if err != nil {
111 return false
112 }
113 hostname := strings.ToLower(u.Hostname())
114 return strings.HasSuffix(hostname, ".powerplatform.com") || strings.HasSuffix(hostname, ".logic.azure.com")
115}
116
117// postPowerAutomateMessage sends a webhook message to a Power Automate Workflow URL
118// using the Adaptive Card format wrapped in a message envelope.

Callers 1

PostMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected