Skip to content

Commit

Permalink
fix: adding summary and trying to properly ref pr (#1030)
Browse files Browse the repository at this point in the history
  • Loading branch information
cberg-aot authored Jan 4, 2024
1 parent ff8d7c0 commit 881fbad
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions .github/workflows/notifications.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ on:
- in_progess
- completed
jobs:
notify-teams-in-progress:
if: ${{github.event.workflow_run.status != 'completed'}}
notify-teams-pr:
if: ${{github.event.workflow_run.name == 'PR' && github.event.workflow_run.status == 'completed'}}
runs-on: ubuntu-22.04
steps:
- uses: simbo/msteams-message-card-action@latest
Expand All @@ -29,19 +29,22 @@ jobs:
value: ${{github.event.workflow_run.event}}
- name: status
value: ${{github.event.workflow_run.status}}
notify-teams-completed:
if: ${{github.event.workflow_run.status == 'completed'}}
summary: "${{toJSON(github.event.workflow_run)}}"
notify-teams-merged:
if: ${{github.event.workflow_run.name == 'Merge' && github.event.workflow_run.status == 'completed'}}
runs-on: ubuntu-22.04
steps:
- name: PR Number
id: pr
uses: bcgov-nr/[email protected]
- uses: simbo/msteams-message-card-action@latest
with:
webhook: ${{ vars.MS_TEAMS_WEBHOOK_URI }}
title: "${{github.event.workflow_run.head_commit.message}}"
color: '28a745'
buttons: |
Pull Request ${{github.event.workflow_run.pull_requests[0].number}} ${{github.event.workflow_run.repository.html_url}}/pull/${{github.event.workflow_run.pull_requests[0].number}}
Diff ${{github.event.workflow_run.repository.html_url}}/pull/${{github.event.workflow_run.pull_requests[0].number}}/files
Pull Request ${{steps.pr.outputs.pr}} ${{github.event.workflow_run.repository.html_url}}/pull/${{steps.pr.outputs.pr}}
Diff ${{github.event.workflow_run.repository.html_url}}/pull/${{steps.pr.outputs.pr}}/files
sections: |
- activity:
title: ${{github.event.workflow_run.head_commit.committer.name}}
Expand All @@ -52,3 +55,4 @@ jobs:
value: ${{github.event.workflow_run.event}}
- name: status
value: ${{github.event.workflow_run.status}}
summary: "${{toJSON(github.event.workflow_run)}}"

0 comments on commit 881fbad

Please sign in to comment.