Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 2 additions & 47 deletions .github/workflows/chloe-triage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,50 +10,5 @@ on:

jobs:
notify:
runs-on: ubuntu-latest
if: github.event.sender.type != 'Bot'
steps:
- name: Send to OpenClaw
env:
EVENT_NAME: ${{ github.event_name }}
REPO: ${{ github.repository }}
SENDER: ${{ github.event.sender.login }}
ISSUE_NUMBER: ${{ github.event.issue.number }}
ISSUE_TITLE: ${{ github.event.issue.title }}
ISSUE_URL: ${{ github.event.issue.html_url }}
ISSUE_BODY: ${{ github.event.issue.body }}
COMMENT_BODY: ${{ github.event.comment.body }}
COMMENT_URL: ${{ github.event.comment.html_url }}
PR_NUMBER: ${{ github.event.pull_request.number }}
PR_TITLE: ${{ github.event.pull_request.title }}
PR_URL: ${{ github.event.pull_request.html_url }}
PR_BODY: ${{ github.event.pull_request.body }}
HOOK_URL: ${{ secrets.OPENCLAW_HOOK_URL }}
HOOK_TOKEN: ${{ secrets.OPENCLAW_HOOK_TOKEN }}
run: |
INSTRUCTION="Brief notification only. Provide: repo + number + title + author + one sentence summary + link. No assessment, no suggestions, no follow-up questions unless asked."
if [ "$EVENT_NAME" = "issues" ]; then
MSG="${INSTRUCTION}"$'\n\n'"New issue in ${REPO} — #${ISSUE_NUMBER}: ${ISSUE_TITLE}"
MSG+=$'\nAuthor: '"${SENDER}"
MSG+=$'\nURL: '"${ISSUE_URL}"
MSG+=$'\n\n'"${ISSUE_BODY}"
elif [ "$EVENT_NAME" = "pull_request" ]; then
MSG="${INSTRUCTION}"$'\n\n'"New PR in ${REPO} — #${PR_NUMBER}: ${PR_TITLE}"
MSG+=$'\nAuthor: '"${SENDER}"
MSG+=$'\nURL: '"${PR_URL}"
MSG+=$'\n\n'"${PR_BODY}"
else
MSG="${INSTRUCTION}"$'\n\n'"New comment on ${REPO} — #${ISSUE_NUMBER}: ${ISSUE_TITLE}"
MSG+=$'\nFrom: '"${SENDER}"
MSG+=$'\nURL: '"${COMMENT_URL}"
MSG+=$'\n\n'"${COMMENT_BODY}"
fi
PAYLOAD=$(jq -n \
--arg message "$MSG" \
--arg name "GitHub Triage" \
'{message: $message, name: $name, deliver: true, channel: "discord", to: "1474759623209783327"}')
curl -sf -X POST \
-H "Authorization: Bearer ${HOOK_TOKEN}" \
-H "Content-Type: application/json" \
-d "$PAYLOAD" \
"$HOOK_URL"
uses: sdkman/.github/.github/workflows/reusable-triage.yml@main
secrets: inherit
23 changes: 2 additions & 21 deletions .github/workflows/notify-on-failure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,5 @@ on:

jobs:
notify:
name: "Notify Chloé"
runs-on: ubuntu-latest
if: github.event.workflow_run.conclusion == 'failure'
steps:
- name: Notify Chloé
env:
REPO: ${{ github.repository }}
WORKFLOW: ${{ github.event.workflow_run.name }}
RUN_URL: ${{ github.event.workflow_run.html_url }}
HOOK_URL: ${{ secrets.OPENCLAW_HOOK_URL }}
HOOK_TOKEN: ${{ secrets.OPENCLAW_HOOK_TOKEN }}
run: |
TEXT="❌ ${WORKFLOW} failed: ${REPO}"
TEXT+=$'\nRun: '"${RUN_URL}"
PAYLOAD=$(jq -n --arg text "$TEXT" '{text: $text, mode: "now"}')
WAKE_URL="${HOOK_URL%/agent}/wake"
curl -sf -X POST \
-H "Authorization: Bearer ${HOOK_TOKEN}" \
-H "Content-Type: application/json" \
-d "$PAYLOAD" \
"$WAKE_URL"
uses: sdkman/.github/.github/workflows/reusable-notify-on-failure.yml@main
secrets: inherit
Loading