Repository navigation
Import GitHub issues as features for existing projects - #313
zwanski-start wants to merge 2 commits into
Conversation
New /api/projects/{name}/github endpoints detect the repo from the
project's git remote, list its issues and import selected ones as
pending features. Task-list items become steps, comments are optionally
included, and re-imports are skipped via a Source: line in the description.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🔍 QA report: ✅ PassedTester: Barbara (cubefarm agent, in a fresh session) · Round: 1 · Author: Ken The import works end to end against the real GitHub API. Without a token, the repo was detected from the git remote and 77 open issues were listed; importing #217 and #218 created pending features with name '#N title', the 'GitHub Issue' category, default steps and a 'Source:' line, and importing them again skipped both. Validation and error cases return the right status codes (400/404/422, PR rejected as not an issue), no token is logged, ruff and the security tests pass, the 23 new tests pass, there are no new mypy errors, and the UI lint and build succeed. One minor non-blocking problem: at phone width (390px) the modal's content is about 25px wider than the dialog, so the right edge, including 'Select all', is clipped and needs a sideways scroll.
🧪 Commands run
No browser screenshots were taken in this round. Posted by cubefarm · merges automatically once GitHub's checks pass |
🔍 QA report: ✅ PassedTester: Barbara (cubefarm agent, in a fresh session) · Round: 1 · Author: Ken The PR adds a working GitHub-issue import for existing projects: the repo is detected from the git remote, issues are listed and imported as pending features at the end of the queue, and an issue that was already imported is skipped. Ruff, the security suites, the 23 new tests, the UI lint and the UI build all pass, and the pytest/mypy results match master. A real-browser run against AutoForgeAI/autoforge imported #217 and #218, which then appeared in the Kanban and Graph views. One cosmetic issue doesn't block: at phone width the modal content is wider than the dialog, so 'Select all' needs a sideways scroll.
🧪 Commands run
No browser screenshots were taken in this round. Posted by cubefarm · merges automatically once GitHub's checks pass |
A GitHub button on the Pending column lists the repository's issues (repo detected from the git remote; token from GITHUB_TOKEN/GH_TOKEN or `gh auth token`, public repos work without one) and creates one pending feature per selected issue, with task-list items as steps; already imported issues are skipped. Adaptations on integration (user decision 3A): - issue comments are excluded by default, in the API and in the modal (anyone can comment on an issue, and the text becomes agent instructions); - the modal warns that imported text becomes instructions for an agent that runs commands in the project; - tests for the default. Integrates AutoForgeAI#313 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AeH26pcsqoxPb3CDs8g1VN
Closes #21
What changed
Issue #21 asks for AutoForge to work on projects that already exist, and suggests picking GitHub issues as the starting point for new features. This PR adds that: you can now import a repository's GitHub issues as pending features.
The other half of the request, analysing an existing codebase and recording what it already does, is handled by the open PR #303 (#134). This PR doesn't overlap with it: it touches none of the files #303 changes except one added line in
CLAUDE.md.Backend
server/services/github_issues.py:originfirst, thenupstream). It understands https,git@,ssh://and token-in-URL remotes.#N titleSource: <issue url>line.- [ ]/- [x]), or two default steps if it has none.server/routers/github.pyadds three endpoints under/api/projects/{name}/github:GET /repo: the detected repo, and whether a GitHub token was foundGET /issues?repo=&state=open|closed|all: the issues, each withimported_feature_idset if it was already importedPOST /importwith{repo, issue_numbers (1–50), include_comments}: creates the features at the end of the queue and skips issues that were already importedGITHUB_TOKENorGH_TOKEN, and otherwise fromgh auth token. Without a token, public repos still work, but GitHub allows only 60 requests an hour.repovalue is checked against the GitHubowner/nameformat before it is put into the URL. The API host is alwaysapi.github.com.UI
owner/name. You can then filter issues by open, closed or all, search by title,#numberor label, and select issues, or use "Select all".KanbanView, soAppContextandModals.tsxare not changed.How I verified it
ruff check .passes.mypyon the new files is clean; the errors it reports are all in files that already had them.python test_security.pypasses, andpytest test_github_issues.py test_client.py test_dependency_resolver.py test_ws_security.pygives 66 passed.test_github_issues.py(23 tests) covers:ui:npm run lintshows 0 errors (the 6 warnings were already there), andnpm run buildsucceeds.HOME/registry, using a demo project whoseoriginisAutoForgeAI/autoforge. In Playwright:Assumptions / notes
passes=falseand go to the end of the queue. Dependencies are not inferred.Source: <url>line in the description. If someone edits that line out, the issue can be imported again.🤖 Generated with Claude Code