repository

package
v1.14.2 Latest Latest
Warning

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

Go to latest
Published: May 9, 2021 License: MIT Imports: 15 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdoptRepository added in v1.13.0

func AdoptRepository(doer, owner *models.User, opts models.CreateRepoOptions) (*models.Repository, error)

AdoptRepository adopts pre-existing repository files for the user/organization.

func ChangeRepositoryName

func ChangeRepositoryName(doer *models.User, repo *models.Repository, newRepoName string) error

ChangeRepositoryName changes all corresponding setting from old repository name to new one.

func CreateRepository

func CreateRepository(doer, owner *models.User, opts models.CreateRepoOptions) (*models.Repository, error)

CreateRepository creates a repository for the user/organization.

func DeleteRepository

func DeleteRepository(doer *models.User, repo *models.Repository) error

DeleteRepository deletes a repository for a user or organization.

func DeleteUnadoptedRepository added in v1.13.0

func DeleteUnadoptedRepository(doer, owner *models.User, name string) error

DeleteUnadoptedRepository adopts pre-existing repository files for the user/organization.

func ForkRepository

func ForkRepository(doer, u *models.User, oldRepo *models.Repository, name, desc string) (*models.Repository, error)

ForkRepository forks a repository

func GenerateRepository

func GenerateRepository(doer, owner *models.User, templateRepo *models.Repository, opts models.GenerateRepoOptions) (_ *models.Repository, err error)

GenerateRepository generates a repository from a template

func NewContext added in v1.13.0

func NewContext() error

NewContext start repository service

func PushCreateRepo

func PushCreateRepo(authUser, owner *models.User, repoName string) (*models.Repository, error)

PushCreateRepo creates a repository when a new repository is pushed to an appropriate namespace

func PushUpdate added in v1.13.0

func PushUpdate(opts *repo_module.PushUpdateOptions) error

PushUpdate is an alias of PushUpdates for single push update options

func PushUpdates added in v1.13.0

func PushUpdates(opts []*repo_module.PushUpdateOptions) error

PushUpdates adds a push update to push queue

func StartRepositoryTransfer added in v1.13.3

func StartRepositoryTransfer(doer, newOwner *models.User, repo *models.Repository, teams []*models.Team) error

StartRepositoryTransfer transfer a repo from one owner to a new one. it make repository into pending transfer state, if doer can not create repo for new owner.

func TransferOwnership

func TransferOwnership(doer, newOwner *models.User, repo *models.Repository, teams []*models.Team) error

TransferOwnership transfers all corresponding setting from old user to new one.

Types

This section is empty.

Jump to

Keyboard shortcuts

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