Ein GitHub-Issues-Backlog in OrgGen importieren

Vom OrgGen-AI-Team

Sie fügen die JSON-Ausgabe von `gh issue list` ein und OrgGen liest sie ohne Sprachmodell: gleiche Datei, gleicher Plan, jedes Mal. Die Identität eines Tickets stammt aus seiner URL, nie aus dem Titel — eine Wiederholung konvergiert, ein umbenanntes Ticket wird aktualisiert statt dupliziert.

Dieser Leitfaden ist nur auf Englisch verfügbar. Titel und Zusammenfassung oben sind übersetzt.

The command to run

OrgGen reads the JSON output of the GitHub CLI — gh v2.102.0 (cli/cli repository, read on 2026-10-10). Run it in the repository you want (or with `--repo`) and paste the result as is — without editing it, without summarizing it.

gh issue list --repo <owner>/<repo> --state all --limit 500 \
  --json number,title,body,state,stateReason,closedAt,url,labels,assignees,milestone,parent,blockedBy
Every issue in the repository, with everything OrgGen can read

The `parent` and `blockedBy` fields (the sub-issue hierarchy and the dependencies) exist in `--json` only from `gh` version 2.94.0. With an older version, the batch is imported flat, and the plan says so.

What each field becomes

In GitHubIn OrgGen
`url`the issue's identity: `owner/repo#number` — and the original link, shown on the task
`title`, `body`the task's title and body (a body that is too long is truncated with a visible marker, and the plan says so)
`state`, `closedAt`open → to do; closed → done, with `closedAt` as the completion date
`stateReason`an issue closed as "not planned" is done BUT labeled `not-planned`, so it cannot be mistaken for a completed issue
`labels`the task's labels (20 at most; the plan counts the ones beyond that)
`assignees`the assignees, by their `login` — matched to the project's people when they match
`milestone`a `milestone:<title>` label (this is not an OrgGen milestone: neither a due date nor a description is carried over)
`parent`the parent task
`blockedBy`the task's dependencies

Three levels in GitHub, two in OrgGen

GitHub sub-issues can nest several levels deep (Epic → Feature → task). OrgGen supports two levels: a parent task and its subtasks. An issue at the third level or deeper is therefore linked to the highest ancestor the batch knows, and its direct parent stays readable in a `parent:<ref>` label.

The steps, in order

  1. You run the command above and paste the output to your agent — OrgGen's chat, or an MCP client that sends an API key.
  2. The agent calls `import_tasks` with `format: "github-issues-json"` and your output in `text`. By default it is a dry run: the plan is returned (created, updated, skipped, conflicts, errors) and nothing is written.
  3. The agent is instructed to show you this plan. Read the errors first: a parent or blocker missing from the batch is named there, along with the issue it holds up.
  4. Nothing is written without a second, explicit call, with `dryRun: false` and the same batch. The agent keeps the `importId` that comes back.
  5. A doubt afterward: `list_imports` finds the batch, `rollback_import` rolls it back — as a dry run first.

Replay, update, roll back

  • Replaying never duplicates: the replay key is the issue URL. Running the command again and pasting the result again creates only the new issues.
  • A renamed issue is the same task. With `onExisting: "update"`, the import rewrites the supplied fields of an already imported task — only if nobody has changed it since; otherwise it comes out as a conflict, never overwritten.
  • Rolling back a batch deletes what it created and keeps what a human has modified. The updates it made are not restored.
  • A finished task keeps its completion date: it is the `closedAt` from GitHub.
  • More than 500 issues: several calls with the same `importId`, split BY TREE — a root issue and everything under it in the same call. The hierarchy is computed per call: a third-level issue imported after its parent, which was already imported under a different parent, is refused, by name.
  • A dependency on an issue from another call must already be imported: otherwise the issue is refused, by name, and replaying its call once the other call has been imported converges.
  • Tasks already imported through the OrgGen format under another key are not recognized: their issues would be created twice. Roll that batch back first (`rollback_import`).

What does not carry over

  • Issue comments (`comments`): a task has no place to hold them.
  • The author, the creation and update dates, reactions, pinning and GitHub project items: read if requested, never imported.
  • A milestone's due date and description: only its title becomes a label.
  • Child issues (`subIssues`, `subIssuesSummary`) and the inverse relation (`blocking`): the link is read from each issue's `parent` and `blockedBy`.
  • The issue type (`issueType`) and linked pull requests (`closedByPullRequestsReferences`).
  • A parent or blocker removed in GitHub since a previous import: OrgGen can set a link, not detach it.

For the current read, the plan returns the list of keys that were read but not imported (its `notes`), and the number of issues affected by each transformation (closed as "not planned", linked, labels truncated). A loss is never discovered after the fact.

Sie kommen von einem anderen Tool? So wechseln Sie zu OrgGen

Probieren Sie es an Ihrem eigenen Fall

Beschreiben Sie Ihre Situation in einem Satz — OrgGen baut das Diagramm und rechnet.

Probieren Sie es an Ihrem eigenen Fall

← Alle Leitfäden