Skip to content

[Phase 5.5] GitHub Issues import: execute import and task traceability #565

@frankbria

Description

@frankbria

Goal

Execute the import: convert selected GitHub issues into CodeFRAME tasks, link them back to their source, and optionally auto-close them on completion.

Background

Follows the browser UI (#564). Once issues are selected, the import creates tasks and sets up the traceability link.

Scope

Import flow:

  • [Import Selected] triggers POST /api/v2/integrations/github/import with a list of GitHub issue numbers
  • Backend maps each issue to a CodeFRAME task:
    • title → task title (verbatim)
    • body → task description (markdown preserved)
    • labels → task tags (best-effort mapping)
    • number + html_url stored as external_id / external_url on the task
  • Shows a progress indicator during import (can be simple "Importing 3 issues..." spinner)
  • On completion: shows a summary ("3 tasks created") with links to the new tasks, then closes the modal

Post-import tracking:

  • Each imported task's detail modal shows an "Imported from GitHub" badge linking to the original issue
  • In task detail: optional checkbox "Close GitHub issue when task is marked DONE"
    • If checked, on task → DONE: fire PATCH /api/v2/integrations/github/issues/{number}/close
    • Backend: calls GitHub API to close the issue (comment optional: "Completed via CodeFRAME")

Acceptance criteria

  • Import creates tasks with correct titles and descriptions
  • Imported tasks show the GitHub issue badge with correct link
  • Auto-close checkbox works end-to-end
  • Duplicate import protection (don't create a second task if the same issue is imported again — check external_id)
  • 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