WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content
This repository was archived by the owner on Dec 10, 2025. It is now read-only.

Commit 2ec5ee6

Browse files
Update devdocs-notify.yml
Adding URL and other information to the Slack Payload
1 parent c057a78 commit 2ec5ee6

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.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)