From d462c6b0a7d184068df855700b8780230cca21ab Mon Sep 17 00:00:00 2001 From: antoniomorello-DB Date: Thu, 11 Sep 2025 09:45:11 -0400 Subject: [PATCH 1/2] Test devdocs-notify.yml URL parsing issue --- .github/workflows/devdocs-notify.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/devdocs-notify.yml b/.github/workflows/devdocs-notify.yml index 91ef71e..fd96882 100644 --- a/.github/workflows/devdocs-notify.yml +++ b/.github/workflows/devdocs-notify.yml @@ -9,6 +9,11 @@ jobs: notify: runs-on: ubuntu-latest steps: + - name: Debug Slack URL + run: echo "Webhook=${SLACK_WEBHOOK_URL}" + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + - name: Check for new PR or issues uses: actions/github-script@v7 with: From bf6c8834da18a467bd54a8dd3d11de46d6c73285 Mon Sep 17 00:00:00 2001 From: antoniomorello-DB Date: Thu, 11 Sep 2025 09:51:12 -0400 Subject: [PATCH 2/2] Log Slack URL to investigate URL Parse issue in devdocs-notify.yml --- .github/workflows/devdocs-notify.yml | 34 +++++++++++----------------- 1 file changed, 13 insertions(+), 21 deletions(-) diff --git a/.github/workflows/devdocs-notify.yml b/.github/workflows/devdocs-notify.yml index fd96882..5c94506 100644 --- a/.github/workflows/devdocs-notify.yml +++ b/.github/workflows/devdocs-notify.yml @@ -1,5 +1,5 @@ name: DevDocs PR or Issue Creation Notifier -on: +on: issues: types: [opened] pull_request: @@ -8,33 +8,25 @@ on: jobs: notify: runs-on: ubuntu-latest + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} steps: - - name: Debug Slack URL + - name: Debug Slack URL run: echo "Webhook=${SLACK_WEBHOOK_URL}" - env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - + - 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 - || ""; + const url = process.env.SLACK_WEBHOOK_URL; + console.log("Slack URL (first 10 chars):", url?.substring(0, 10)); - await fetch(process.env.SLACK_WEBHOOK_URL, { + await fetch(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 }} + text: `:eyes: @DevDocs a PR was opened or issue created in *${context.payload.repository.full_name}* + Event: *${context.eventName}* + Link: ${context.payload.pull_request?.html_url || context.payload.issue?.html_url}` + }), + });