From a9d1e91bb6eb08dc15be864da500048834667954 Mon Sep 17 00:00:00 2001 From: Charis <26616127+charislam@users.noreply.github.com> Date: Mon, 23 Nov 2026 07:18:53 -0500 Subject: [PATCH] chore: remove slack notification for ratchet baselines reaching 0 (#53855) ## Problem The weekly ESLint ratchet workflow posts a Slack message to #team-frontend when a rule's baseline drops to 0. That follow-up is no longer needed because this behavior is now built into Tedd. ## Solution Remove the Slack notification step from `.github/workflows/studio-lint-ratchet-decrease.yml`, along with the step outputs that only existed to feed it: - The `id: decrease-baselines` on the baseline update step. - The `changed` and `pr_url` outputs written to `$GITHUB_OUTPUT`, including the `changed=false` output in the no-op branch. - The "Notify #team-frontend about rules that hit a zero baseline" step, which computed zero-baseline rules from `apps/studio/.github/eslint-rule-baselines.json` and posted to `SLACK_DASHBOARD_WEBHOOK_URL`. The baseline update and PR creation/comment logic is unchanged. ## Review instructions 1. Confirm the workflow still runs the "Decrease ESLint ratchet baselines and open PR" step and that the no-change path still exits 0. 2. Confirm no remaining references to `steps.decrease-baselines` or `SLACK_DASHBOARD_WEBHOOK_URL` in this workflow. ## Checklist Check all before review: - [ ] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) - [ ] If I wrote a new docs topic or edited an existing topic, I used the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs [style guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide) --- .../studio-lint-ratchet-decrease.yml | 36 ------------------- 1 file changed, 36 deletions(-) diff --git a/.github/workflows/studio-lint-ratchet-decrease.yml b/.github/workflows/studio-lint-ratchet-decrease.yml index 5d0f46812d6..66a2031ee35 100644 --- a/.github/workflows/studio-lint-ratchet-decrease.yml +++ b/.github/workflows/studio-lint-ratchet-decrease.yml @@ -47,7 +47,6 @@ jobs: permission-pull-requests: write - name: Decrease ESLint ratchet baselines and open PR - id: decrease-baselines env: GH_TOKEN: ${{ steps.app-token.outputs.token }} DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} @@ -70,7 +69,6 @@ jobs: if git diff --quiet; then echo "No baseline updates detected." - echo "changed=false" >> "$GITHUB_OUTPUT" exit 0 fi @@ -91,37 +89,3 @@ jobs: else gh pr comment "$pr_url" --body "Updated ESLint ratchet baselines with the latest weekly decreases." fi - - echo "changed=true" >> "$GITHUB_OUTPUT" - echo "pr_url=$pr_url" >> "$GITHUB_OUTPUT" - - - name: 'Notify #team-frontend about rules that hit a zero baseline' - if: steps.decrease-baselines.outputs.changed == 'true' - env: - PR_URL: ${{ steps.decrease-baselines.outputs.pr_url }} - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_DASHBOARD_WEBHOOK_URL }} - run: | - set -euo pipefail - - zero_rules=$(jq -r '.rules | to_entries | map(select(.value == 0 and (.key | startswith("shadcn/") | not)) | .key) | join(", ")' apps/studio/.github/eslint-rule-baselines.json) - - if [ -z "$zero_rules" ]; then - echo "No rules dropped to a baseline of 0; nothing to notify." - exit 0 - fi - - if [ -z "${SLACK_WEBHOOK_URL:-}" ]; then - echo "::warning::SLACK_DASHBOARD_WEBHOOK_URL secret is not set; skipping Slack notification for zero-baseline rules: $zero_rules" - exit 0 - fi - - pr_number="${PR_URL##*/}" - text="<@U0A1BRW39PC> the weekly ratchet-baseline job just dropped these rules to 0 in <${PR_URL}|#${pr_number}>: ${zero_rules}. Can you remove them from ratchet tracking and bump their ESLint severity to \"error\"?" - - payload=$(jq -n --arg text "$text" '{text: $text}') - - if ! curl --fail --silent --show-error -X POST "$SLACK_WEBHOOK_URL" \ - -H 'Content-Type: application/json' \ - -d "$payload"; then - echo "::warning::Failed to post Slack notification for zero-baseline rules: $zero_rules" - fi