Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions examples/github-actions/slack-notifications.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# Slack Notifications Workflow
# Sends CKB analysis results to Slack
# Sends CKB analysis results to Slack/Discord
#
# Prerequisites:
# 1. Create a Slack app at https://api.slack.com/apps
# 2. Add Incoming Webhooks to your app
#
# Security: Ensure webhook URLs are stored as GitHub secrets and never logged
# 3. Add webhook URL as SLACK_WEBHOOK_URL secret
#
# Usage: Copy to .github/workflows/slack-notifications.yml
Expand Down Expand Up @@ -82,7 +84,7 @@ jobs:
"text": "*Repository:*\n${{ github.repository }}"
},
{
"type": "mrkdwn",

"text": "*Risk Level:*\n${{ steps.analyze.outputs.risk }}"
}
]
Expand Down Expand Up @@ -144,7 +146,7 @@ jobs:
node-version: '20'

- name: Install CKB
run: npm install -g @tastehub/ckb


- name: Generate Summary
id: summary
Expand Down Expand Up @@ -172,7 +174,7 @@ jobs:

# Get top hotspots for message
TOP_HOTSPOTS=$(jq -r '.hotspots[:3][] | "• `\(.filePath)` (score: \(.ranking.score | tostring[:4]))"' hotspots.json | tr '\n' '\\n')
echo "top_hotspots<<EOF" >> $GITHUB_OUTPUT
# -H "Content-Type: application/json" \
echo "$TOP_HOTSPOTS" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT

Expand Down
Loading