Skip to content

feat: create GitHub issues (bug/feature) from Slack via Fiona#78

Draft
stevenarnold-ed-fi wants to merge 10 commits into
mainfrom
feature/github-issue-creation
Draft

feat: create GitHub issues (bug/feature) from Slack via Fiona#78
stevenarnold-ed-fi wants to merge 10 commits into
mainfrom
feature/github-issue-creation

Conversation

@stevenarnold-ed-fi

@stevenarnold-ed-fi stevenarnold-ed-fi commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Summary

Lets Ed-Fi community members file a GitHub bug or feature issue directly from Slack via Fiona — no GitHub account needed. Two entry points, an optional config-gated approval step, and automatic reporter attribution.

  • Slash commands: /fiona bug and /fiona feature open a modal (summary, description, priority, plus bug-specific steps/expected-vs-actual/environment).
  • Conversational offer: an explicit phrase (file a bug, report a bug, bug report, request a feature, feature request, file a feature) makes Fiona post a "Create ticket" button that opens the same modal.
  • Direct create by default; issues land in a single configured repo via the GitHub REST API (fine-grained PAT, Bearer auth, outbound HTTPS — Socket Mode compatible). Bug→bug label, Feature→enhancement label; priority + reporter Slack name/email go in the body.
  • Optional approval gate (TICKET_APPROVAL_REQUIRED=true + TICKET_TRIAGE_CHANNEL_ID): posts a draft with Approve/Discard buttons to a triage channel instead of creating immediately. Off by default.

Architecture

github-client.js (REST wrapper) → ticket-service.js (orchestrator: label + reporter resolution, body assembly, interaction recording, direct-vs-approval decision) → thin Slack listeners (slash subcommands, modal, buttons). Follows existing escalation.js / feedback-handler patterns.

Config (see docs/github-issue-creation.md)

GITHUB_REPO, GITHUB_TOKEN (required), GITHUB_API_URL, GITHUB_BUG_LABEL, GITHUB_FEATURE_LABEL, TICKET_APPROVAL_REQUIRED, TICKET_TRIAGE_CHANNEL_ID. Feature disables gracefully if unconfigured.

Deploy requirements

  • ⚠️ Slack app reinstall required — this PR adds bot scopes commands, users:read, users:read.email to manifest.json.
  • Provision a fine-grained PAT with Issues: write on the target repo; confirm the bug/enhancement labels exist there.
  • ⚠️ Privacy: the requester's Slack name + email are written into the issue body. In a public repo these are world-readable — see the privacy note in the feature doc.

Testing

573/573 tests pass; lint clean. Every task was built TDD with a per-task spec+quality review, plus a final whole-branch review (verdict: ready to merge with the default gate-off config).

Follow-ups (not blockers for gate-off default)

Before the approval gate is ever enabled in production:

  • Add an idempotency guard on approve (double-click / two approvers can currently create duplicate issues).
  • Confirm/handle the Slack message-metadata size limit for large draft payloads.

Other tracked minors: conversational button lacks an isTicketingEnabled() guard; rate limiting gates modal-open but not submit. LLM-based intent detection for the conversational offer is tracked as AI-174.

Human review note

This feature was implemented with substantial AI assistance (design, plan, and code). Please review before merging — the "Open Items to Confirm" (target repo, PAT, label existence, public/private repo privacy decision) need human sign-off.

🤖 Generated with Claude Code

@stevenarnold-ed-fi
stevenarnold-ed-fi marked this pull request as draft July 20, 2026 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant