Skip to content

Commit 2813ea5

Browse files
committed
ci(github): tag Slack users in Dependabot rotation reminder
1 parent aeb97d3 commit 2813ea5

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

.github/workflows/dependabot-rotation.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,17 @@ jobs:
1616
env:
1717
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_EDS_CORE }}
1818
run: |
19-
MEMBERS=("Camilla" "Chibuzor" "Frida")
19+
NAMES=("Camilla" "Chibuzor" "Frida")
20+
SLACK_IDS=("UFE7WAYKF" "U01FJ05SE67" "U063A589TEH")
2021
WEEK=$(date +%V)
21-
INDEX=$((10#$WEEK % ${#MEMBERS[@]}))
22-
CURRENT=${MEMBERS[$INDEX]}
22+
INDEX=$((10#$WEEK % ${#NAMES[@]}))
23+
NAME=${NAMES[$INDEX]}
24+
MENTION=${SLACK_IDS[$INDEX]}
2325
2426
curl -sSf "$SLACK_WEBHOOK_URL" \
2527
-H 'Content-type: application/json' \
2628
-d @- <<EOF
2729
{
28-
"text": ":robot_face: *$CURRENT, you're on Dependabot duty this week!* (week $WEEK)\n\n:broom: Time to sweep through those dependency PRs — most take under 5 min!\n\n:point_right: <https://github.com/equinor/design-system/pulls/app%2Fdependabot|Open Dependabot PRs> · <https://github.com/equinor/design-system/blob/main/documentation/how-to/DEPENDABOT_GUIDE.md|Dependabot guide>"
30+
"text": ":robot_face: *<@$MENTION>, you're on Dependabot duty this week!* (week $WEEK)\n\n:broom: Time to sweep through those dependency PRs — most take under 5 min!\n\n:point_right: <https://github.com/equinor/design-system/pulls/app%2Fdependabot|Open Dependabot PRs> · <https://github.com/equinor/design-system/blob/main/documentation/how-to/DEPENDABOT_GUIDE.md|Dependabot guide>"
2931
}
3032
EOF

0 commit comments

Comments
 (0)