Chatty-Issues — POC
Turn a GitHub Issue thread into a conversational chat interface powered by the OpenAI API, orchestrated entirely with GitHub Actions.
- Open an issue → the bot replies to the issue body.
- Add a comment → the bot replies using the full issue history (issue body + all comments in order).
No external database: the issue thread is the conversation state.
Setup
-
Add a repository secret
OPENAI_API_KEY(required)
-
Optional: add a repository variable
OPENAI_MODEL— if unset, the script usesgpt-4o-mini.
-
Commit and push the workflows in
.github/workflows/(andpackage-lock.jsonfor reproducible installs).
How it works
issue-opened.yml— runs onissues: opened; sends the issue body to OpenAI and posts the reply as a comment.issue-commented.yml— runs onissue_comment: created; skips comments bygithub-actions[bot](loop prevention), fetches the full issue + all comments, rebuilds the conversation, calls OpenAI, and posts the reply.
Both workflows use npm ci and then npm run respond (runs scripts/respond.mjs).
Repository structure
| Path | Purpose |
|---|---|
.github/workflows/ | Issue-opened and issue-commented workflows |
scripts/respond.mjs | Builds chat history, calls OpenAI, posts comments |
prompts/system.md | Versioned system prompt for the assistant |
specs/ | Chat history and OpenAI request contracts |
docs/ | POC notes and limitations |
Notes
- POC scope: If the thread grows beyond the model context window, the API may error. No summarization, rate limiting, or multi-repo support.
- See
docs/POC-NOTES.mdfor intentional limitations.