From 11256a891823bff2f7f0a9db9f1c0e5d35577663 Mon Sep 17 00:00:00 2001 From: antoniomorello-DB Date: Wed, 10 Sep 2025 11:27:23 -0400 Subject: [PATCH] Create devdocs-notify.yml --- .github/workflows/devdocs-notify.yml | 35 ++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/devdocs-notify.yml diff --git a/.github/workflows/devdocs-notify.yml b/.github/workflows/devdocs-notify.yml new file mode 100644 index 0000000..91ef71e --- /dev/null +++ b/.github/workflows/devdocs-notify.yml @@ -0,0 +1,35 @@ +name: DevDocs PR or Issue Creation Notifier +on: + issues: + types: [opened] + pull_request: + types: [opened] + +jobs: + notify: + runs-on: ubuntu-latest + steps: + - name: Check for new PR or issues + uses: actions/github-script@v7 + with: + script: | + const text = context.payload.comment?.body + || context.payload.issue?.body + || context.payload.pull_request?.body + || context.payload.review?.body + || ""; + + await fetch(process.env.SLACK_WEBHOOK_URL, { + method: "POST", + headers: { "Content-Type": "application/json" }, + body: JSON.stringify({ + text: `:eyes: @DevDocs a PR was opened or issue created in *${context.payload.repository.full_name}* + Event: *${context.eventName}* + Link: ${context.payload.comment?.html_url + || context.payload.issue?.html_url + || context.payload.pull_request?.html_url + || context.payload.review?.html_url}` + }), + }); + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}