Documentation
¶
Index ¶
- type Comment
- type Commit
- type CommitState
- type CommitStatus
- type File
- type Issue
- func (i *Issue) Author(u *User) *Issue
- func (i *Issue) Comments(comments []*Comment) *Issue
- func (i *Issue) CreatedAt(t time.Time) *Issue
- func (i *Issue) Number(v int) *Issue
- func (i *Issue) State(v IssueState) *Issue
- func (i *Issue) Title(v string) *Issue
- func (i *Issue) UpdatedAt(t time.Time) *Issue
- type IssueState
- type Mock
- type PullRequest
- func (pr *PullRequest) Author(u *User) *PullRequest
- func (pr *PullRequest) Base(ref string) *PullRequest
- func (pr *PullRequest) Body(v string) *PullRequest
- func (pr *PullRequest) Comments(comments ...*PullRequestComment) *PullRequest
- func (pr *PullRequest) CreatedAt(t time.Time) *PullRequest
- func (pr *PullRequest) Head(repo *Repository, ref string) *PullRequest
- func (pr *PullRequest) Mergeable() *PullRequest
- func (pr *PullRequest) Merged() *PullRequest
- func (pr *PullRequest) Number(v int) *PullRequest
- func (pr *PullRequest) Reviews(reviews ...*Review) *PullRequest
- func (pr *PullRequest) State(v PullRequestState) *PullRequest
- func (pr *PullRequest) Title(v string) *PullRequest
- func (pr *PullRequest) UpdatedAt(t time.Time) *PullRequest
- type PullRequestComment
- type PullRequestState
- type Repository
- func (r *Repository) AssertPullRequest(t *testing.T, number int) *PullRequest
- func (r *Repository) Commits(commits ...*Commit) error
- func (r *Repository) DefaultBranch(v string)
- func (r *Repository) GetIssue(num int) *Issue
- func (r *Repository) GetIssues() []*Issue
- func (r *Repository) GetPullRequest(num int) *PullRequest
- func (r *Repository) GetPullRequests() []*PullRequest
- func (r *Repository) Issues(issues ...*Issue)
- func (r *Repository) NextIndex() int
- func (r *Repository) PullRequests(pullRequests ...*PullRequest)
- func (r *Repository) Tags(tags ...*Tag)
- type Review
- type ReviewState
- type Tag
- type Team
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Comment ¶
type Comment struct {
// contains filtered or unexported fields
}
func NewComment ¶
func NewComment() *Comment
type Commit ¶
type Commit struct {
// contains filtered or unexported fields
}
func (*Commit) Statuses ¶
func (c *Commit) Statuses(statuses ...*CommitStatus) *Commit
type CommitState ¶
type CommitState string
const ( CommitStatePending CommitState = "pending" CommitStateSuccess CommitState = "success" CommitStateFailure CommitState = "failure" CommitStateError CommitState = "error" )
type CommitStatus ¶
type CommitStatus struct {
State CommitState
Description string
}
type Issue ¶
type Issue struct {
// contains filtered or unexported fields
}
func (*Issue) State ¶
func (i *Issue) State(v IssueState) *Issue
type IssueState ¶
type IssueState string
const ( IssueStateOpen IssueState = "open" IssueStateClosed IssueState = "closed" )
type Mock ¶
type Mock struct {
Logger *slog.Logger
Scheme string
Host string
Port int
// contains filtered or unexported fields
}
func (*Mock) RegisterHandler ¶
func (*Mock) Repository ¶
func (m *Mock) Repository(name string) *Repository
func (*Mock) Transport ¶
func (m *Mock) Transport() http.RoundTripper
type PullRequest ¶
type PullRequest struct {
// contains filtered or unexported fields
}
func NewPullRequest ¶
func NewPullRequest() *PullRequest
func (*PullRequest) Author ¶
func (pr *PullRequest) Author(u *User) *PullRequest
func (*PullRequest) Base ¶
func (pr *PullRequest) Base(ref string) *PullRequest
func (*PullRequest) Body ¶
func (pr *PullRequest) Body(v string) *PullRequest
func (*PullRequest) Comments ¶
func (pr *PullRequest) Comments(comments ...*PullRequestComment) *PullRequest
func (*PullRequest) CreatedAt ¶
func (pr *PullRequest) CreatedAt(t time.Time) *PullRequest
func (*PullRequest) Head ¶
func (pr *PullRequest) Head(repo *Repository, ref string) *PullRequest
func (*PullRequest) Mergeable ¶
func (pr *PullRequest) Mergeable() *PullRequest
func (*PullRequest) Merged ¶
func (pr *PullRequest) Merged() *PullRequest
func (*PullRequest) Number ¶
func (pr *PullRequest) Number(v int) *PullRequest
func (*PullRequest) Reviews ¶
func (pr *PullRequest) Reviews(reviews ...*Review) *PullRequest
func (*PullRequest) State ¶
func (pr *PullRequest) State(v PullRequestState) *PullRequest
func (*PullRequest) Title ¶
func (pr *PullRequest) Title(v string) *PullRequest
func (*PullRequest) UpdatedAt ¶
func (pr *PullRequest) UpdatedAt(t time.Time) *PullRequest
type PullRequestComment ¶
type PullRequestComment struct {
// contains filtered or unexported fields
}
func NewPullRequestComment ¶
func NewPullRequestComment() *PullRequestComment
func (*PullRequestComment) Author ¶
func (c *PullRequestComment) Author(u *User) *PullRequestComment
func (*PullRequestComment) Body ¶
func (c *PullRequestComment) Body(v string) *PullRequestComment
type PullRequestState ¶
type PullRequestState string
const ( PullRequestStateOpen PullRequestState = "open" PullRequestStateClosed PullRequestState = "closed" )
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func (*Repository) AssertPullRequest ¶
func (r *Repository) AssertPullRequest(t *testing.T, number int) *PullRequest
func (*Repository) Commits ¶
func (r *Repository) Commits(commits ...*Commit) error
func (*Repository) DefaultBranch ¶
func (r *Repository) DefaultBranch(v string)
func (*Repository) GetIssue ¶
func (r *Repository) GetIssue(num int) *Issue
func (*Repository) GetIssues ¶
func (r *Repository) GetIssues() []*Issue
func (*Repository) GetPullRequest ¶
func (r *Repository) GetPullRequest(num int) *PullRequest
func (*Repository) GetPullRequests ¶
func (r *Repository) GetPullRequests() []*PullRequest
func (*Repository) Issues ¶
func (r *Repository) Issues(issues ...*Issue)
func (*Repository) NextIndex ¶
func (r *Repository) NextIndex() int
func (*Repository) PullRequests ¶
func (r *Repository) PullRequests(pullRequests ...*PullRequest)
func (*Repository) Tags ¶
func (r *Repository) Tags(tags ...*Tag)
type Review ¶
type Review struct {
// contains filtered or unexported fields
}
func (*Review) State ¶
func (r *Review) State(v ReviewState) *Review
type ReviewState ¶
type ReviewState string
const ( ReviewStateChangesRequested ReviewState = "CHANGES_REQUESTED" ReviewStateCommented ReviewState = "COMMENTED" ReviewStateApproved ReviewState = "APPROVED" )
Click to show internal directories.
Click to hide internal directories.