-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request for mentioning users #253
Comments
Unfortunately, I am not sure how practical that would be as they require the Entra (Active Directory) ID and the User Principal Name for each person someone wants to
(:point_up: from docs you linked to) If you have implementation suggestions or want to try coding it yourself and submitting a pull request, I will definitely consider it. My initial thoughts though are that it's a bit out of scope for this project. |
First of all thanks a lot for your quick response and of course thanks for making your nice repository public so that other people can use it. I found out that either the Entra (Active Directory) ID or the UPN are required, but not both. I tried out this minimal example which works exactly as intended: {
"type": "message",
"attachments": [
{
"contentType": "application/vnd.microsoft.card.adaptive",
"content": {
"type": "AdaptiveCard",
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.3",
"msteams": {
"width": "Full",
"entities": [
{
"type": "mention",
"text": "<at>Benedetto Habitante</at>",
"mentioned": {
"id": "[email protected]",
"name": "Benedetto Habitante"
}
}
]
},
"body": [
{
"type": "Container",
"items": [
{
"type": "TextBlock",
"text": "Hi <at>Benedetto Habitante</at>",
"weight": "bolder",
"size": "medium"
}
]
}
]
}
}
]
} (Above, I provided an UPN as I could imagine an interface on the GitHub action side that would be quite useful like this: jobs:
teams_notification:
runs-on: ubuntu-22.04
# Run always even if the main workflow fails, is cancelled, or is skipped
if: ${{ always() }}
needs: main_workflow
steps:
- name: Cancelled Notification
if: ${{ needs.main_workflow.result == 'cancelled' }}
uses: mikesprague/[email protected]
with:
github-token: ${{ github.token }}
webhook-url: ${{ secrets.MS_TEAMS_WEBHOOK_URL }}
deploy-card: true
timezone: "Europe/Rome"
title: 'Release Check Cancelled, triggered by <at>Benedetto Habitante</at>'
color: 'warning'
mentions:
- name: "Benedetto Habitante"
id: "[email protected]" # This can be either a UPN or an AD id Also, I saw that you provide an optional If I could submit a pull request in Python here, I would really try out coding it myself, but unfortunately I am not familiar with TypeScript at all. |
@BenedettoHabitante With a little more time to think about this, I am not opposed to the ideas since they would be opt-in and not change the experience for other users. That said, I don't see a practical way to allow mentions inline (within a message) per se. I will likely implement them with a line that shows something like the following if mentions are supplied: Mentions: @somerandomeuser1, @mention2 I am not sure when I will be able to get to this but likely in the coming weeks. Once completed, they will prob be part of a major version release (v2.0.0) and I will leave this issue open until I am able to do this work. |
Hi @mikesprague,
would be nice, too. Perfect. I am very much looking forward to version release (v2.0.0) |
I like the idea of Mentions as I've basically got a single Teams group that the build notifications go to and imagine it being a little spam like so would love it when only certain events (build failed) ping a specific person |
It seems that the feature for mentioning user(s) inside the notification, just like one can tag a user manually in MS Teams via the "@" symbol, is not possible yet, right?
Would it be possible to add this feature similar to this Adaptive Card?
Thanks in advance.
The text was updated successfully, but these errors were encountered: