Skip to content

Commit

Permalink
feat: updated teams webhook
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulGarewal committed Jan 2, 2025
1 parent 000143b commit 5ab811b
Showing 1 changed file with 34 additions and 7 deletions.
41 changes: 34 additions & 7 deletions .github/workflows/pr-notification.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Notify Teams on Pull Requests

on:
pull_request:
types: [opened, closed, reopened]
types: [opened, reopened]

jobs:
notify-teams:
Expand All @@ -24,7 +24,38 @@ jobs:
"type": "TextBlock",
"size": "Large",
"weight": "Bolder",
"text": "Pull Request ${{ github.event.action }}"
"text": "${{ github.repository && github.repository.split('/')[1] || github.repository }} - Pull Request ${{ github.event.action }}"
},
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"width": "auto",
"items": [
{
"type": "Image",
"url": "${{ github.event.pull_request.user.avatar_url }}",
"size": "small",
"style": "person",
"width": "32px",
"height": "32px"
}
]
},
{
"type": "Column",
"width": "stretch",
"items": [
{
"type": "TextBlock",
"text": "${{ github.event.pull_request.user.login }}",
"weight": "bolder",
"wrap": true
}
]
}
]
},
{
"type": "FactSet",
Expand All @@ -33,17 +64,13 @@ jobs:
"title": "Title",
"value": "${{ github.event.pull_request.title }}"
},
{
"title": "Author",
"value": "${{ github.event.pull_request.user.login }}"
},
{
"title": "Status",
"value": "${{ github.event.pull_request.state }}"
},
{
"title": "Repository",
"value": "${{ github.repository }}"
"value": "${{ github.repository && github.repository.split('/')[1] || github.repository }}"
},
{
"title": "Branch",
Expand Down

0 comments on commit 5ab811b

Please sign in to comment.