Skip to content

[Phase 5.5] GitHub Issues import: repository connection (PAT auth) #563

@frankbria

Description

@frankbria

Goal

Let users connect a GitHub repository to their CodeFRAME workspace using a Personal Access Token so that issues can be imported.

Background

Many developers already have a backlog in GitHub Issues. Requiring them to re-enter every issue into a PRD is an adoption barrier. Connection is the prerequisite for the browse and import steps.

Scope

Settings UI (new "Integrations" tab on the Settings page):

  • "Connect GitHub Repository" section:
    • Text field for GitHub PAT (Personal Access Token)
    • Text field for repo in owner/repo format
    • [Connect] button — calls POST /api/v2/integrations/github/connect with PAT + repo
    • On success: show repo name + owner avatar, [Disconnect] button
    • On failure: clear error message (invalid token, repo not found, no issues:read scope)
  • Disconnect flow: revokes stored token, clears repo

Backend:

  • POST /api/v2/integrations/github/connect: validate PAT against GitHub API, verify issues:read scope, store encrypted
  • DELETE /api/v2/integrations/github/disconnect: clear stored credentials
  • GET /api/v2/integrations/github/status: returns { connected: bool, repo: "owner/repo" }
  • Store PAT encrypted (same pattern as API key storage in [Phase 5.1] Settings page: API key management #555)

Out of scope

  • OAuth app flow (PAT is sufficient for v1)
  • Multiple repos per workspace

Acceptance criteria

  • Can connect with a valid PAT and repo
  • Invalid PAT or missing scope shows a clear error
  • Disconnect clears the stored credential
  • PAT never returned in plaintext
  • npm test and uv run pytest pass

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestphase-5Phase 5: Advanced Features & Polish

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions