migrations

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2018 License: MIT Imports: 4 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DemoMigratory = &Migratory{
	AuthUsername: "demo",
	AuthPassword: "demo",
	Client:       gitea.NewClient("http://gitea:3000", "8bffa364d5a4b2f18421426da0baf6ccddd16d6b"),
	repository: &gitea.Repository{
		Name: "demo",
		Owner: &gitea.User{
			UserName: "demo",
		},
	},
	NewOwnerID:         1,
	migratedMilestones: make(map[int64]int64),
	migratedLabels:     make(map[int64]int64),
}

Functions

This section is empty.

Types

type Migratory

type Migratory struct {
	Client       *gitea.Client
	AuthUsername string
	AuthPassword string

	Private    bool
	NewOwnerID int64
	// contains filtered or unexported fields
}

Migratory is the context for migrating things from GitHub to Gitea

func (*Migratory) Issue

func (m *Migratory) Issue(gi *github.Issue) (*gitea.Issue, error)

Issue migrates a GitHub Issue to a Gitea Issue

func (*Migratory) IssueComment

func (m *Migratory) IssueComment(issue *gitea.Issue, gic *github.IssueComment) (*gitea.Comment, error)

IssueComment migrates a GitHub IssueComment to a Gitea Comment

func (*Migratory) Label

func (m *Migratory) Label(gl *github.Label) (*gitea.Label, error)

Label migrates a GitHub Label to a Gitea Label without caching its id

func (*Migratory) Milestone

func (m *Migratory) Milestone(gm *github.Milestone) (*gitea.Milestone, error)

Milestone migrates a GitHub Milesteon to a Gitea Milestone and caches its id

func (*Migratory) Repository

func (m *Migratory) Repository(gr *github.Repository) (*gitea.Repository, error)

Repository migrates a GitHub Repository to a Gitea Repository without migrating issues etc.

Jump to

Keyboard shortcuts

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