Documentation ¶
Index ¶
- type Gitea
- func (g *Gitea) ClosePullRequest(ctx context.Context, pullReq scm.PullRequest) error
- func (g *Gitea) CreatePullRequest(ctx context.Context, repo scm.Repository, prRepo scm.Repository, ...) (scm.PullRequest, error)
- func (g *Gitea) ForkRepository(ctx context.Context, repo scm.Repository, newOwner string) (scm.Repository, error)
- func (g *Gitea) GetOpenPullRequest(ctx context.Context, repo scm.Repository, branchName string) (scm.PullRequest, error)
- func (g *Gitea) GetPullRequests(ctx context.Context, branchName string) ([]scm.PullRequest, error)
- func (g *Gitea) GetRepositories(ctx context.Context) ([]scm.Repository, error)
- func (g *Gitea) MergePullRequest(ctx context.Context, pullReq scm.PullRequest) error
- func (g *Gitea) UpdatePullRequest(ctx context.Context, repo scm.Repository, pullReq scm.PullRequest, ...) (scm.PullRequest, error)
- type RepositoryListing
- type RepositoryReference
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Gitea ¶
type Gitea struct { RepositoryListing MergeTypes []scm.MergeType SSHAuth bool // contains filtered or unexported fields }
Gitea contain Gitea configuration
func New ¶
func New(token, baseURL string, repoListing RepositoryListing, mergeTypes []scm.MergeType, sshAuth bool) (*Gitea, error)
New create a new Gitea client
func (*Gitea) ClosePullRequest ¶
ClosePullRequest closes a pull request
func (*Gitea) CreatePullRequest ¶
func (g *Gitea) CreatePullRequest(ctx context.Context, repo scm.Repository, prRepo scm.Repository, newPR scm.NewPullRequest) (scm.PullRequest, error)
CreatePullRequest creates a pull request
func (*Gitea) ForkRepository ¶ added in v0.27.0
func (g *Gitea) ForkRepository(ctx context.Context, repo scm.Repository, newOwner string) (scm.Repository, error)
ForkRepository forks a GiteaRepository. If newOwner is empty, fork on the logged in user
func (*Gitea) GetOpenPullRequest ¶ added in v0.37.0
func (g *Gitea) GetOpenPullRequest(ctx context.Context, repo scm.Repository, branchName string) (scm.PullRequest, error)
GetOpenPullRequest gets a pull request for one specific repository
func (*Gitea) GetPullRequests ¶
GetPullRequests gets all pull requests of with a specific branch
func (*Gitea) GetRepositories ¶
GetRepositories fetches repositories from all sources (groups/user/specific repo)
func (*Gitea) MergePullRequest ¶
MergePullRequest merges a pull request
func (*Gitea) UpdatePullRequest ¶ added in v0.50.0
func (g *Gitea) UpdatePullRequest(ctx context.Context, repo scm.Repository, pullReq scm.PullRequest, updatedPR scm.NewPullRequest) (scm.PullRequest, error)
UpdatePullRequest updates an existing pull request
type RepositoryListing ¶
type RepositoryListing struct { Organizations []string Users []string Repositories []RepositoryReference Topics []string SkipForks bool }
RepositoryListing contains information about which repositories that should be fetched
type RepositoryReference ¶
RepositoryReference contains information to be able to reference a repository
func ParseRepositoryReference ¶
func ParseRepositoryReference(val string) (RepositoryReference, error)
ParseRepositoryReference parses a repository reference from the format "ownerName/repoName"