GitHub community: post replies to issues and discussions from a branch #322
Intentwhat this change is meant to do
Let the Codician account answer community issues and discussions on the GitHub mirror quickly, from a branch, without a pull request per reply.
test-bot merged commit eab6b9b into main
Pull request successfully merged and closed
test-bot merged eab6b9b into main
Sign in to join the conversation.
Requested by Can · project thread
#What this changes
The GitHub community setup workflow (
scripts/github-community.mjs) can now answer issues and discussions on the GitHub mirror as the mirror token's account (Codician), without a pull request per reply.Replies wait as
replies/<id>.mdon thecommunity-repliesbranch of this repository, which is never merged and never mirrored. Each file has a small header (target: issue 4ordiscussion 2, optionallabelsandclose) and the reply in Markdown. The script fetches that branch, posts each reply it hasn't posted before, and ends the comment with a<!-- diffinery-reply: <id> -->marker, so rerunning the workflow posts nothing twice. Closing happens only alongside the first posting, so an issue someone reopened stays open.No workflow file changes: the existing workflow already runs this script with
MIRROR_TOKEN.#How it was tested
node --checkon the script.replyFiles()andparseReply()against a local repository with acommunity-repliesbranch: a valid reply parsed with its labels and marker, and a bad target (pull 4) was reported with a clear message.rest()andgraphql()helpers; the first real run is the replies to issues #3, #4 and #5.#Checklist
pnpm -r typecheckandpnpm -r testpass (no TypeScript or test changes; script only)apps/diffinery/docs(maintainer tooling only)apps/diffinery/migrations(none)🤖 Generated with Claude Code
https://claude.ai/code/session_015ALxdbMU5hpZXjGpL2jhC4