Documentation
¶
Overview ¶
Package consolidate moves every package from a branch of its own onto the default branch.
It is done once. Each package was kept on an orphan branch, pkg_<id>, and is kept under pkgs/<shard>/<id>/ on the default branch from now on (aquaproj/aqua-registry-g2#695). The move is one pull request that names the objects the branches already hold, so it uploads nothing and changes no byte of what any package serves.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller moves the packages.
func (*Controller) Consolidate ¶
Consolidate opens the pull request that moves every package onto the default branch.
Running it again is safe: an entry naming the object already at its path changes nothing, and the head branch is written again from the default branch's tip.
type Registry ¶
type Registry interface {
LegacyPackages(ctx context.Context) ([]*g2.LegacyPackage, error)
BranchSHA(ctx context.Context, branch string) (string, error)
CommitEntries(ctx context.Context, branch, parent, message string, entries []*gogithub.TreeEntry) error
CreatePullRequestFrom(ctx context.Context, logger *slog.Logger, head, base, title, body string) (*gogithub.PullRequest, error)
}
Registry is what the move reads and writes.