Skip to content

Commit

Permalink
fix: Closing PR's has side effects and is called often. Only notify … (
Browse files Browse the repository at this point in the history
  • Loading branch information
cberg-aot authored Dec 22, 2023
1 parent d8cf030 commit 9bead16
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions .github/workflows/notifications.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,14 @@ name: Notifications

on:
workflow_run:
workflows: [PR,Merge]
workflows: [PR,PR Closed,Merge]
jobs:
vars:
name: Set Variables
outputs:
pr: ${{ steps.pr.outputs.pr }}
runs-on: ubuntu-22.04
timeout-minutes: 1
steps:
# Get PR number for squash merges to main
- name: PR Number
id: pr
uses: bcgov-nr/[email protected]

notify-teams:
name: Notify Teams
needs: [vars]
runs-on: ubuntu-22.04
steps:
- name: MS Teams Notifications
uses: dchourasia/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
webhook-uri: ${{ vars.MS_TEAMS_WEBHOOK_URI }}
custom-facts: |
- name: Notify
value: "PR# ${{ needs.vars.outputs.pr }}"

0 comments on commit 9bead16

Please sign in to comment.