From 211fdf99b902b641c1198cd1c344e507bf57fb66 Mon Sep 17 00:00:00 2001 From: Bane Sullivan Date: Tue, 11 Mar 2025 19:40:43 -0700 Subject: [PATCH 1/4] Add Slack notification to automated jobs --- .github/workflows/update-all-review-data.yml | 8 ++++++++ .github/workflows/update-contribs-reviews.yml | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/.github/workflows/update-all-review-data.yml b/.github/workflows/update-all-review-data.yml index e26244c5..8c2ffc11 100644 --- a/.github/workflows/update-all-review-data.yml +++ b/.github/workflows/update-all-review-data.yml @@ -45,3 +45,11 @@ jobs: # Custom token needed to trigger PR checks, as GITHUB_TOKEN won't # https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#triggering-further-workflow-runs GITHUB_TOKEN: ${{ secrets.PYOS_PR_TOKEN }} + - name: Slack Notification + uses: rtCamp/action-slack-notify@v2 + if: failure() + env: + SLACK_CHANNEL: pyos-infrastructure + SLACK_COLOR: '#db540b' + SLACK_MESSAGE: "The **ALL Contribs & Reviewers Update** workflow failed for pyopensci.org. Please check the logs." + SLACK_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }} diff --git a/.github/workflows/update-contribs-reviews.yml b/.github/workflows/update-contribs-reviews.yml index e9b85039..c24e4929 100644 --- a/.github/workflows/update-contribs-reviews.yml +++ b/.github/workflows/update-contribs-reviews.yml @@ -49,3 +49,11 @@ jobs: # Custom token needed to trigger PR checks, as GITHUB_TOKEN won't # https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#triggering-further-workflow-runs GITHUB_TOKEN: ${{ secrets.PYOS_PR_TOKEN }} + - name: Slack Notification + uses: rtCamp/action-slack-notify@v2 + if: failure() + env: + SLACK_CHANNEL: pyos-infrastructure + SLACK_COLOR: '#db540b' + SLACK_MESSAGE: "The Update Contribs & Reviewers workflow failed for pyopensci.org. Please check the logs." + SLACK_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }} From 9caee987e6a7eb6075715963f3c9660868dc06ac Mon Sep 17 00:00:00 2001 From: Bane Sullivan Date: Tue, 11 Mar 2025 19:41:20 -0700 Subject: [PATCH 2/4] Test message for PR --- .github/workflows/build-site.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/build-site.yml b/.github/workflows/build-site.yml index 0664ae8a..4039c68f 100644 --- a/.github/workflows/build-site.yml +++ b/.github/workflows/build-site.yml @@ -48,3 +48,12 @@ jobs: arguments: | --ignore-files "/.+\/_posts\/README.md" --checks "Images,Scripts" + + # TODO: remove before merge, for testing + - name: Slack Notification + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_CHANNEL: pyos-infrastructure + SLACK_COLOR: '#00FF00' + SLACK_MESSAGE: "This is a test of the GitHub Actions Slack Notification." + SLACK_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }} From aa109108bc3457233ef01c60d10ab2c2b6b11bcd Mon Sep 17 00:00:00 2001 From: Bane Sullivan Date: Tue, 11 Mar 2025 19:46:12 -0700 Subject: [PATCH 3/4] Remove debug message --- .github/workflows/build-site.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.github/workflows/build-site.yml b/.github/workflows/build-site.yml index 4039c68f..0664ae8a 100644 --- a/.github/workflows/build-site.yml +++ b/.github/workflows/build-site.yml @@ -48,12 +48,3 @@ jobs: arguments: | --ignore-files "/.+\/_posts\/README.md" --checks "Images,Scripts" - - # TODO: remove before merge, for testing - - name: Slack Notification - uses: rtCamp/action-slack-notify@v2 - env: - SLACK_CHANNEL: pyos-infrastructure - SLACK_COLOR: '#00FF00' - SLACK_MESSAGE: "This is a test of the GitHub Actions Slack Notification." - SLACK_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }} From 325344b2ef178be7f795cec73656cd514e1f94c7 Mon Sep 17 00:00:00 2001 From: Bane Sullivan Date: Tue, 11 Mar 2025 19:48:51 -0700 Subject: [PATCH 4/4] Formatting slack message --- .github/workflows/update-all-review-data.yml | 3 +++ .github/workflows/update-contribs-reviews.yml | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/update-all-review-data.yml b/.github/workflows/update-all-review-data.yml index 8c2ffc11..cff8e625 100644 --- a/.github/workflows/update-all-review-data.yml +++ b/.github/workflows/update-all-review-data.yml @@ -51,5 +51,8 @@ jobs: env: SLACK_CHANNEL: pyos-infrastructure SLACK_COLOR: '#db540b' + SLACK_LINK_NAMES: true + SLACKIFY_MARKDOWN: true + SLACK_TITLE: "ALL Contribs & Reviewers Update Workflow Failed" SLACK_MESSAGE: "The **ALL Contribs & Reviewers Update** workflow failed for pyopensci.org. Please check the logs." SLACK_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }} diff --git a/.github/workflows/update-contribs-reviews.yml b/.github/workflows/update-contribs-reviews.yml index c24e4929..64ca447b 100644 --- a/.github/workflows/update-contribs-reviews.yml +++ b/.github/workflows/update-contribs-reviews.yml @@ -55,5 +55,8 @@ jobs: env: SLACK_CHANNEL: pyos-infrastructure SLACK_COLOR: '#db540b' - SLACK_MESSAGE: "The Update Contribs & Reviewers workflow failed for pyopensci.org. Please check the logs." + SLACK_LINK_NAMES: true + SLACKIFY_MARKDOWN: true + SLACK_TITLE: "Update Contribs & Reviewers Workflow Failed" + SLACK_MESSAGE: "The **Update Contribs & Reviewers** workflow failed for pyopensci.org. Please check the logs." SLACK_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }}