Skip to content

Commit

Permalink
PI-2663 Fix Slack alerts by moving channel into payload (#4463)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcus-bcl authored Nov 25, 2024
1 parent d90a938 commit 147ba01
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .github/actions/app-insights-to-slack/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ runs:
run: |
echo "result=$(echo "$search_result" | jq -rc '.tables[0].rows |
{
"channel": "${{ inputs.slack_channel }}",
"text": "Probation Integration Report",
"blocks": ([
{
"type": "header",
Expand Down Expand Up @@ -148,5 +150,4 @@ runs:
with:
method: chat.postMessage
token: ${{ inputs.slack_token }}
channel: ${{ inputs.slack_channel }}
payload: ${{ steps.transform.outputs.result }}
6 changes: 4 additions & 2 deletions .github/workflows/readonly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,10 @@ jobs:
with:
method: chat.postMessage
token: ${{ secrets.SLACK_BOT_TOKEN }}
channel: probation-integration-notifications
payload: |
{
"channel": "probation-integration-notifications",
"text": "Read-only mode alert",
"blocks": [
{
"type": "header",
Expand Down Expand Up @@ -268,9 +269,10 @@ jobs:
with:
method: chat.postMessage
token: ${{ secrets.SLACK_BOT_TOKEN }}
channel: probation-integration-notifications
payload: |
{
"channel": "probation-integration-notifications",
"text": "Read-only mode failure",
"blocks": [
{
"type": "header",
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/reminders.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ jobs:
run: |
echo "result=$(echo "$pending_runs" | jq -rc '. |
{
"channel": "probation-integration-notifications",
"text": "Review pending deployments",
"blocks": ([
{
"type": "section",
Expand Down Expand Up @@ -67,5 +69,4 @@ jobs:
with:
method: chat.postMessage
token: ${{ secrets.SLACK_BOT_TOKEN }}
channel: probation-integration-notifications
payload: ${{ steps.transform.outputs.result }}

0 comments on commit 147ba01

Please sign in to comment.