Skip to content

Improve MS Teams Webhook notification for Pull Request Review Requests #38270

Description

@zemanekj

What problem would this solve?

Hello Gitea Team,

First of all, thank you for the amazing work you're doing on this project! Gitea is a fantastic tool and it makes our development workflow much smoother.

I would like to suggest a small improvement for the Microsoft Teams webhook integration to make PR review notifications more actionable.

Description

Currently, when a Pull Request review is requested, the MS Teams notification (via services/webhook/msteams.go) contains limited and somewhat confusing information. Specifically:

It shows the PR author/sender, but it does not display the name of the designated reviewer.
The Repository name and Pull Request number are plain text, making it harder to navigate back to Gitea.

What do you propose?

I would like to suggest the following enhancements to the MS Teams Adaptive Card:

  • Include the Reviewer's Name: When a review is requested, the card should explicitly state who the reviewer is (e.g., "Reviewer: [Full Name]").
  • Hyperlinked Fields:
    • The Repository name should be a clickable link leading to the repository's home page.
    • The Pull Request # should be a clickable link leading directly to the specific PR.
  • Mention Support (Optional): If possible, it would be great to mention the reviewer using @name. I am aware that a functional Teams mention requires mapping Gitea users to Teams identities (Entra ID), which might be complex, but even having the name clearly visible would be a huge step forward.

Example of desired behavior
Instead of:

Repository:
organization/repository-name
Pull request #:
123

The card should ideally show:

Repository:
organization/repository-name
Pull request:
#123 WIP: Feature name
Requested Reviewer:
John Doe

Additional context
This would significantly improve the workflow for teams using MS Teams for notifications, as reviewers wouldn't have to manually search for the PR mentioned in the alert.

Metadata

Metadata

Labels

type/proposalThe new feature has not been accepted yet but needs to be discussed first.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions