From 6a6f2ac12725d1458c64061dcc7e7f890e70ec00 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Tue, 25 Aug 2026 15:50:21 +0530 Subject: [PATCH] ci: notify support when a PR is released (#58321) --- .../workflows/notify-support-on-release.yml | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/notify-support-on-release.yml diff --git a/.github/workflows/notify-support-on-release.yml b/.github/workflows/notify-support-on-release.yml new file mode 100644 index 00000000000..a42a56dec7d --- /dev/null +++ b/.github/workflows/notify-support-on-release.yml @@ -0,0 +1,45 @@ +name: Notify Support on PR release + +on: + issue_comment: + types: [created] + +permissions: {} + +jobs: + notify-support: + if: >- + github.event.issue.pull_request + && github.event.comment.user.id == 28699486 + && contains(github.event.comment.body, 'This PR is included in version') + runs-on: ubuntu-latest + timeout-minutes: 2 + + steps: + - name: Notify support.frappe.io + env: + COMMENT_ID: ${{ github.event.comment.id }} + PR_NUMBER: ${{ github.event.issue.number }} + REPOSITORY: ${{ github.repository }} + SUPPORT_FRAPPE_AUTH: ${{ secrets.SUPPORT_FRAPPE_AUTH }} + run: | + payload="$( + jq -n \ + --arg repository "$REPOSITORY" \ + --argjson pr_number "$PR_NUMBER" \ + --argjson comment_id "$COMMENT_ID" \ + '{ + repository: $repository, + pr_number: $pr_number, + comment_id: $comment_id + }' + )" + + curl --fail-with-body \ + --retry 3 \ + --retry-all-errors \ + --request POST \ + --header "Authorization: $SUPPORT_FRAPPE_AUTH" \ + --header "Content-Type: application/json" \ + --data "$payload" \ + "https://support.frappe.io/api/method/notify_pr_release"