Rebased onto the per-agent skill-scoping change so PR #25 carries both: - route.sh keeps the registry 'skills' allow-list and emits skills as a step output - install-opencode.sh writes the permission.skill block (deny-all + allow listed) Pure refactor otherwise: each step's shell moves to its own file, called via bash "$SCRIPTS/<name>.sh". The two extracted SKILL.md bodies are byte-identical to main; routing/config/publish behavior is unchanged. Because this is a reusable workflow (workflow_call) the runtime checkout is the caller's repo, so agent.yml now checks THIS repo out into .agents-workflow/ (pinned @main) and points $SCRIPTS there.
16 lines
832 B
Bash
Executable File
16 lines
832 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Fetch the full issue thread (shared memory) into /tmp/thread.md.
|
|
#
|
|
# Required env (provided by the workflow step): GT NUM GITHUB_SERVER_URL GITHUB_REPOSITORY
|
|
set -eu
|
|
|
|
API="${GITHUB_SERVER_URL}/api/v1/repos/${GITHUB_REPOSITORY}"
|
|
curl -sS -H "Authorization: token $GT" "$API/issues/$NUM/comments?limit=100" 2>/dev/null \
|
|
| jq -r '.[] |
|
|
( if (.body | test("delegated by")) then "an automated delegation"
|
|
elif (.user.login == "ffaerber") then "ffaerber (the maintainer / you)"
|
|
else "an AI teammate — the specific one is named in the 🤖 @name line at the top of the comment"
|
|
end ) as $who |
|
|
"### comment by \($who):\n\(.body)\n"' > /tmp/thread.md 2>/dev/null || true
|
|
echo "thread comments fetched: $(grep -c '^### comment by ' /tmp/thread.md 2>/dev/null || echo 0)"
|