Skip to content

Commit 9de2707

Browse files
authored
Update auto_update_preview.yml
Replace Slack handle with Slack id
1 parent 72cb1ce commit 9de2707

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

.github/workflows/auto_update_preview.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,11 @@ jobs:
2828
id: check_changes
2929
run: |
3030
git add *
31-
git diff --cached --exit-code || echo "has_changes=true" >> $GITHUB_OUTPUT
31+
if git diff --cached --exit-code; then
32+
echo "has_changes=false" >> $GITHUB_OUTPUT
33+
else
34+
echo "has_changes=true" >> $GITHUB_OUTPUT
35+
fi
3236
3337
- name: Close any existing pull request opened by "update-oas-bot"
3438
run: gh pr list --state=open --label="oas auto-update" --json=number --jq '.[] | join("")' | xargs -I{} gh pr close --delete-branch {}
@@ -51,14 +55,16 @@ jobs:
5155
GH_TOKEN: ${{ github.token }}
5256

5357
- name: Send notification
54-
if: ${{ !env.ACT }} && steps.check_changes.outputs.has_changes == 'true'
58+
if: ${{ failure() }} || steps.check_changes.outputs.has_changes == 'true'
5559
uses: rtCamp/action-slack-notify@v2
5660
env:
5761
SLACK_CHANNEL: criteo-api-sdk-generator
5862
SLACK_COLOR: ${{ job.status }}
59-
SLACK_MESSAGE: Autoupdate of OAS in Preview. Please check opened PRs to validate the change, and publish the artifacts @apidx-interrupt.
63+
SLACK_MESSAGE: 'Autoupdate of OAS in Preview. Please check <opened PRs|https://github.com/criteo/criteo-api-sdk-generator/pulls> to validate the change, and publish the artifacts <@S07BSM1MDN2>.'
6064
SLACK_USERNAME: sdk-generation-bot
6165
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
6266
SLACK_FOOTER: 'Autoupdate of OAS in preview runs daily Monday to Tuesday'
6367
SLACK_ICON_EMOJI: bell
64-
SLACK_LINK_NAMES: true
68+
SLACK_LINK_NAMES: 'true'
69+
MSG_MINIMAL: 'true'
70+
SLACK_MESSAGE_ON_FAILURE: 'Autoupdate of OAS in Preview failure, check <action results|https://github.com/criteo/criteo-api-sdk-generator/actions>.'

0 commit comments

Comments
 (0)