Skip to content

Commit 763ea14

Browse files
Update devdocs-notify.yml
Update Slack Payload to add missing info.
1 parent 2757614 commit 763ea14

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

.github/workflows/devdocs-notify.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,22 @@ jobs:
1313
env:
1414
REPO_NAME: ${{ github.repository }}
1515
# Make sure this secret name matches what is in your Repo Settings
16+
PR_TITLE: ${{ github.event.pull_request.title || github.event.issue.title }}
17+
PR_USER: ${{ github.event.pull_request.user.login || github.event.comment.user.login }}
18+
PR_URL: ${{ github.event.pull_request.html_url || github.event.comment.html_url }}
1619
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
1720
run: |
1821
# Build Slack payload safely using jq
1922
SLACK_PAYLOAD=$(jq -n \
2023
--arg repo "$REPO_NAME" \
24+
--arg title "$PR_TITLE" \
25+
--arg user "$PR_USER" \
26+
--arg url "$PR_URL" \
2127
'{
2228
"channel": "#docs-devdocs-notifications",
2329
"username": "Issue Notifier",
2430
"icon_emoji": ":mega:",
25-
"text": "📢 @DevDocs a PR was opened or issue created in \($repo)"
31+
"text": "*📢 @DevDocs a PR was opened or issue created in * \($repo)\n*Title:* \($title)\n*By:* \($user)\n*URL:* \($url)"
2632
}')
2733
2834
# Send to Slack

0 commit comments

Comments
 (0)