From 032beaa37c4e2efd0cca2ecac9415c3cca0ec1ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20L=C3=B3pez=20Ariza?= <45979455+alopezari@users.noreply.github.com> Date: Wed, 19 Jul 2023 19:56:15 +0200 Subject: [PATCH] Add a new GitHub Actions workflow to track on Slack the new PRs merged into the WooCommerce repository (#39316) Add a new GitHub Actions workflow to track on Slack the new PRs merged into the WooCommerce repository. --- .../test-assistant-pr-merge-track.yml | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/test-assistant-pr-merge-track.yml diff --git a/.github/workflows/test-assistant-pr-merge-track.yml b/.github/workflows/test-assistant-pr-merge-track.yml new file mode 100644 index 00000000000..9e325d582a5 --- /dev/null +++ b/.github/workflows/test-assistant-pr-merge-track.yml @@ -0,0 +1,26 @@ +name: Send a Slack notification when PR is merged +on: + pull_request_target: + types: [closed] + +permissions: {} + +jobs: + send-slack-notification-when-pr-merged: + if: "${{ github.event.pull_request.merged }}" + runs-on: ubuntu-20.04 + steps: + - name: Wait 2 minutes for other labelling jobs to finish + run: sleep 2m + shell: bash + - name: Notify Slack + uses: archive/github-actions-slack@d9dae40827adf93bddf939db6552d1e392259d7d + id: notify + with: + slack-bot-user-oauth-access-token: ${{ secrets.TEST_ASSISTANCE_BOT_TOKEN }} + slack-channel: ${{ secrets.WOO_PR_MERGED_SLACK_CHANNEL }} + slack-text: | + <${{ github.event.pull_request.html_url }}|${{ github.event.pull_request.title }}> + *Labels:* ${{ join(github.event.pull_request.labels.*.name, ', ') }} + slack-optional-unfurl_links: false + slack-optional-unfurl_media: false