GiteaPlane

Create Plane work items from Gitea issues

A Gitea + Plane agent flow

A team self-hosting Gitea files bugs and requests in the repo, but plans and prioritizes in Plane, so the two drift apart: Plane shows a sprint that ignores issues opened yesterday, and the repo holds work the roadmap never reflects. This recipe keeps them aligned one way. The agent reads open issues with list_repo_issues and creates a matching Plane work item for each, carrying the title, the body, and a link back to the Gitea issue. Gitea responds to the agent's call, so the read runs on a schedule, hourly or each morning, and only issues that match your filter and aren't already mirrored become work items.

The flow

Gitealist_repo_issues

Lists the issues of a repository.

Planecreate_work_item

Creates a new work item.

Step by step

  1. Scope which issues cross over

    Name the Gitea owner and repository, the state to read, usually open, and a label that marks planning-relevant work so internal chores don't all spawn work items. Point the agent at one Plane project.

  2. Read the Gitea issues

    The agent calls list_repo_issues, reading each issue's number, title, body, labels, and assignee. Gitea paginates, so it walks the pages on a large repo.

  3. Create the Plane work items

    It maps each issue to a work item and calls create_work_item with the issue title, a description that quotes the body and links the Gitea issue, and a state or priority if you map one.

  4. Record what's already mirrored

    Store each Gitea issue number against the Plane work item it created. Next run the agent skips issues that already have a work item, so re-running doesn't duplicate the board.

Tell your agent

Each morning, list open issues in our Gitea repo acme/platform labeled 'triage'. For any that don't already have a Plane work item, create work items in the Backlog project with the issue title, a description quoting the body and linking the Gitea issue, and priority set from the issue's label. Don't recreate items for issues you've already mirrored.

Setup

This flow needs both servers connected to your agent. Follow each install guide:

Worth knowing

  • create_work_item takes one work item per call, so on a backfill the agent loops over the issue list and creates them in sequence rather than in a single batch.
  • Plane needs a project ID and, for assignees, a member ID, not a Gitea username. Map your people once with get_project_members and pass the IDs.
  • list_repo_issues can return both open and closed depending on the state you pass. Filter to open so the agent doesn't mirror long-closed issues onto the board.

Questions

Does closing the Gitea issue close the Plane work item?
Not in this recipe. It creates work items one way. To mirror status you'd add a step keyed on the issue number you stored that calls update_work_item when the Gitea issue closes.
How does it avoid duplicating work items?
By storing each Gitea issue number against the Plane work item it made. Each run it reads current issues, drops the ones already mapped, and creates items only for the remainder.