platform

package
v0.0.0-...-3fc36a1 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Clienter

type Clienter interface {
	CreateComment(
		ctx context.Context,
		body string,
	) error
	ListComments(
		ctx context.Context,
	) ([]Comment, error)
	DeleteComment(
		ctx context.Context,
		commentID int64,
	) error
	AddLabel(
		ctx context.Context,
		label constant.Label,
	) error
	AddLabelToOtherPR(
		ctx context.Context,
		label constant.Label,
		number int,
	) error
	RemoveLabel(
		ctx context.Context,
		label constant.Label,
	) error
	GetPullRequest(ctx context.Context) (*PullRequest, error)
	GetOpenPullRequests(ctx context.Context) ([]PullRequest, error)
	MergePullRequest(ctx context.Context, message string) error
	SetStatus(
		ctx context.Context,
		state constant.State,
		description string,
	) error
}

Clienter is interface of platform client

type Comment

type Comment struct {
	ID   int64
	Body string
}

Comment is a comment of PR

type PullRequest

type PullRequest struct {
	Number         int
	BaseBranch     string
	BaseCommitHash string
	HeadCommitHash string
	Labels         map[string]constant.Label
}

PullRequest is a PR

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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