File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments