diff --git a/.github/workflows/notify-on-an-bdu-label.yml b/.github/workflows/notify-on-an-bdu-label.yml new file mode 100644 index 0000000000..acc0b94b0e --- /dev/null +++ b/.github/workflows/notify-on-an-bdu-label.yml @@ -0,0 +1,33 @@ +name: "Sends notification when A/N BDU label is attached to PR" + +on: + pull_request: + types: [labeled] + branches: [develop] + +permissions: + pull-requests: read + +jobs: + notify-bdu: + name: Notify Teams when A/N BDU label is added + runs-on: ubuntu-latest + timeout-minutes: 5 + if: >- + github.event.action == 'labeled' && + github.event.label.name == 'A/N BDU' && + github.event.pull_request.state == 'open' + steps: + - name: Send Teams notification + uses: Alfresco/alfresco-build-tools/.github/actions/send-teams-notification@1d671f8f10336861c89c67be57c6648d98876103 # v18.19.0 + with: + webhook-url: ${{ secrets.TEAMS_NOTIFICATION_ADF_BDU_WEBHOOK }} + skip_checkout: true + status: success + title: "A/N BDU PR: ${{ github.event.pull_request.title }}" + message: | + A pull request has been marked with the **A/N BDU** label. + + - **Repository:** ${{ github.repository }} + - **PR:** [#${{ github.event.pull_request.number }} ${{ github.event.pull_request.title }}](${{ github.event.pull_request.html_url }}) + - **Author:** ${{ github.event.pull_request.user.login }}