Skip to repository content

tenant.openagents/omega

No repository description is available.

OpenAgents Git authority 2026-07-28T02:50:21.971Z Public web read
NIP-34 coordinate30617:7649603503856e5148d571eac2766b288a8ff1e9e35d380337a1d2b0015b4f92:omega
MaintainersHidden in public view
References2 branches · 1 tag
Read-only clonegit clone https://openagents.com/git/tenant.openagents/omega.git
Browse files

slack_notify_community_automation_failure.yml

97 lines · 3.6 KB · yaml
1# Pings Slack when one of our community / open-source triage automations fails, so we
2# notice breakages (a retired model, an API change, a bad deploy) without watching the
3# Actions tab. This is a deliberately curated list, NOT every workflow in the repo — add
4# a workflow below only if it's part of the community/triage tooling we actively babysit.
5name: Notify Slack on community automation failure
6
7on:
8  # zizmor: ignore[dangerous-triggers]
9  # The job validates that the completed run came from this repository, was
10  # started by an expected event, and failed before exposing the Slack secret.
11  workflow_run:
12    workflows:
13      - "Comment on potential duplicate bug/crash reports"
14      - "Track duplicate bot effectiveness"
15      - "Community PR Board"
16      - "PR Board Meta Fields Refresh"
17      - "PR Issue Labeler"
18      - "Guild Assignment Status"
19      - "Guild Stale Assignments"
20      - "Guild Weekly Shipped"
21      - "Guild New PR Notification"
22    types: [completed]
23
24permissions:
25  contents: read
26
27jobs:
28  notify-slack:
29    if: >-
30      github.repository == 'zed-industries/zed'
31      && github.event.workflow_run.head_repository.full_name == github.repository
32      && contains(fromJSON('["issues","issue_comment","pull_request","pull_request_target","schedule","workflow_dispatch"]'), github.event.workflow_run.event)
33      && github.event.workflow_run.conclusion == 'failure'
34    runs-on: namespace-profile-2x4-ubuntu-2404
35
36    steps:
37      - name: Build Slack message payload
38        env:
39          WF_NAME: ${{ github.event.workflow_run.name }}
40          WF_URL: ${{ github.event.workflow_run.html_url }}
41        run: |
42          # A handful of interchangeable laments; one is drawn at random per failure.
43          quips=(
44            "Quoth the runner: nevermore."
45            "Darkness there, and nothing more."
46            "A tell-tale red beats beneath the logs."
47            "Once more the pendulum descends."
48            "It grew weak and weary, and then no more."
49            "Deep into the stack trace peering."
50          )
51          quip="${quips[$((RANDOM % ${#quips[@]}))]}"
52
53          jq -n \
54            --arg name "$WF_NAME" \
55            --arg url "$WF_URL" \
56            --arg quip "$quip" \
57            '{
58              "text": "Oh no — \"\($name)\" has failed.",
59              "blocks": [
60                {
61                  "type": "section",
62                  "text": {
63                    "type": "mrkdwn",
64                    "text": "Oh no, <@U09Q4QHE1GA>! \($quip) \"*\($name)*\" has failed — <\($url)|see the run>."
65                  }
66                }
67              ]
68            }' > payload.json
69
70          cat payload.json
71
72      - name: Send Slack notification
73        env:
74          SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_COMMUNITY_AUTOMATION_FAILURE }}
75        run: |
76          if [ -z "$SLACK_WEBHOOK_URL" ]; then
77            echo "::error::SLACK_WEBHOOK_COMMUNITY_AUTOMATION_FAILURE secret is not set"
78            exit 1
79          fi
80
81          HTTP_RESPONSE=$(curl -s -w "\n%{http_code}" -X POST "$SLACK_WEBHOOK_URL" \
82            -H "Content-Type: application/json" \
83            -d @payload.json)
84
85          HTTP_BODY=$(echo "$HTTP_RESPONSE" | sed '$d')
86          HTTP_STATUS=$(echo "$HTTP_RESPONSE" | tail -n 1)
87
88          echo "Slack API response status: $HTTP_STATUS"
89          echo "Slack API response body: $HTTP_BODY"
90
91          if [ "$HTTP_STATUS" -ne 200 ]; then
92            echo "::error::Slack notification failed with status $HTTP_STATUS: $HTTP_BODY"
93            exit 1
94          fi
95
96          echo "Slack notification sent successfully"
97
Served at tenant.openagents/omega Member data and write actions are omitted.