Skip to content

Commit b5bc24e

Browse files
tag the oncall person to the slack message
1 parent 31a11b5 commit b5bc24e

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

.github/scripts/handle_warning_violations.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ TEAM_ID=$2
66
JIRA_API_TOKEN=$3
77
SLACK_BEARER_TOKEN=$4
88
SLACK_CHANNEL_ID=$5
9-
DRY_RUN=${6:-false} # Optional 6th parameter for dry run
9+
ONCALL_USER=$6
10+
DRY_RUN=${7:-false} # Optional 7th parameter for dry run
1011

1112
if [ "$WARNING_COUNT" -eq 0 ]; then
1213
echo "No warning violations found, skipping ticket creation"
@@ -40,7 +41,7 @@ Total violations: $WARNING_COUNT"
4041
if [ "$(echo "$VIOLATION_DETAILS" | wc -l)" -gt 3 ]; then
4142
SLACK_SUMMARY="$SLACK_SUMMARY\n... and more"
4243
fi
43-
echo "Warning-level IPA violations found ($WARNING_COUNT violations).
44+
echo "Warning-level IPA violations found ($WARNING_COUNT violations) ($ONCALL_USER).
4445
4546
Jira ticket: [DRY RUN - no ticket created]"
4647
exit 0
@@ -93,7 +94,7 @@ if [ "$TICKET_KEY" != "null" ]; then
9394
fi
9495

9596
# Send Slack notification with violation summary
96-
SLACK_MESSAGE="Warning-level IPA violations found ($WARNING_COUNT violations).
97+
SLACK_MESSAGE="Warning-level IPA violations found ($WARNING_COUNT violations) ($ONCALL_USER).
9798
9899
Jira ticket: https://jira.mongodb.org/browse/$TICKET_KEY"
99100

.github/workflows/release-IPA-metrics.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,10 @@ jobs:
7070
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
7171
SLACK_BEARER_TOKEN: ${{ secrets.SLACK_BEARER_TOKEN }}
7272
SLACK_CHANNEL_ID: ${{ secrets.SLACK_CHANNEL_ID_APIX_PLATFORM_DEV }}
73+
SLACK_ONCALL_USER: ${{ secrets.SLACK_APIX_PLATFORM_ONCALL_USER }}
7374
run: |
7475
chmod +x .github/scripts/handle_warning_violations.sh
75-
.github/scripts/handle_warning_violations.sh "$WARNING_COUNT" "$TEAM_ID" "$JIRA_API_TOKEN" "$SLACK_BEARER_TOKEN" "$SLACK_CHANNEL_ID"
76+
.github/scripts/handle_warning_violations.sh "$WARNING_COUNT" "$TEAM_ID" "$JIRA_API_TOKEN" "$SLACK_BEARER_TOKEN" "$SLACK_CHANNEL_ID" "$SLACK_ONCALL_USER"
7677
7778
failure-handler:
7879
name: Failure Handler

0 commit comments

Comments
 (0)