Skip to content
Merged
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
39 changes: 39 additions & 0 deletions .github/workflows/loop-live-discord.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: loop-live Discord feed

# When the consensus loop auto-merges a PR in this fork, post a one-line notice
# to the Chrono AI Discord #loop-live feed via the NyxID proxy.
#
# Setup: add a repo secret NYX_DISCORD_KEY = a NyxID agent key scoped to the
# `chronoai-bot` service. The bot token itself is injected by NyxID, never stored
# here. The job is a no-op when the secret is absent.

on:
pull_request:
types: [closed]

jobs:
notify:
if: >-
github.event.pull_request.merged == true &&
contains(join(github.event.pull_request.labels.*.name, ','), 'crnd:human:auto')
runs-on: ubuntu-latest
steps:
- name: Post merge to #loop-live
env:
NYX_DISCORD_KEY: ${{ secrets.NYX_DISCORD_KEY }}
PR_NUMBER: ${{ github.event.pull_request.number }}
PR_TITLE: ${{ github.event.pull_request.title }}
PR_URL: ${{ github.event.pull_request.html_url }}
REPO: ${{ github.repository }}
run: |
if [ -z "$NYX_DISCORD_KEY" ]; then
echo "NYX_DISCORD_KEY not set; skipping Discord notify."
exit 0
fi
payload=$(jq -n --arg c "✅ Auto-merged **PR #${PR_NUMBER}** — ${PR_TITLE} (${REPO})
${PR_URL}" '{content: $c}')
curl -fsS -X POST \
"https://nyx-api.chrono-ai.fun/api/v1/proxy/s/chronoai-bot-1738/channels/1518548271277281290/messages" \
-H "X-API-Key: ${NYX_DISCORD_KEY}" \
-H "Content-Type: application/json" \
-d "$payload"
Loading