migrate

package
v0.38.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 9, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package migrate moves a GitHub Projects v2 board into the git layout: the snapshot is the truth, the event log becomes annotation commits, every id is derived from its source so a re-run is byte-identical, and the report names everything that did not carry over. One way, idempotent, dry-runnable.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	Owner     string
	Board     int
	Title     string
	Committer gitstore.Identity
	// DryRun builds everything and pushes nothing.
	DryRun bool
	// Force writes over a remote that already holds a board.
	Force bool
}

Options configures one migration.

type Report

type Report struct {
	AlreadyMigrated                                            bool
	Verified                                                   bool
	Cards, Teams, Projects, Epics, Deadlines, Processes, Tasks int
	Events, Commits                                            int
	DoneFromSeeded, DoneWithoutJump                            int
	IssueCards                                                 []string
	UnattributedNotes                                          int
	Dangling                                                   []string
	Dropped                                                    []string
	// Stranded are the cards the source board carried that were PLACED on a
	// day and then left where no view can reach them — the shape the old ×
	// made when it demoted a worked card into the previous sprint
	// (board.Unreachable, dated). The migration takes them off the board in
	// a commit of its own; the history keeps them.
	Stranded []string
	// Placeless are cards no view shows because nobody ever put them
	// anywhere: no sprint, no dates, no column, no week. They are not the
	// ×'s leavings, so nothing is deleted — they are named, and the board's
	// owner decides.
	Placeless []string
	IDMap     map[string]string
}

Report is what the migration did and what it could not carry over.

func Run

func Run(ctx context.Context, src Source, storer storage.Storer, remote gitstore.Remote, opts Options) (Report, error)

Run migrates one board into remote, through storer (a scratch store: the clone is built there and pushed).

func (Report) String

func (r Report) String() string

String renders the report for a person.

type Source

type Source interface {
	LoadBoard(ctx context.Context, owner string, project int) (ghsource.Export, error)
}

Source is where the board is read from — *ghsource.Client in production, a fake in tests.

Directories

Path Synopsis
Package ghsource is the read-only GitHub Projects v2 client behind `aeman migrate`: it loads one project board over the GraphQL API and maps it onto the domain board.Board the migration consumes.
Package ghsource is the read-only GitHub Projects v2 client behind `aeman migrate`: it loads one project board over the GraphQL API and maps it onto the domain board.Board the migration consumes.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL