From d70b128347283e1d87dbd322979e3a2f3c873a63 Mon Sep 17 00:00:00 2001 From: Hamik Hambardzumyan <150047343+hamikhambardzumyan@users.noreply.github.com> Date: Mon, 19 Feb 2024 18:08:16 +0400 Subject: [PATCH] feat(GitHub): add review request notification for maintainers internal channel --- .github/workflows/notify-reviewers.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/notify-reviewers.yml diff --git a/.github/workflows/notify-reviewers.yml b/.github/workflows/notify-reviewers.yml new file mode 100644 index 00000000..b070ef24 --- /dev/null +++ b/.github/workflows/notify-reviewers.yml @@ -0,0 +1,21 @@ +name: Internal Notification Channel +on: + pull_request: + types: [opened, edited] + branches: ["release/*"] +jobs: + send_notification: + runs-on: ubuntu-latest + steps: + - name: Send Notification + env: + INTERNAL_NOTIFICATION_CHANNEL_API_ENDPOINT: ${{ secrets.INTERNAL_NOTIFICATION_CHANNEL_API_ENDPOINT }} + run: | + PR_ID=${{ github.event.pull_request.number }} + PR_URL=${{ github.event.pull_request.html_url }} + PR_AUTHOR=${{ github.event.pull_request.user.login }} + REVIEWERS=${{ github.event.pull_request.requested_reviewers.*.login }} + + MESSAGE="New Pull Request: #$PR_ID by @$PR_AUTHOR\nLink: $PR_URL\nRequested Reviewers: $REVIEWERS" + + curl -X POST -H "Content-Type: application/json" -d "{\"message\": \"$MESSAGE\"}" $INTERNAL_NOTIFICATION_CHANNEL_API_ENDPOINT \ No newline at end of file