Documentation
¶
Overview ¶
Package githubcli adapts the `gh` CLI behind focused services and domain-facing capability adapters. Keep shell transport, command formatting, REST or GraphQL helpers, and GitHub API quirks here; product-facing models live in `internal/github`, and this package must not depend on `internal/tui` or `internal/cache`.
Index ¶
- Constants
- Variables
- func FormatAssignableUsersCommand(repository string) string
- func FormatPullRequestBuildRunCommand(repository string, check PullRequestStatusCheck) string
- func FormatPullRequestBuildRunJobLogCommand(repository string, jobDatabaseID int) string
- func FormatPullRequestBuildRunJobsCommand(repository string, check PullRequestStatusCheck) string
- func FormatPullRequestSearchCommand(commandArguments []string) string
- func FormatSearchAssignableUsersCommand(repository string, query string) string
- func ToDomainCommitDiff(diff CommitDiff) githubdomain.CommitDiff
- func ToDomainConnectedUser(user ConnectedUser) githubdomain.ConnectedUser
- func ToDomainIssueDetail(detail IssueDetail) githubdomain.IssueDetail
- func ToDomainNotification(notification Notification) githubdomain.Notification
- func ToDomainNotificationBulkReadResult(result NotificationBulkReadResult) githubdomain.NotificationBulkReadResult
- func ToDomainNotifications(notifications []Notification) []githubdomain.Notification
- func ToDomainPullRequestAuthor(author PullRequestAuthor) githubdomain.PullRequestAuthor
- func ToDomainPullRequestAuthors(authors []PullRequestAuthor) []githubdomain.PullRequestAuthor
- func ToDomainPullRequestBuildRunJob(job PullRequestBuildRunJob) githubdomain.PullRequestBuildRunJob
- func ToDomainPullRequestBuildRunJobs(jobs []PullRequestBuildRunJob) []githubdomain.PullRequestBuildRunJob
- func ToDomainPullRequestDetail(detail PullRequestDetail) githubdomain.PullRequestDetail
- func ToDomainPullRequestDiff(diff PullRequestDiff) githubdomain.PullRequestDiff
- func ToDomainPullRequestReviewEvent(event PullRequestReviewEvent) githubdomain.PullRequestReviewEvent
- func ToDomainPullRequestReviewThreadTarget(target PullRequestReviewThreadTarget) githubdomain.PullRequestReviewThreadTarget
- func ToDomainPullRequestStatusCheck(check PullRequestStatusCheck) githubdomain.PullRequestStatusCheck
- func ToDomainPullRequestSummary(pullRequest PullRequest) githubdomain.PullRequestSummary
- func ToDomainPullRequests(pullRequests []PullRequest) []githubdomain.PullRequestSummary
- func ToDomainReactionContent(content ReactionContent) githubdomain.ReactionContent
- func ToDomainReleaseDetail(detail ReleaseDetail) githubdomain.ReleaseDetail
- func ToDomainRepository(repository Repository) githubdomain.RepositoryRef
- type AuthService
- type BuildAdapter
- func (adapter *BuildAdapter) GetPullRequestBuildRun(repository string, check githubdomain.PullRequestStatusCheck) (string, error)
- func (adapter *BuildAdapter) GetPullRequestBuildRunJobLog(repository string, jobDatabaseID int) (string, error)
- func (adapter *BuildAdapter) GetPullRequestBuildRunJobLogForCheck(repository string, check githubdomain.PullRequestStatusCheck) (githubdomain.PullRequestBuildRunJob, string, error)
- func (adapter *BuildAdapter) GetPullRequestBuildRunJobs(repository string, check githubdomain.PullRequestStatusCheck) ([]githubdomain.PullRequestBuildRunJob, error)
- type BuildAssembler
- func (assembler BuildAssembler) FindBuildInfo(repository string, number int, check PullRequestStatusCheck) (PullRequestBuildInfo, error)
- func (assembler BuildAssembler) HydrateStatusCheckLinks(repository string, number int, checks []PullRequestStatusCheck) []PullRequestStatusCheck
- func (BuildAssembler) ParseBuildInfos(stdout []byte) ([]PullRequestBuildInfo, error)
- type BuildService
- func (client *BuildService) GetPullRequestBuildInfo(repository string, number int, check PullRequestStatusCheck) (PullRequestBuildInfo, error)
- func (client *BuildService) GetPullRequestBuildRun(repository string, check PullRequestStatusCheck) (string, error)
- func (client *BuildService) GetPullRequestBuildRunJobLog(repository string, jobDatabaseID int) (string, error)
- func (client *BuildService) GetPullRequestBuildRunJobLogForCheck(repository string, check PullRequestStatusCheck) (PullRequestBuildRunJob, string, error)
- func (client *BuildService) GetPullRequestBuildRunJobs(repository string, check PullRequestStatusCheck) ([]PullRequestBuildRunJob, error)
- type Command
- type CommandFormatter
- type CommandResult
- type CommitDiff
- type ConnectedUser
- type ErrorClassifier
- type Executor
- type GraphQLClient
- type GraphQLRequest
- type GraphQLVariable
- type IssueDetail
- type MarkdownService
- type Notification
- type NotificationAdapter
- func (adapter *NotificationAdapter) GetIssueDetail(repository string, number int) (githubdomain.IssueDetail, error)
- func (adapter *NotificationAdapter) GetReleaseDetail(repository string, id int) (githubdomain.ReleaseDetail, error)
- func (adapter *NotificationAdapter) ListNotifications() ([]githubdomain.Notification, error)
- func (adapter *NotificationAdapter) MarkAllNotificationsDone(notifications []githubdomain.Notification) (int, error)
- func (adapter *NotificationAdapter) MarkAllNotificationsRead() (githubdomain.NotificationBulkReadResult, error)
- func (adapter *NotificationAdapter) MarkNotificationDone(threadID string) error
- func (adapter *NotificationAdapter) MarkNotificationRead(threadID string) error
- type NotificationAssembler
- type NotificationBulkReadResult
- type NotificationService
- func (client *NotificationService) GetIssueDetail(repository string, number int) (IssueDetail, error)
- func (client *NotificationService) GetReleaseDetail(repository string, id int) (ReleaseDetail, error)
- func (client *NotificationService) ListNotifications() ([]Notification, error)
- func (client *NotificationService) MarkAllNotificationsDone(notifications []Notification) (int, error)
- func (client *NotificationService) MarkAllNotificationsRead() (NotificationBulkReadResult, error)
- func (client *NotificationService) MarkNotificationDone(threadID string) error
- func (client *NotificationService) MarkNotificationRead(threadID string) error
- type NotificationSubject
- type Paginator
- type PullRequest
- type PullRequestAuthor
- type PullRequestAutoMergeRequest
- type PullRequestBuildInfo
- type PullRequestBuildRunJob
- type PullRequestComment
- type PullRequestCommentAuthor
- type PullRequestCommit
- type PullRequestCommitAuthor
- type PullRequestDetail
- type PullRequestDetailAdapter
- func (adapter *PullRequestDetailAdapter) GetCommitDiff(repository string, commitOID string) (githubdomain.CommitDiff, error)
- func (adapter *PullRequestDetailAdapter) GetPullRequestDetail(repository string, number int) (githubdomain.PullRequestDetail, error)
- func (adapter *PullRequestDetailAdapter) GetPullRequestDiff(repository string, number int) (githubdomain.PullRequestDiff, error)
- func (adapter *PullRequestDetailAdapter) GetPullRequestFileTeamOwners(repository string, number int, filePaths []string) (map[string][]string, error)
- type PullRequestDetailAssembler
- type PullRequestDetailService
- func (client *PullRequestDetailService) GetCommitDiff(repository string, commitOID string) (CommitDiff, error)
- func (client *PullRequestDetailService) GetPullRequestDetail(repository string, number int) (PullRequestDetail, error)
- func (client *PullRequestDetailService) GetPullRequestDiff(repository string, number int) (PullRequestDiff, error)
- func (client *PullRequestDetailService) GetPullRequestFileTeamOwners(repository string, number int, filePaths []string) (map[string][]string, error)
- type PullRequestDiff
- type PullRequestDiffAssembler
- type PullRequestDiffFile
- type PullRequestInlineComment
- type PullRequestLabel
- type PullRequestListAdapter
- type PullRequestListService
- type PullRequestMergeQueueEntry
- type PullRequestMutationAdapter
- func (adapter *PullRequestMutationAdapter) ClosePullRequest(repository string, number int) error
- func (adapter *PullRequestMutationAdapter) CommentOnPullRequest(repository string, number int, body string) error
- func (adapter *PullRequestMutationAdapter) ConvertPullRequestToDraft(repository string, number int) error
- func (adapter *PullRequestMutationAdapter) DeletePullRequestComment(commentID string) error
- func (adapter *PullRequestMutationAdapter) DequeuePullRequest(pullRequestID string) error
- func (adapter *PullRequestMutationAdapter) DisablePullRequestAutoMerge(repository string, number int) error
- func (adapter *PullRequestMutationAdapter) EditPullRequestDescription(repository string, number int, body string) error
- func (adapter *PullRequestMutationAdapter) EditPullRequestTitle(repository string, number int, title string) error
- func (adapter *PullRequestMutationAdapter) EnablePullRequestAutoMerge(repository string, number int) error
- func (adapter *PullRequestMutationAdapter) EnqueuePullRequest(pullRequestID string) error
- func (adapter *PullRequestMutationAdapter) ListAssignableUsers(repository string) ([]githubdomain.PullRequestAuthor, error)
- func (adapter *PullRequestMutationAdapter) MarkPullRequestReadyForReview(repository string, number int) error
- func (adapter *PullRequestMutationAdapter) MergePullRequestWhenReady(repository string, number int, pullRequestID string) error
- func (adapter *PullRequestMutationAdapter) OpenPullRequestInBrowser(repository string, number int) error
- func (adapter *PullRequestMutationAdapter) ReopenPullRequest(repository string, number int) error
- func (adapter *PullRequestMutationAdapter) RequestPullRequestReviewer(repository string, number int, reviewerLogin string) error
- func (adapter *PullRequestMutationAdapter) SearchAssignableUsers(repository string, query string) ([]githubdomain.PullRequestAuthor, error)
- func (adapter *PullRequestMutationAdapter) SquashMergePullRequest(repository string, number int) error
- func (adapter *PullRequestMutationAdapter) UpdatePullRequestAssignees(repository string, number int, addLogins []string, removeLogins []string) error
- func (adapter *PullRequestMutationAdapter) UpdatePullRequestBranch(repository string, number int) error
- func (adapter *PullRequestMutationAdapter) UpdatePullRequestComment(commentID string, body string) error
- type PullRequestMutationService
- func (client *PullRequestMutationService) ClosePullRequest(repository string, number int) error
- func (client *PullRequestMutationService) CommentOnPullRequest(repository string, number int, body string) error
- func (client *PullRequestMutationService) ConvertPullRequestToDraft(repository string, number int) error
- func (client *PullRequestMutationService) DeletePullRequestComment(commentID string) error
- func (client *PullRequestMutationService) DequeuePullRequest(pullRequestID string) error
- func (client *PullRequestMutationService) DisablePullRequestAutoMerge(repository string, number int) error
- func (client *PullRequestMutationService) EditPullRequestDescription(repository string, number int, body string) error
- func (client *PullRequestMutationService) EditPullRequestTitle(repository string, number int, title string) error
- func (client *PullRequestMutationService) EnablePullRequestAutoMerge(repository string, number int) error
- func (client *PullRequestMutationService) EnqueuePullRequest(pullRequestID string) error
- func (client *PullRequestMutationService) ListAssignableUsers(repository string) ([]PullRequestAuthor, error)
- func (client *PullRequestMutationService) MarkPullRequestReadyForReview(repository string, number int) error
- func (client *PullRequestMutationService) MergePullRequestWhenReady(repository string, number int, pullRequestID string) error
- func (client *PullRequestMutationService) OpenPullRequestInBrowser(repository string, number int) error
- func (client *PullRequestMutationService) ReopenPullRequest(repository string, number int) error
- func (client *PullRequestMutationService) RequestPullRequestReviewer(repository string, number int, reviewerLogin string) error
- func (client *PullRequestMutationService) SearchAssignableUsers(repository string, query string) ([]PullRequestAuthor, error)
- func (client *PullRequestMutationService) SquashMergePullRequest(repository string, number int) error
- func (client *PullRequestMutationService) UpdatePullRequestAssignees(repository string, number int, addLogins []string, removeLogins []string) error
- func (client *PullRequestMutationService) UpdatePullRequestBranch(repository string, number int) error
- func (client *PullRequestMutationService) UpdatePullRequestComment(commentID string, body string) error
- type PullRequestRequestedReviewer
- type PullRequestReview
- type PullRequestReviewEvent
- type PullRequestReviewRequest
- type PullRequestReviewRequestOrganization
- type PullRequestReviewThread
- type PullRequestReviewThreadTarget
- type PullRequestStatusCheck
- type RESTClient
- type RESTHeader
- type RESTRequest
- type ReactionAdapter
- type ReactionContent
- type ReactionGroup
- type ReactionService
- type ReleaseDetail
- type Repository
- type ResponseDecoder
- type ReviewAdapter
- func (adapter *ReviewAdapter) AddPullRequestReviewThread(pullRequestReviewID string, body string, ...) error
- func (adapter *ReviewAdapter) AddPullRequestReviewThreadReply(pullRequestReviewID string, pullRequestReviewThreadID string, body string) error
- func (adapter *ReviewAdapter) ApprovePullRequest(repository string, number int) error
- func (adapter *ReviewAdapter) DeletePullRequestReview(pullRequestReviewID string) error
- func (adapter *ReviewAdapter) DeletePullRequestReviewComment(commentID string) error
- func (adapter *ReviewAdapter) GetPendingPullRequestReviewID(repository string, number int) (string, bool, error)
- func (adapter *ReviewAdapter) RequestChangesOnPullRequest(repository string, number int, body string) error
- func (adapter *ReviewAdapter) ResolvePullRequestReviewThread(threadID string) error
- func (adapter *ReviewAdapter) ReviewPullRequestWithComment(repository string, number int, body string) error
- func (adapter *ReviewAdapter) StartPendingPullRequestReview(repository string, number int) (string, error)
- func (adapter *ReviewAdapter) SubmitPullRequestReview(pullRequestReviewID string, event githubdomain.PullRequestReviewEvent, ...) error
- func (adapter *ReviewAdapter) UnresolvePullRequestReviewThread(threadID string) error
- func (adapter *ReviewAdapter) UpdatePullRequestReviewComment(commentID string, body string) error
- type ReviewService
- func (client *ReviewService) AddPullRequestReviewThread(pullRequestReviewID string, body string, target PullRequestReviewThreadTarget) error
- func (client *ReviewService) AddPullRequestReviewThreadReply(pullRequestReviewID string, pullRequestReviewThreadID string, body string) error
- func (client *ReviewService) ApprovePullRequest(repository string, number int) error
- func (client *ReviewService) DeletePullRequestReview(pullRequestReviewID string) error
- func (client *ReviewService) DeletePullRequestReviewComment(commentID string) error
- func (client *ReviewService) GetPendingPullRequestReviewID(repository string, number int) (string, bool, error)
- func (client *ReviewService) RequestChangesOnPullRequest(repository string, number int, body string) error
- func (client *ReviewService) ResolvePullRequestReviewThread(threadID string) error
- func (client *ReviewService) ReviewPullRequestWithComment(repository string, number int, body string) error
- func (client *ReviewService) StartPendingPullRequestReview(repository string, number int) (string, error)
- func (client *ReviewService) SubmitPullRequestReview(pullRequestReviewID string, event PullRequestReviewEvent, body string) error
- func (client *ReviewService) UnresolvePullRequestReviewThread(threadID string) error
- func (client *ReviewService) UpdatePullRequestReviewComment(commentID string, body string) error
- type ReviewThreadAssembler
- type Runner
- type SessionAdapter
- type SessionService
Constants ¶
View Source
const ( NotificationSubjectTypePullRequest = githubdomain.NotificationSubjectTypePullRequest NotificationSubjectTypeIssue = githubdomain.NotificationSubjectTypeIssue NotificationSubjectTypeRelease = githubdomain.NotificationSubjectTypeRelease )
Variables ¶
View Source
var ( ErrInvalidNotificationResponse = fmt.Errorf("invalid notification response") ErrInvalidIssueDetailResponse = fmt.Errorf("invalid issue detail response") ErrInvalidReleaseDetailResponse = fmt.Errorf("invalid release detail response") ErrMissingNotificationSubjectTarget = githubdomain.ErrMissingNotificationSubjectTarget )
View Source
var ( ErrMissingNotificationThreadID = errors.New("missing notification thread id") ErrNotificationEndpointAuthRefused = errors.New("notification endpoint authentication refused") )
View Source
var ( ErrInvalidPullRequestBuildResponse = errors.New("invalid pull request build response") ErrPullRequestBuildInfoNotFound = errors.New("pull request build info not found") )
View Source
var ( ErrInvalidPullRequestBaseRefNameResponse = fmt.Errorf("invalid pull request base ref response") ErrInvalidPullRequestCodeownersResponse = fmt.Errorf("invalid pull request CODEOWNERS response") ErrMissingPullRequestBaseRefName = fmt.Errorf("missing pull request base ref name") )
View Source
var ( ErrMissingPullRequestIdentity = githubdomain.ErrMissingPullRequestIdentity ErrEmptyPullRequestComment = errors.New("empty pull request comment") )
View Source
var ( ErrInvalidPullRequestDetailResponse = fmt.Errorf("invalid pull request detail response") ErrInvalidPullRequestInlineCommentResponse = fmt.Errorf("invalid pull request inline comment response") ErrInvalidPullRequestBranchComparisonResponse = fmt.Errorf("invalid pull request branch comparison response") )
View Source
var ( ErrInvalidPullRequestMergeQueueMetadataResponse = errors.New("invalid pull request merge queue response") ErrInvalidPullRequestMergeQueueMutationResponse = errors.New("invalid pull request merge queue mutation response") ErrMissingPullRequestID = errors.New("missing pull request id") )
View Source
var ( ErrInvalidReactionTarget = errors.New("invalid reaction target") ErrInvalidReactionContent = errors.New("invalid reaction content") ErrInvalidReactionResponse = errors.New("invalid reaction response") )
View Source
var ( ErrInvalidPullRequestReactionTargetsResponse = fmt.Errorf("invalid pull request reaction targets response") ErrInvalidPullRequestReviewCommentReactionGroupsPayload = fmt.Errorf("invalid pull request review comment reaction groups response") )
View Source
var ( ErrMissingPullRequestBuildLink = githubdomain.ErrMissingPullRequestBuildLink ErrInvalidPullRequestBuildLink = githubdomain.ErrInvalidPullRequestBuildLink ErrPullRequestBuildRunJobNotFound = errors.New("pull request build run job not found") )
View Source
var ( ErrInvalidPullRequestResponse = fmt.Errorf("invalid pull request response") ErrInvalidPullRequestReviewMetadataResponse = fmt.Errorf("invalid pull request review metadata response") )
View Source
var ( ErrUnauthenticated = githubdomain.ErrUnauthenticated ErrInvalidConnectedUserResponse = errors.New("invalid connected user response") ErrEmptyConnectedUser = githubdomain.ErrEmptyConnectedUser )
View Source
var ErrEmptyPullRequestReviewBody = errors.New("empty pull request review body")
View Source
var ErrEmptyPullRequestTitle = errors.New("empty pull request title")
View Source
var ErrInvalidAssignableUsersResponse = fmt.Errorf("invalid assignable users response")
View Source
var ErrInvalidCommitDiffResponse = fmt.Errorf("invalid commit diff response")
View Source
var ErrInvalidGraphQLResponse = errors.New("invalid GraphQL response")
View Source
var ErrInvalidPendingPullRequestReviewResponse = errors.New("invalid pending pull request review response")
View Source
var ErrInvalidPullRequestCommentMutation = errors.New("invalid pull request comment mutation")
View Source
var ErrInvalidPullRequestDiffFilesResponse = fmt.Errorf("invalid pull request diff files response")
View Source
var ErrInvalidPullRequestReviewCommentMutation = errors.New("invalid pull request review comment mutation")
View Source
var ErrInvalidPullRequestReviewDeletion = errors.New("invalid pull request review deletion")
View Source
var ErrInvalidPullRequestReviewSubmission = githubdomain.ErrInvalidReviewEvent
View Source
var ErrInvalidPullRequestReviewThreadMutation = errors.New("invalid pull request review thread mutation")
View Source
var ErrInvalidPullRequestReviewThreadReply = errors.New("invalid pull request review thread reply")
View Source
var ErrInvalidPullRequestReviewThreadResponse = errors.New("invalid pull request review thread response")
View Source
var ErrInvalidPullRequestReviewThreadTarget = githubdomain.ErrInvalidReviewThreadTarget
View Source
var ErrInvalidPullRequestReviewThreadsResponse = fmt.Errorf("invalid pull request review threads response")
View Source
var ErrInvalidRepositoryMergeCapabilitiesResponse = errors.New("invalid repository merge capabilities response")
View Source
var ErrInvalidSubmittedPullRequestReviewResponse = errors.New("invalid submitted pull request review response")
View Source
var ErrMissingPullRequestReviewer = errors.New("missing pull request reviewer")
View Source
var SupportedReactionContents = []ReactionContent{ ReactionContentThumbsUp, ReactionContentThumbsDown, ReactionContentLaugh, ReactionContentHooray, ReactionContentConfused, ReactionContentHeart, ReactionContentRocket, ReactionContentEyes, }
Functions ¶
func FormatPullRequestBuildRunCommand ¶
func FormatPullRequestBuildRunCommand(repository string, check PullRequestStatusCheck) string
func FormatPullRequestBuildRunJobsCommand ¶
func FormatPullRequestBuildRunJobsCommand(repository string, check PullRequestStatusCheck) string
func FormatSearchAssignableUsersCommand ¶ added in v0.5.0
func ToDomainCommitDiff ¶ added in v0.7.0
func ToDomainCommitDiff(diff CommitDiff) githubdomain.CommitDiff
func ToDomainConnectedUser ¶ added in v0.4.0
func ToDomainConnectedUser(user ConnectedUser) githubdomain.ConnectedUser
func ToDomainIssueDetail ¶ added in v0.4.0
func ToDomainIssueDetail(detail IssueDetail) githubdomain.IssueDetail
func ToDomainNotification ¶ added in v0.4.0
func ToDomainNotification(notification Notification) githubdomain.Notification
func ToDomainNotificationBulkReadResult ¶ added in v0.4.0
func ToDomainNotificationBulkReadResult(result NotificationBulkReadResult) githubdomain.NotificationBulkReadResult
func ToDomainNotifications ¶ added in v0.4.0
func ToDomainNotifications(notifications []Notification) []githubdomain.Notification
func ToDomainPullRequestAuthor ¶ added in v0.4.0
func ToDomainPullRequestAuthor(author PullRequestAuthor) githubdomain.PullRequestAuthor
func ToDomainPullRequestAuthors ¶ added in v0.4.0
func ToDomainPullRequestAuthors(authors []PullRequestAuthor) []githubdomain.PullRequestAuthor
func ToDomainPullRequestBuildRunJob ¶ added in v0.4.0
func ToDomainPullRequestBuildRunJob(job PullRequestBuildRunJob) githubdomain.PullRequestBuildRunJob
func ToDomainPullRequestBuildRunJobs ¶ added in v0.4.0
func ToDomainPullRequestBuildRunJobs(jobs []PullRequestBuildRunJob) []githubdomain.PullRequestBuildRunJob
func ToDomainPullRequestDetail ¶ added in v0.4.0
func ToDomainPullRequestDetail(detail PullRequestDetail) githubdomain.PullRequestDetail
func ToDomainPullRequestDiff ¶ added in v0.4.0
func ToDomainPullRequestDiff(diff PullRequestDiff) githubdomain.PullRequestDiff
func ToDomainPullRequestReviewEvent ¶ added in v0.4.0
func ToDomainPullRequestReviewEvent(event PullRequestReviewEvent) githubdomain.PullRequestReviewEvent
func ToDomainPullRequestReviewThreadTarget ¶ added in v0.4.0
func ToDomainPullRequestReviewThreadTarget(target PullRequestReviewThreadTarget) githubdomain.PullRequestReviewThreadTarget
func ToDomainPullRequestStatusCheck ¶ added in v0.4.0
func ToDomainPullRequestStatusCheck(check PullRequestStatusCheck) githubdomain.PullRequestStatusCheck
func ToDomainPullRequestSummary ¶ added in v0.4.0
func ToDomainPullRequestSummary(pullRequest PullRequest) githubdomain.PullRequestSummary
func ToDomainPullRequests ¶ added in v0.4.0
func ToDomainPullRequests(pullRequests []PullRequest) []githubdomain.PullRequestSummary
func ToDomainReactionContent ¶ added in v0.4.0
func ToDomainReactionContent(content ReactionContent) githubdomain.ReactionContent
func ToDomainReleaseDetail ¶ added in v0.4.0
func ToDomainReleaseDetail(detail ReleaseDetail) githubdomain.ReleaseDetail
func ToDomainRepository ¶ added in v0.4.0
func ToDomainRepository(repository Repository) githubdomain.RepositoryRef
Types ¶
type AuthService ¶ added in v0.4.0
type AuthService struct {
// contains filtered or unexported fields
}
func NewAuthService ¶ added in v0.4.0
func NewAuthService() *AuthService
func NewAuthServiceWithRunner ¶ added in v0.4.0
func NewAuthServiceWithRunner(runner Runner) *AuthService
func (*AuthService) GetAuthToken ¶ added in v0.4.0
func (client *AuthService) GetAuthToken() (string, error)
type BuildAdapter ¶ added in v0.4.0
type BuildAdapter struct {
// contains filtered or unexported fields
}
func NewBuildAdapter ¶ added in v0.4.0
func NewBuildAdapter() *BuildAdapter
func NewBuildAdapterWithRunner ¶ added in v0.4.0
func NewBuildAdapterWithRunner(runner Runner) *BuildAdapter
func (*BuildAdapter) GetPullRequestBuildRun ¶ added in v0.4.0
func (adapter *BuildAdapter) GetPullRequestBuildRun(repository string, check githubdomain.PullRequestStatusCheck) (string, error)
func (*BuildAdapter) GetPullRequestBuildRunJobLog ¶ added in v0.4.0
func (adapter *BuildAdapter) GetPullRequestBuildRunJobLog(repository string, jobDatabaseID int) (string, error)
func (*BuildAdapter) GetPullRequestBuildRunJobLogForCheck ¶ added in v0.4.0
func (adapter *BuildAdapter) GetPullRequestBuildRunJobLogForCheck(repository string, check githubdomain.PullRequestStatusCheck) (githubdomain.PullRequestBuildRunJob, string, error)
func (*BuildAdapter) GetPullRequestBuildRunJobs ¶ added in v0.4.0
func (adapter *BuildAdapter) GetPullRequestBuildRunJobs(repository string, check githubdomain.PullRequestStatusCheck) ([]githubdomain.PullRequestBuildRunJob, error)
type BuildAssembler ¶ added in v0.4.0
type BuildAssembler struct {
LoadBuildInfos func(repository string, number int) ([]PullRequestBuildInfo, error)
}
func (BuildAssembler) FindBuildInfo ¶ added in v0.4.0
func (assembler BuildAssembler) FindBuildInfo(repository string, number int, check PullRequestStatusCheck) (PullRequestBuildInfo, error)
func (BuildAssembler) HydrateStatusCheckLinks ¶ added in v0.4.0
func (assembler BuildAssembler) HydrateStatusCheckLinks(repository string, number int, checks []PullRequestStatusCheck) []PullRequestStatusCheck
func (BuildAssembler) ParseBuildInfos ¶ added in v0.4.0
func (BuildAssembler) ParseBuildInfos(stdout []byte) ([]PullRequestBuildInfo, error)
type BuildService ¶ added in v0.4.0
type BuildService struct {
// contains filtered or unexported fields
}
func NewBuildService ¶ added in v0.4.0
func NewBuildService() *BuildService
func NewBuildServiceWithRunner ¶ added in v0.4.0
func NewBuildServiceWithRunner(runner Runner) *BuildService
func (*BuildService) GetPullRequestBuildInfo ¶ added in v0.4.0
func (client *BuildService) GetPullRequestBuildInfo(repository string, number int, check PullRequestStatusCheck) (PullRequestBuildInfo, error)
func (*BuildService) GetPullRequestBuildRun ¶ added in v0.4.0
func (client *BuildService) GetPullRequestBuildRun(repository string, check PullRequestStatusCheck) (string, error)
func (*BuildService) GetPullRequestBuildRunJobLog ¶ added in v0.4.0
func (client *BuildService) GetPullRequestBuildRunJobLog(repository string, jobDatabaseID int) (string, error)
func (*BuildService) GetPullRequestBuildRunJobLogForCheck ¶ added in v0.4.0
func (client *BuildService) GetPullRequestBuildRunJobLogForCheck(repository string, check PullRequestStatusCheck) (PullRequestBuildRunJob, string, error)
func (*BuildService) GetPullRequestBuildRunJobs ¶ added in v0.4.0
func (client *BuildService) GetPullRequestBuildRunJobs(repository string, check PullRequestStatusCheck) ([]PullRequestBuildRunJob, error)
type CommandFormatter ¶ added in v0.4.0
func NewCommandFormatter ¶ added in v0.4.0
func NewCommandFormatter() CommandFormatter
type CommandResult ¶
type CommitDiff ¶ added in v0.7.0
type CommitDiff struct {
Files []PullRequestDiffFile `json:"files"`
}
func CommitDiffFromDomain ¶ added in v0.7.0
func CommitDiffFromDomain(diff githubdomain.CommitDiff) CommitDiff
type ConnectedUser ¶
type ConnectedUser struct {
Login string `json:"login"`
Name string `json:"name"`
Bio string `json:"bio"`
Company string `json:"company"`
Location string `json:"location"`
PublicRepos int `json:"public_repos"`
Followers int `json:"followers"`
URL string `json:"html_url"`
}
func ConnectedUserFromDomain ¶ added in v0.4.0
func ConnectedUserFromDomain(user githubdomain.ConnectedUser) ConnectedUser
type ErrorClassifier ¶ added in v0.4.0
type ErrorClassifier interface {
Classify(Command, CommandResult, error) error
}
func NewErrorClassifier ¶ added in v0.4.0
func NewErrorClassifier(formatter CommandFormatter) ErrorClassifier
type Executor ¶ added in v0.4.0
type Executor interface {
Execute(Command) (CommandResult, error)
}
func NewExecutor ¶ added in v0.4.0
func NewExecutor(runner Runner, formatter CommandFormatter, classifier ErrorClassifier) Executor
type GraphQLClient ¶ added in v0.4.0
type GraphQLClient interface {
Query(GraphQLRequest) (CommandResult, error)
}
func NewGraphQLClient ¶ added in v0.4.0
func NewGraphQLClient(executor Executor) GraphQLClient
type GraphQLRequest ¶ added in v0.4.0
type GraphQLRequest struct {
Query string
Variables []GraphQLVariable
DisplayArgs []string
}
type GraphQLVariable ¶ added in v0.4.0
type IssueDetail ¶
type IssueDetail struct {
Title string `json:"title"`
Number int `json:"number"`
URL string `json:"html_url"`
Body string `json:"body"`
BodyHTML string `json:"bodyHTML,omitempty"`
Author *PullRequestAuthor `json:"user"`
State string `json:"state"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
Labels []PullRequestLabel `json:"labels"`
Assignees []PullRequestAuthor `json:"assignees"`
Comments int `json:"comments"`
}
func IssueDetailFromDomain ¶ added in v0.4.0
func IssueDetailFromDomain(detail githubdomain.IssueDetail) IssueDetail
type MarkdownService ¶ added in v0.4.0
type MarkdownService struct {
// contains filtered or unexported fields
}
func NewMarkdownService ¶ added in v0.4.0
func NewMarkdownService() *MarkdownService
func NewMarkdownServiceWithRunner ¶ added in v0.4.0
func NewMarkdownServiceWithRunner(runner Runner) *MarkdownService
func (*MarkdownService) RenderMarkdownHTML ¶ added in v0.4.0
func (client *MarkdownService) RenderMarkdownHTML(repository string, markdown string) (string, error)
type Notification ¶
type Notification struct {
ID string `json:"id"`
Done bool `json:"done"`
Unread bool `json:"unread"`
Reason string `json:"reason"`
UpdatedAt string `json:"updated_at"`
LastReadAt string `json:"last_read_at"`
URL string `json:"url"`
SubscriptionURL string `json:"subscription_url"`
Repository Repository `json:"repository"`
Subject NotificationSubject `json:"subject"`
}
func NotificationFromDomain ¶ added in v0.4.0
func NotificationFromDomain(notification githubdomain.Notification) Notification
func NotificationsFromDomain ¶ added in v0.4.0
func NotificationsFromDomain(notifications []githubdomain.Notification) []Notification
type NotificationAdapter ¶ added in v0.4.0
type NotificationAdapter struct {
// contains filtered or unexported fields
}
func NewNotificationAdapter ¶ added in v0.4.0
func NewNotificationAdapter() *NotificationAdapter
func NewNotificationAdapterWithRunner ¶ added in v0.4.0
func NewNotificationAdapterWithRunner(runner Runner) *NotificationAdapter
func (*NotificationAdapter) GetIssueDetail ¶ added in v0.4.0
func (adapter *NotificationAdapter) GetIssueDetail(repository string, number int) (githubdomain.IssueDetail, error)
func (*NotificationAdapter) GetReleaseDetail ¶ added in v0.4.0
func (adapter *NotificationAdapter) GetReleaseDetail(repository string, id int) (githubdomain.ReleaseDetail, error)
func (*NotificationAdapter) ListNotifications ¶ added in v0.4.0
func (adapter *NotificationAdapter) ListNotifications() ([]githubdomain.Notification, error)
func (*NotificationAdapter) MarkAllNotificationsDone ¶ added in v0.4.0
func (adapter *NotificationAdapter) MarkAllNotificationsDone(notifications []githubdomain.Notification) (int, error)
func (*NotificationAdapter) MarkAllNotificationsRead ¶ added in v0.4.0
func (adapter *NotificationAdapter) MarkAllNotificationsRead() (githubdomain.NotificationBulkReadResult, error)
func (*NotificationAdapter) MarkNotificationDone ¶ added in v0.4.0
func (adapter *NotificationAdapter) MarkNotificationDone(threadID string) error
func (*NotificationAdapter) MarkNotificationRead ¶ added in v0.4.0
func (adapter *NotificationAdapter) MarkNotificationRead(threadID string) error
type NotificationAssembler ¶ added in v0.4.0
type NotificationAssembler struct{}
func (NotificationAssembler) ParseIssueDetail ¶ added in v0.4.0
func (NotificationAssembler) ParseIssueDetail(stdout []byte) (IssueDetail, error)
func (NotificationAssembler) ParseList ¶ added in v0.4.0
func (NotificationAssembler) ParseList(stdout []byte) ([]Notification, error)
func (NotificationAssembler) ParseReleaseDetail ¶ added in v0.4.0
func (NotificationAssembler) ParseReleaseDetail(stdout []byte) (ReleaseDetail, error)
type NotificationBulkReadResult ¶
type NotificationBulkReadResult struct {
Accepted bool
}
func NotificationBulkReadResultFromDomain ¶ added in v0.4.0
func NotificationBulkReadResultFromDomain(result githubdomain.NotificationBulkReadResult) NotificationBulkReadResult
type NotificationService ¶ added in v0.4.0
type NotificationService struct {
// contains filtered or unexported fields
}
func NewNotificationService ¶ added in v0.4.0
func NewNotificationService() *NotificationService
func NewNotificationServiceWithRunner ¶ added in v0.4.0
func NewNotificationServiceWithRunner(runner Runner) *NotificationService
func (*NotificationService) GetIssueDetail ¶ added in v0.4.0
func (client *NotificationService) GetIssueDetail(repository string, number int) (IssueDetail, error)
func (*NotificationService) GetReleaseDetail ¶ added in v0.4.0
func (client *NotificationService) GetReleaseDetail(repository string, id int) (ReleaseDetail, error)
func (*NotificationService) ListNotifications ¶ added in v0.4.0
func (client *NotificationService) ListNotifications() ([]Notification, error)
func (*NotificationService) MarkAllNotificationsDone ¶ added in v0.4.0
func (client *NotificationService) MarkAllNotificationsDone(notifications []Notification) (int, error)
func (*NotificationService) MarkAllNotificationsRead ¶ added in v0.4.0
func (client *NotificationService) MarkAllNotificationsRead() (NotificationBulkReadResult, error)
func (*NotificationService) MarkNotificationDone ¶ added in v0.4.0
func (client *NotificationService) MarkNotificationDone(threadID string) error
func (*NotificationService) MarkNotificationRead ¶ added in v0.4.0
func (client *NotificationService) MarkNotificationRead(threadID string) error
type NotificationSubject ¶
type Paginator ¶ added in v0.4.0
func NewPaginator ¶ added in v0.4.0
func NewPaginator() Paginator
type PullRequest ¶
type PullRequest struct {
ID string `json:"id"`
Title string `json:"title"`
Number int `json:"number"`
Repository Repository `json:"repository"`
URL string `json:"url"`
Body string `json:"body"`
State string `json:"state"`
IsDraft bool `json:"isDraft"`
UpdatedAt string `json:"updatedAt"`
ReviewDecision string `json:"reviewDecision"`
ReviewRequests []PullRequestReviewRequest `json:"reviewRequests"`
MergeStateStatus string `json:"mergeStateStatus"`
Mergeable string `json:"mergeable"`
AutoMergeRequest *PullRequestAutoMergeRequest `json:"autoMergeRequest,omitempty"`
IsMergeQueueEnabled bool `json:"isMergeQueueEnabled,omitempty"`
IsInMergeQueue bool `json:"isInMergeQueue,omitempty"`
MergeQueueEntry *PullRequestMergeQueueEntry `json:"mergeQueueEntry,omitempty"`
ViewerCanEnableAutoMerge bool `json:"viewerCanEnableAutoMerge,omitempty"`
StatusCheckRollupState string `json:"statusCheckRollupState"`
}
func PullRequestSummaryFromDomain ¶ added in v0.4.0
func PullRequestSummaryFromDomain(pullRequest githubdomain.PullRequestSummary) PullRequest
func PullRequestsFromDomain ¶ added in v0.4.0
func PullRequestsFromDomain(pullRequests []githubdomain.PullRequestSummary) []PullRequest
type PullRequestAuthor ¶
type PullRequestAuthor struct {
Login string `json:"login"`
Name string `json:"name"`
IsBot bool `json:"is_bot"`
}
func PullRequestAuthorFromDomain ¶ added in v0.4.0
func PullRequestAuthorFromDomain(author githubdomain.PullRequestAuthor) PullRequestAuthor
func PullRequestAuthorsFromDomain ¶ added in v0.4.0
func PullRequestAuthorsFromDomain(authors []githubdomain.PullRequestAuthor) []PullRequestAuthor
type PullRequestAutoMergeRequest ¶ added in v0.6.0
type PullRequestAutoMergeRequest struct {
EnabledAt string `json:"enabledAt"`
}
type PullRequestBuildInfo ¶
type PullRequestBuildInfo struct {
Bucket string `json:"bucket"`
CompletedAt string `json:"completedAt"`
Description string `json:"description"`
Event string `json:"event"`
Link string `json:"link"`
Name string `json:"name"`
StartedAt string `json:"startedAt"`
State string `json:"state"`
Workflow string `json:"workflow"`
}
type PullRequestBuildRunJob ¶
type PullRequestBuildRunJob struct {
DatabaseID int `json:"databaseId"`
Name string `json:"name"`
Status string `json:"status"`
Conclusion string `json:"conclusion"`
URL string `json:"url"`
}
func PullRequestBuildRunJobFromDomain ¶ added in v0.4.0
func PullRequestBuildRunJobFromDomain(job githubdomain.PullRequestBuildRunJob) PullRequestBuildRunJob
func PullRequestBuildRunJobsFromDomain ¶ added in v0.4.0
func PullRequestBuildRunJobsFromDomain(jobs []githubdomain.PullRequestBuildRunJob) []PullRequestBuildRunJob
type PullRequestComment ¶
type PullRequestComment struct {
ID string `json:"id"`
Author *PullRequestCommentAuthor `json:"author"`
Body string `json:"body"`
BodyHTML string `json:"bodyHTML,omitempty"`
CreatedAt string `json:"createdAt"`
URL string `json:"url"`
DiffHunk string `json:"diffHunk"`
State string `json:"state"`
ViewerDidAuthor bool `json:"viewerDidAuthor"`
ReactionGroups []ReactionGroup `json:"reactionGroups,omitempty"`
}
type PullRequestCommentAuthor ¶
type PullRequestCommentAuthor struct {
Login string `json:"login"`
}
type PullRequestCommit ¶
type PullRequestCommit struct {
OID string `json:"oid"`
MessageHeadline string `json:"messageHeadline"`
MessageBody string `json:"messageBody"`
MessageBodyHTML string `json:"messageBodyHTML,omitempty"`
AuthoredDate string `json:"authoredDate"`
CommittedDate string `json:"committedDate"`
Authors []PullRequestCommitAuthor `json:"authors"`
}
type PullRequestCommitAuthor ¶
type PullRequestDetail ¶
type PullRequestDetail struct {
ID string `json:"id,omitempty"`
Title string `json:"title"`
Number int `json:"number"`
URL string `json:"url"`
Body string `json:"body"`
BodyHTML string `json:"bodyHTML,omitempty"`
Author *PullRequestAuthor `json:"author"`
State string `json:"state"`
IsDraft bool `json:"isDraft"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
Labels []PullRequestLabel `json:"labels"`
Assignees []PullRequestAuthor `json:"assignees"`
ReviewDecision string `json:"reviewDecision"`
ReviewRequests []PullRequestReviewRequest `json:"reviewRequests"`
BaseRefName string `json:"baseRefName"`
HeadRefName string `json:"headRefName"`
MergeStateStatus string `json:"mergeStateStatus"`
Mergeable string `json:"mergeable"`
AutoMergeRequest *PullRequestAutoMergeRequest `json:"autoMergeRequest,omitempty"`
IsMergeQueueEnabled bool `json:"isMergeQueueEnabled,omitempty"`
IsInMergeQueue bool `json:"isInMergeQueue,omitempty"`
MergeQueueEntry *PullRequestMergeQueueEntry `json:"mergeQueueEntry,omitempty"`
ViewerCanEnableAutoMerge bool `json:"viewerCanEnableAutoMerge,omitempty"`
OutOfDateWithBase bool `json:"outOfDateWithBase,omitempty"`
ReactionGroups []ReactionGroup `json:"reactionGroups,omitempty"`
Comments []PullRequestComment `json:"comments"`
Commits []PullRequestCommit `json:"commits"`
Reviews []PullRequestReview `json:"reviews"`
InlineComments []PullRequestInlineComment `json:"-"`
InlineCommentThreads []PullRequestReviewThread `json:"-"`
Additions int `json:"additions"`
Deletions int `json:"deletions"`
ChangedFiles int `json:"changedFiles"`
StatusCheckRollup []PullRequestStatusCheck `json:"statusCheckRollup"`
}
func PullRequestDetailFromDomain ¶ added in v0.4.0
func PullRequestDetailFromDomain(detail githubdomain.PullRequestDetail) PullRequestDetail
type PullRequestDetailAdapter ¶ added in v0.4.0
type PullRequestDetailAdapter struct {
// contains filtered or unexported fields
}
func NewPullRequestDetailAdapter ¶ added in v0.4.0
func NewPullRequestDetailAdapter() *PullRequestDetailAdapter
func NewPullRequestDetailAdapterWithRunner ¶ added in v0.4.0
func NewPullRequestDetailAdapterWithRunner(runner Runner) *PullRequestDetailAdapter
func (*PullRequestDetailAdapter) GetCommitDiff ¶ added in v0.7.0
func (adapter *PullRequestDetailAdapter) GetCommitDiff(repository string, commitOID string) (githubdomain.CommitDiff, error)
func (*PullRequestDetailAdapter) GetPullRequestDetail ¶ added in v0.4.0
func (adapter *PullRequestDetailAdapter) GetPullRequestDetail(repository string, number int) (githubdomain.PullRequestDetail, error)
func (*PullRequestDetailAdapter) GetPullRequestDiff ¶ added in v0.4.0
func (adapter *PullRequestDetailAdapter) GetPullRequestDiff(repository string, number int) (githubdomain.PullRequestDiff, error)
func (*PullRequestDetailAdapter) GetPullRequestFileTeamOwners ¶ added in v0.4.0
type PullRequestDetailAssembler ¶ added in v0.4.0
type PullRequestDetailAssembler struct {
LoadBaseDetail func(repository string, number int) (PullRequestDetail, error)
LoadMergeQueueMetadata func(repository string, number int) (pullRequestMergeQueueMetadata, error)
LoadOutOfDateWithBase func(repository string, detail PullRequestDetail) (bool, error)
HydrateBuildLinks func(repository string, number int, checks []PullRequestStatusCheck) []PullRequestStatusCheck
ListInlineComments func(repository string, number int) ([]PullRequestInlineComment, error)
ListReviewThreads func(repository string, number int) ([]PullRequestReviewThread, error)
ListReactionTargets func(repository string, number int) (pullRequestReactionTargets, error)
ListReviewCommentReactionGroups func(ids []string) (map[string][]ReactionGroup, error)
}
func (PullRequestDetailAssembler) Assemble ¶ added in v0.4.0
func (assembler PullRequestDetailAssembler) Assemble(repository string, number int) (PullRequestDetail, error)
type PullRequestDetailService ¶ added in v0.4.0
type PullRequestDetailService struct {
// contains filtered or unexported fields
}
func NewPullRequestDetailService ¶ added in v0.4.0
func NewPullRequestDetailService() *PullRequestDetailService
func NewPullRequestDetailServiceWithRunner ¶ added in v0.4.0
func NewPullRequestDetailServiceWithRunner(runner Runner) *PullRequestDetailService
func (*PullRequestDetailService) GetCommitDiff ¶ added in v0.7.0
func (client *PullRequestDetailService) GetCommitDiff(repository string, commitOID string) (CommitDiff, error)
func (*PullRequestDetailService) GetPullRequestDetail ¶ added in v0.4.0
func (client *PullRequestDetailService) GetPullRequestDetail(repository string, number int) (PullRequestDetail, error)
func (*PullRequestDetailService) GetPullRequestDiff ¶ added in v0.4.0
func (client *PullRequestDetailService) GetPullRequestDiff(repository string, number int) (PullRequestDiff, error)
func (*PullRequestDetailService) GetPullRequestFileTeamOwners ¶ added in v0.4.0
type PullRequestDiff ¶
type PullRequestDiff struct {
UnifiedDiff string
Files []PullRequestDiffFile
Threads []PullRequestReviewThread
FileTeamOwnersAttempted bool `json:"fileTeamOwnersAttempted,omitempty"`
}
func PullRequestDiffFromDomain ¶ added in v0.4.0
func PullRequestDiffFromDomain(diff githubdomain.PullRequestDiff) PullRequestDiff
type PullRequestDiffAssembler ¶ added in v0.4.0
type PullRequestDiffAssembler struct {
LoadUnifiedDiff func(repository string, number int) (string, error)
LoadDiffFiles func(repository string, number int) ([]PullRequestDiffFile, error)
ListReviewThreads func(repository string, number int) ([]PullRequestReviewThread, error)
}
func (PullRequestDiffAssembler) Assemble ¶ added in v0.4.0
func (assembler PullRequestDiffAssembler) Assemble(repository string, number int) (PullRequestDiff, error)
type PullRequestDiffFile ¶
type PullRequestInlineComment ¶
type PullRequestInlineComment struct {
ID string `json:"node_id"`
Author *PullRequestCommentAuthor `json:"user"`
Body string `json:"body"`
BodyHTML string `json:"bodyHTML,omitempty"`
CreatedAt string `json:"created_at"`
URL string `json:"html_url"`
Path string `json:"path"`
DiffHunk string `json:"diff_hunk"`
Line int `json:"line"`
OriginalLine int `json:"original_line"`
StartLine int `json:"start_line"`
OriginalStartLine int `json:"original_start_line"`
Side string `json:"side"`
StartSide string `json:"start_side"`
SubjectType string `json:"subject_type"`
ReactionGroups []ReactionGroup `json:"reactionGroups,omitempty"`
}
type PullRequestLabel ¶
type PullRequestLabel struct {
Name string `json:"name"`
}
type PullRequestListAdapter ¶ added in v0.4.0
type PullRequestListAdapter struct {
// contains filtered or unexported fields
}
func NewPullRequestListAdapter ¶ added in v0.4.0
func NewPullRequestListAdapter() *PullRequestListAdapter
func NewPullRequestListAdapterWithRunner ¶ added in v0.4.0
func NewPullRequestListAdapterWithRunner(runner Runner) *PullRequestListAdapter
func (*PullRequestListAdapter) ListPullRequests ¶ added in v0.4.0
func (adapter *PullRequestListAdapter) ListPullRequests(commandArguments []string) ([]githubdomain.PullRequestSummary, error)
type PullRequestListService ¶ added in v0.4.0
type PullRequestListService struct {
// contains filtered or unexported fields
}
func NewPullRequestListService ¶ added in v0.4.0
func NewPullRequestListService() *PullRequestListService
func NewPullRequestListServiceWithRunner ¶ added in v0.4.0
func NewPullRequestListServiceWithRunner(runner Runner) *PullRequestListService
func (*PullRequestListService) ListPullRequests ¶ added in v0.4.0
func (client *PullRequestListService) ListPullRequests(commandArguments []string) ([]PullRequest, error)
type PullRequestMergeQueueEntry ¶ added in v0.7.0
type PullRequestMutationAdapter ¶ added in v0.4.0
type PullRequestMutationAdapter struct {
// contains filtered or unexported fields
}
func NewPullRequestMutationAdapter ¶ added in v0.4.0
func NewPullRequestMutationAdapter() *PullRequestMutationAdapter
func NewPullRequestMutationAdapterWithRunner ¶ added in v0.4.0
func NewPullRequestMutationAdapterWithRunner(runner Runner) *PullRequestMutationAdapter
func (*PullRequestMutationAdapter) ClosePullRequest ¶ added in v0.4.0
func (adapter *PullRequestMutationAdapter) ClosePullRequest(repository string, number int) error
func (*PullRequestMutationAdapter) CommentOnPullRequest ¶ added in v0.4.0
func (adapter *PullRequestMutationAdapter) CommentOnPullRequest(repository string, number int, body string) error
func (*PullRequestMutationAdapter) ConvertPullRequestToDraft ¶ added in v0.4.0
func (adapter *PullRequestMutationAdapter) ConvertPullRequestToDraft(repository string, number int) error
func (*PullRequestMutationAdapter) DeletePullRequestComment ¶ added in v0.4.0
func (adapter *PullRequestMutationAdapter) DeletePullRequestComment(commentID string) error
func (*PullRequestMutationAdapter) DequeuePullRequest ¶ added in v0.7.0
func (adapter *PullRequestMutationAdapter) DequeuePullRequest(pullRequestID string) error
func (*PullRequestMutationAdapter) DisablePullRequestAutoMerge ¶ added in v0.6.0
func (adapter *PullRequestMutationAdapter) DisablePullRequestAutoMerge(repository string, number int) error
func (*PullRequestMutationAdapter) EditPullRequestDescription ¶ added in v0.4.0
func (adapter *PullRequestMutationAdapter) EditPullRequestDescription(repository string, number int, body string) error
func (*PullRequestMutationAdapter) EditPullRequestTitle ¶ added in v0.4.0
func (adapter *PullRequestMutationAdapter) EditPullRequestTitle(repository string, number int, title string) error
func (*PullRequestMutationAdapter) EnablePullRequestAutoMerge ¶ added in v0.6.0
func (adapter *PullRequestMutationAdapter) EnablePullRequestAutoMerge(repository string, number int) error
func (*PullRequestMutationAdapter) EnqueuePullRequest ¶ added in v0.7.0
func (adapter *PullRequestMutationAdapter) EnqueuePullRequest(pullRequestID string) error
func (*PullRequestMutationAdapter) ListAssignableUsers ¶ added in v0.4.0
func (adapter *PullRequestMutationAdapter) ListAssignableUsers(repository string) ([]githubdomain.PullRequestAuthor, error)
func (*PullRequestMutationAdapter) MarkPullRequestReadyForReview ¶ added in v0.4.0
func (adapter *PullRequestMutationAdapter) MarkPullRequestReadyForReview(repository string, number int) error
func (*PullRequestMutationAdapter) MergePullRequestWhenReady ¶ added in v0.7.2
func (adapter *PullRequestMutationAdapter) MergePullRequestWhenReady(repository string, number int, pullRequestID string) error
func (*PullRequestMutationAdapter) OpenPullRequestInBrowser ¶ added in v0.4.0
func (adapter *PullRequestMutationAdapter) OpenPullRequestInBrowser(repository string, number int) error
func (*PullRequestMutationAdapter) ReopenPullRequest ¶ added in v0.4.0
func (adapter *PullRequestMutationAdapter) ReopenPullRequest(repository string, number int) error
func (*PullRequestMutationAdapter) RequestPullRequestReviewer ¶ added in v0.4.0
func (adapter *PullRequestMutationAdapter) RequestPullRequestReviewer(repository string, number int, reviewerLogin string) error
func (*PullRequestMutationAdapter) SearchAssignableUsers ¶ added in v0.5.0
func (adapter *PullRequestMutationAdapter) SearchAssignableUsers(repository string, query string) ([]githubdomain.PullRequestAuthor, error)
func (*PullRequestMutationAdapter) SquashMergePullRequest ¶ added in v0.4.0
func (adapter *PullRequestMutationAdapter) SquashMergePullRequest(repository string, number int) error
func (*PullRequestMutationAdapter) UpdatePullRequestAssignees ¶ added in v0.4.0
func (*PullRequestMutationAdapter) UpdatePullRequestBranch ¶ added in v0.4.0
func (adapter *PullRequestMutationAdapter) UpdatePullRequestBranch(repository string, number int) error
func (*PullRequestMutationAdapter) UpdatePullRequestComment ¶ added in v0.4.0
func (adapter *PullRequestMutationAdapter) UpdatePullRequestComment(commentID string, body string) error
type PullRequestMutationService ¶ added in v0.4.0
type PullRequestMutationService struct {
// contains filtered or unexported fields
}
func NewPullRequestMutationService ¶ added in v0.4.0
func NewPullRequestMutationService() *PullRequestMutationService
func NewPullRequestMutationServiceWithRunner ¶ added in v0.4.0
func NewPullRequestMutationServiceWithRunner(runner Runner) *PullRequestMutationService
func (*PullRequestMutationService) ClosePullRequest ¶ added in v0.4.0
func (client *PullRequestMutationService) ClosePullRequest(repository string, number int) error
func (*PullRequestMutationService) CommentOnPullRequest ¶ added in v0.4.0
func (client *PullRequestMutationService) CommentOnPullRequest(repository string, number int, body string) error
func (*PullRequestMutationService) ConvertPullRequestToDraft ¶ added in v0.4.0
func (client *PullRequestMutationService) ConvertPullRequestToDraft(repository string, number int) error
func (*PullRequestMutationService) DeletePullRequestComment ¶ added in v0.4.0
func (client *PullRequestMutationService) DeletePullRequestComment(commentID string) error
func (*PullRequestMutationService) DequeuePullRequest ¶ added in v0.7.0
func (client *PullRequestMutationService) DequeuePullRequest(pullRequestID string) error
func (*PullRequestMutationService) DisablePullRequestAutoMerge ¶ added in v0.6.0
func (client *PullRequestMutationService) DisablePullRequestAutoMerge(repository string, number int) error
func (*PullRequestMutationService) EditPullRequestDescription ¶ added in v0.4.0
func (client *PullRequestMutationService) EditPullRequestDescription(repository string, number int, body string) error
func (*PullRequestMutationService) EditPullRequestTitle ¶ added in v0.4.0
func (client *PullRequestMutationService) EditPullRequestTitle(repository string, number int, title string) error
func (*PullRequestMutationService) EnablePullRequestAutoMerge ¶ added in v0.6.0
func (client *PullRequestMutationService) EnablePullRequestAutoMerge(repository string, number int) error
func (*PullRequestMutationService) EnqueuePullRequest ¶ added in v0.7.0
func (client *PullRequestMutationService) EnqueuePullRequest(pullRequestID string) error
func (*PullRequestMutationService) ListAssignableUsers ¶ added in v0.4.0
func (client *PullRequestMutationService) ListAssignableUsers(repository string) ([]PullRequestAuthor, error)
func (*PullRequestMutationService) MarkPullRequestReadyForReview ¶ added in v0.4.0
func (client *PullRequestMutationService) MarkPullRequestReadyForReview(repository string, number int) error
func (*PullRequestMutationService) MergePullRequestWhenReady ¶ added in v0.7.2
func (client *PullRequestMutationService) MergePullRequestWhenReady(repository string, number int, pullRequestID string) error
func (*PullRequestMutationService) OpenPullRequestInBrowser ¶ added in v0.4.0
func (client *PullRequestMutationService) OpenPullRequestInBrowser(repository string, number int) error
func (*PullRequestMutationService) ReopenPullRequest ¶ added in v0.4.0
func (client *PullRequestMutationService) ReopenPullRequest(repository string, number int) error
func (*PullRequestMutationService) RequestPullRequestReviewer ¶ added in v0.4.0
func (client *PullRequestMutationService) RequestPullRequestReviewer(repository string, number int, reviewerLogin string) error
func (*PullRequestMutationService) SearchAssignableUsers ¶ added in v0.5.0
func (client *PullRequestMutationService) SearchAssignableUsers(repository string, query string) ([]PullRequestAuthor, error)
func (*PullRequestMutationService) SquashMergePullRequest ¶ added in v0.4.0
func (client *PullRequestMutationService) SquashMergePullRequest(repository string, number int) error
func (*PullRequestMutationService) UpdatePullRequestAssignees ¶ added in v0.4.0
func (*PullRequestMutationService) UpdatePullRequestBranch ¶ added in v0.4.0
func (client *PullRequestMutationService) UpdatePullRequestBranch(repository string, number int) error
func (*PullRequestMutationService) UpdatePullRequestComment ¶ added in v0.4.0
func (client *PullRequestMutationService) UpdatePullRequestComment(commentID string, body string) error
type PullRequestRequestedReviewer ¶
type PullRequestRequestedReviewer struct {
TypeName string `json:"__typename"`
Login string `json:"login"`
Name string `json:"name"`
Slug string `json:"slug"`
Organization *PullRequestReviewRequestOrganization `json:"organization"`
}
type PullRequestReview ¶
type PullRequestReview struct {
ID string `json:"id"`
Author *PullRequestCommentAuthor `json:"author"`
Body string `json:"body"`
State string `json:"state"`
SubmittedAt string `json:"submittedAt"`
ReactionGroups []ReactionGroup `json:"reactionGroups,omitempty"`
}
type PullRequestReviewEvent ¶
type PullRequestReviewEvent string
const ( PullRequestReviewEventComment PullRequestReviewEvent = "COMMENT" PullRequestReviewEventApprove PullRequestReviewEvent = "APPROVE" PullRequestReviewEventRequestChanges PullRequestReviewEvent = "REQUEST_CHANGES" )
func PullRequestReviewEventFromDomain ¶ added in v0.4.0
func PullRequestReviewEventFromDomain(event githubdomain.PullRequestReviewEvent) PullRequestReviewEvent
type PullRequestReviewRequest ¶
type PullRequestReviewRequest struct {
RequestedReviewer PullRequestRequestedReviewer `json:"requestedReviewer"`
}
func (*PullRequestReviewRequest) UnmarshalJSON ¶
func (reviewRequest *PullRequestReviewRequest) UnmarshalJSON(data []byte) error
type PullRequestReviewRequestOrganization ¶
type PullRequestReviewRequestOrganization struct {
Login string `json:"login"`
}
type PullRequestReviewThread ¶
type PullRequestReviewThread struct {
ID string `json:"id"`
IsResolved bool `json:"isResolved"`
IsOutdated bool `json:"isOutdated"`
ViewerCanResolve bool `json:"viewerCanResolve"`
ViewerCanUnresolve bool `json:"viewerCanUnresolve"`
Path string `json:"path"`
Line int `json:"line"`
OriginalLine int `json:"originalLine"`
StartLine int `json:"startLine"`
OriginalStartLine int `json:"originalStartLine"`
DiffSide string `json:"diffSide"`
StartDiffSide string `json:"startDiffSide"`
Comments []PullRequestComment `json:"-"`
}
type PullRequestReviewThreadTarget ¶
type PullRequestReviewThreadTarget struct {
Path string
Line int
Side string
StartLine int
StartSide string
SubjectType string
}
func PullRequestReviewThreadTargetFromDomain ¶ added in v0.4.0
func PullRequestReviewThreadTargetFromDomain(target githubdomain.PullRequestReviewThreadTarget) PullRequestReviewThreadTarget
type PullRequestStatusCheck ¶
type PullRequestStatusCheck struct {
TypeName string `json:"__typename"`
Name string `json:"name"`
Status string `json:"status"`
Conclusion string `json:"conclusion"`
WorkflowName string `json:"workflowName"`
Link string `json:"link,omitempty"`
}
func PullRequestStatusCheckFromDomain ¶ added in v0.4.0
func PullRequestStatusCheckFromDomain(check githubdomain.PullRequestStatusCheck) PullRequestStatusCheck
type RESTClient ¶ added in v0.4.0
type RESTClient interface {
Do(RESTRequest) (CommandResult, error)
}
func NewRESTClient ¶ added in v0.4.0
func NewRESTClient(executor Executor) RESTClient
type RESTHeader ¶ added in v0.4.0
type RESTRequest ¶ added in v0.4.0
type ReactionAdapter ¶ added in v0.4.0
type ReactionAdapter struct {
// contains filtered or unexported fields
}
func NewReactionAdapter ¶ added in v0.4.0
func NewReactionAdapter() *ReactionAdapter
func NewReactionAdapterWithRunner ¶ added in v0.4.0
func NewReactionAdapterWithRunner(runner Runner) *ReactionAdapter
func (*ReactionAdapter) AddReaction ¶ added in v0.4.0
func (adapter *ReactionAdapter) AddReaction(subjectID string, content githubdomain.ReactionContent) error
func (*ReactionAdapter) RemoveReaction ¶ added in v0.4.0
func (adapter *ReactionAdapter) RemoveReaction(subjectID string, content githubdomain.ReactionContent) error
type ReactionContent ¶
type ReactionContent string
const ( ReactionContentThumbsUp ReactionContent = "+1" ReactionContentThumbsDown ReactionContent = "-1" ReactionContentLaugh ReactionContent = "laugh" ReactionContentHooray ReactionContent = "hooray" ReactionContentConfused ReactionContent = "confused" ReactionContentHeart ReactionContent = "heart" ReactionContentRocket ReactionContent = "rocket" ReactionContentEyes ReactionContent = "eyes" )
func ReactionContentFromDomain ¶ added in v0.4.0
func ReactionContentFromDomain(content githubdomain.ReactionContent) ReactionContent
type ReactionGroup ¶
type ReactionGroup struct {
Content ReactionContent `json:"content"`
TotalCount int `json:"totalCount"`
ViewerHasReacted bool `json:"viewerHasReacted"`
}
func (*ReactionGroup) UnmarshalJSON ¶
func (group *ReactionGroup) UnmarshalJSON(data []byte) error
type ReactionService ¶ added in v0.4.0
type ReactionService struct {
// contains filtered or unexported fields
}
func NewReactionService ¶ added in v0.4.0
func NewReactionService() *ReactionService
func NewReactionServiceWithRunner ¶ added in v0.4.0
func NewReactionServiceWithRunner(runner Runner) *ReactionService
func (*ReactionService) AddReaction ¶ added in v0.4.0
func (client *ReactionService) AddReaction(subjectID string, content ReactionContent) error
func (*ReactionService) RemoveReaction ¶ added in v0.4.0
func (client *ReactionService) RemoveReaction(subjectID string, content ReactionContent) error
type ReleaseDetail ¶
type ReleaseDetail struct {
Name string `json:"name"`
TagName string `json:"tag_name"`
URL string `json:"html_url"`
Body string `json:"body"`
BodyHTML string `json:"bodyHTML,omitempty"`
Draft bool `json:"draft"`
PreRelease bool `json:"prerelease"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
PublishedAt string `json:"published_at"`
Author *PullRequestAuthor `json:"author"`
}
func ReleaseDetailFromDomain ¶ added in v0.4.0
func ReleaseDetailFromDomain(detail githubdomain.ReleaseDetail) ReleaseDetail
type Repository ¶
func RepositoryFromDomain ¶ added in v0.4.0
func RepositoryFromDomain(repository githubdomain.RepositoryRef) Repository
func (*Repository) UnmarshalJSON ¶
func (repository *Repository) UnmarshalJSON(data []byte) error
type ResponseDecoder ¶ added in v0.4.0
type ResponseDecoder interface {
DecodeJSON(data []byte, target any) error
DecodeGraphQL(data []byte, target any) error
}
func NewResponseDecoder ¶ added in v0.4.0
func NewResponseDecoder() ResponseDecoder
type ReviewAdapter ¶ added in v0.4.0
type ReviewAdapter struct {
// contains filtered or unexported fields
}
func NewReviewAdapter ¶ added in v0.4.0
func NewReviewAdapter() *ReviewAdapter
func NewReviewAdapterWithRunner ¶ added in v0.4.0
func NewReviewAdapterWithRunner(runner Runner) *ReviewAdapter
func (*ReviewAdapter) AddPullRequestReviewThread ¶ added in v0.4.0
func (adapter *ReviewAdapter) AddPullRequestReviewThread(pullRequestReviewID string, body string, target githubdomain.PullRequestReviewThreadTarget) error
func (*ReviewAdapter) AddPullRequestReviewThreadReply ¶ added in v0.4.0
func (adapter *ReviewAdapter) AddPullRequestReviewThreadReply(pullRequestReviewID string, pullRequestReviewThreadID string, body string) error
func (*ReviewAdapter) ApprovePullRequest ¶ added in v0.4.0
func (adapter *ReviewAdapter) ApprovePullRequest(repository string, number int) error
func (*ReviewAdapter) DeletePullRequestReview ¶ added in v0.4.0
func (adapter *ReviewAdapter) DeletePullRequestReview(pullRequestReviewID string) error
func (*ReviewAdapter) DeletePullRequestReviewComment ¶ added in v0.4.0
func (adapter *ReviewAdapter) DeletePullRequestReviewComment(commentID string) error
func (*ReviewAdapter) GetPendingPullRequestReviewID ¶ added in v0.4.0
func (*ReviewAdapter) RequestChangesOnPullRequest ¶ added in v0.4.0
func (adapter *ReviewAdapter) RequestChangesOnPullRequest(repository string, number int, body string) error
func (*ReviewAdapter) ResolvePullRequestReviewThread ¶ added in v0.4.0
func (adapter *ReviewAdapter) ResolvePullRequestReviewThread(threadID string) error
func (*ReviewAdapter) ReviewPullRequestWithComment ¶ added in v0.4.0
func (adapter *ReviewAdapter) ReviewPullRequestWithComment(repository string, number int, body string) error
func (*ReviewAdapter) StartPendingPullRequestReview ¶ added in v0.4.0
func (adapter *ReviewAdapter) StartPendingPullRequestReview(repository string, number int) (string, error)
func (*ReviewAdapter) SubmitPullRequestReview ¶ added in v0.4.0
func (adapter *ReviewAdapter) SubmitPullRequestReview(pullRequestReviewID string, event githubdomain.PullRequestReviewEvent, body string) error
func (*ReviewAdapter) UnresolvePullRequestReviewThread ¶ added in v0.4.0
func (adapter *ReviewAdapter) UnresolvePullRequestReviewThread(threadID string) error
func (*ReviewAdapter) UpdatePullRequestReviewComment ¶ added in v0.4.0
func (adapter *ReviewAdapter) UpdatePullRequestReviewComment(commentID string, body string) error
type ReviewService ¶ added in v0.4.0
type ReviewService struct {
// contains filtered or unexported fields
}
func NewReviewService ¶ added in v0.4.0
func NewReviewService() *ReviewService
func NewReviewServiceWithRunner ¶ added in v0.4.0
func NewReviewServiceWithRunner(runner Runner) *ReviewService
func (*ReviewService) AddPullRequestReviewThread ¶ added in v0.4.0
func (client *ReviewService) AddPullRequestReviewThread(pullRequestReviewID string, body string, target PullRequestReviewThreadTarget) error
func (*ReviewService) AddPullRequestReviewThreadReply ¶ added in v0.4.0
func (client *ReviewService) AddPullRequestReviewThreadReply(pullRequestReviewID string, pullRequestReviewThreadID string, body string) error
func (*ReviewService) ApprovePullRequest ¶ added in v0.4.0
func (client *ReviewService) ApprovePullRequest(repository string, number int) error
func (*ReviewService) DeletePullRequestReview ¶ added in v0.4.0
func (client *ReviewService) DeletePullRequestReview(pullRequestReviewID string) error
func (*ReviewService) DeletePullRequestReviewComment ¶ added in v0.4.0
func (client *ReviewService) DeletePullRequestReviewComment(commentID string) error
func (*ReviewService) GetPendingPullRequestReviewID ¶ added in v0.4.0
func (*ReviewService) RequestChangesOnPullRequest ¶ added in v0.4.0
func (client *ReviewService) RequestChangesOnPullRequest(repository string, number int, body string) error
func (*ReviewService) ResolvePullRequestReviewThread ¶ added in v0.4.0
func (client *ReviewService) ResolvePullRequestReviewThread(threadID string) error
func (*ReviewService) ReviewPullRequestWithComment ¶ added in v0.4.0
func (client *ReviewService) ReviewPullRequestWithComment(repository string, number int, body string) error
func (*ReviewService) StartPendingPullRequestReview ¶ added in v0.4.0
func (client *ReviewService) StartPendingPullRequestReview(repository string, number int) (string, error)
func (*ReviewService) SubmitPullRequestReview ¶ added in v0.4.0
func (client *ReviewService) SubmitPullRequestReview(pullRequestReviewID string, event PullRequestReviewEvent, body string) error
func (*ReviewService) UnresolvePullRequestReviewThread ¶ added in v0.4.0
func (client *ReviewService) UnresolvePullRequestReviewThread(threadID string) error
func (*ReviewService) UpdatePullRequestReviewComment ¶ added in v0.4.0
func (client *ReviewService) UpdatePullRequestReviewComment(commentID string, body string) error
type ReviewThreadAssembler ¶ added in v0.4.0
type ReviewThreadAssembler struct {
LoadThreadsPage func(owner string, name string, number int, cursor string) (pullRequestReviewThreadsPage, error)
LoadThreadCommentsPage func(threadID string, cursor string) (pullRequestReviewThreadCommentsPage, error)
}
func (ReviewThreadAssembler) List ¶ added in v0.4.0
func (assembler ReviewThreadAssembler) List(repository string, number int) ([]PullRequestReviewThread, error)
type Runner ¶
type Runner interface {
Run(name string, args ...string) (CommandResult, error)
RunWithInput(name string, input []byte, args ...string) (CommandResult, error)
}
type SessionAdapter ¶ added in v0.4.0
type SessionAdapter struct {
// contains filtered or unexported fields
}
func NewSessionAdapter ¶ added in v0.4.0
func NewSessionAdapter() *SessionAdapter
func NewSessionAdapterWithRunner ¶ added in v0.4.0
func NewSessionAdapterWithRunner(runner Runner) *SessionAdapter
func (*SessionAdapter) GetConnectedUser ¶ added in v0.4.0
func (adapter *SessionAdapter) GetConnectedUser() (githubdomain.ConnectedUser, error)
type SessionService ¶ added in v0.4.0
type SessionService struct {
// contains filtered or unexported fields
}
func NewSessionService ¶ added in v0.4.0
func NewSessionService() *SessionService
func NewSessionServiceWithRunner ¶ added in v0.4.0
func NewSessionServiceWithRunner(runner Runner) *SessionService
func (*SessionService) GetConnectedUser ¶ added in v0.4.0
func (service *SessionService) GetConnectedUser() (ConnectedUser, error)
Source Files
¶
- build_assembler.go
- capability_adapters.go
- command_runner.go
- commit_diff.go
- doc.go
- domain_adapter.go
- markdown_render.go
- notification.go
- notification_assembler.go
- notification_mutation.go
- parse_helpers.go
- pending_pull_request_review.go
- pending_pull_request_review_delete.go
- pending_pull_request_review_submit.go
- pull_request_action.go
- pull_request_assignee.go
- pull_request_auto_merge.go
- pull_request_browser.go
- pull_request_build.go
- pull_request_codeowners.go
- pull_request_comment.go
- pull_request_comment_mutation.go
- pull_request_detail.go
- pull_request_detail_assembler.go
- pull_request_detail_parser.go
- pull_request_diff.go
- pull_request_diff_assembler.go
- pull_request_edit.go
- pull_request_merge_queue.go
- pull_request_reaction_mutation.go
- pull_request_reaction_targets.go
- pull_request_review.go
- pull_request_review_comment_mutation.go
- pull_request_review_thread.go
- pull_request_review_thread_reply.go
- pull_request_review_thread_resolution.go
- pull_request_review_threads.go
- pull_request_reviewer_request.go
- pull_request_run.go
- pull_request_stage_merge.go
- pull_requests.go
- reaction.go
- repository_merge_capabilities.go
- review_thread_assembler.go
- runner.go
- services.go
- session.go
- transport.go
Click to show internal directories.
Click to hide internal directories.