Skip to content

feat: Teams notifications#191

Open
alex289 wants to merge 2 commits into
mainfrom
feature/teams_notifications
Open

feat: Teams notifications#191
alex289 wants to merge 2 commits into
mainfrom
feature/teams_notifications

Conversation

@alex289

@alex289 alex289 commented Jun 8, 2026

Copy link
Copy Markdown
Member

Type of change

  • 🐛 Bug fix
  • 🚀 New feature
  • ❓ Other (please specify)

Description

Add ms teams notification provider

Part of #175

@alex289 alex289 self-assigned this Jun 8, 2026
Copilot AI review requested due to automatic review settings June 8, 2026 11:13
@alex289 alex289 added the enhancement New feature or request label Jun 8, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds Microsoft Teams as a first-class notification provider, wiring it through the frontend notification creation flow and the backend Shoutrrr-based provider registry as part of the broader notification extensions effort (#175).

Changes:

  • Add teams to the supported notification type list and UI form flow (including validation + config building).
  • Introduce a Teams notification builder (host/webhook URL + optional title) and localized strings.
  • Implement a backend Teams provider that converts the stored JSON config into a Shoutrrr teams:// target URL, with unit tests.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
frontend/src/lib/notifications.ts Adds teams to the supported notification types list.
frontend/src/components/dialogs/teams-notification-builder.tsx New Teams form fields + URL validation + config JSON builder.
frontend/src/components/dialogs/create-notification.tsx Integrates Teams fields into the notification creation dialog, schema validation, and config builder.
frontend/messages/en.json Adds Teams-related UI/validation strings (and tweaks a Shoutrrr placeholder).
frontend/messages/de.json Adds German equivalents for Teams-related strings (and tweaks a Shoutrr placeholder).
backend/internal/hub/notifications/provider/teams.go New Teams provider converting JSON config to Shoutrrr Teams URL.
backend/internal/hub/notifications/provider/teams_test.go Unit tests for Teams provider parsing/validation and URL generation.
backend/internal/hub/notifications/provider/provider.go Registers the Teams provider in the provider registry.
backend/internal/hub/models/notifications.go Adds NotificationTypeTeams constant.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread frontend/src/components/dialogs/teams-notification-builder.tsx
Comment thread frontend/messages/en.json Outdated
Comment thread frontend/messages/de.json Outdated
Comment thread backend/internal/hub/notifications/provider/teams.go
@codecov

codecov Bot commented Jun 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 84.00000% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...ckend/internal/hub/notifications/provider/teams.go 83.33% 2 Missing and 2 partials ⚠️

📢 Thoughts on this report? Let us know!

@alex289 alex289 enabled auto-merge (squash) June 8, 2026 11:21
@alex289 alex289 requested a review from timokoessler June 8, 2026 11:21

@timokoessler timokoessler left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested?

}

const pattern =
/^\/webhookb2\/[0-9a-f-]{36}@[0-9a-f-]{36}\/IncomingWebhook\/[0-9a-f]{32}\/[0-9a-f-]{36}\/[A-Za-z0-9_-]+\/?$/i;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only checked in frontend and not in backend?

@timokoessler timokoessler Jun 8, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also in a Url I generated it does /powerautomate, remove then maybe?

return false;
}

if (!/^[a-z0-9.-]+\.webhook\.office\.com$/i.test(parsed.hostname)) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can also be azure.com or powerplatform.com (I only saw this until now).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants