Documentation
¶
Index ¶
- func ApprovePRCmd(svc PRService, repo domain.Repository, prID, body string) tea.Cmd
- func CheckMergeableCmd(svc PRService, repo domain.Repository, number int) tea.Cmd
- func CheckoutBranchCmd(repo domain.Repository, prNumber int, branch string, isCrossRepo bool) tea.Cmd
- func ClosePRCmd(svc PRService, repo domain.Repository, number int, prID string) tea.Cmd
- func DiscoverReposCmd(svc DiscoveryService, root string) tea.Cmd
- func FetchAllPRsPageCmd(svc DashboardService, repo domain.Repository, cursor string, pagesLeft int) tea.Cmd
- func LoadCommitDiffCmd(svc PRService, repo domain.Repository, sha string, force bool) tea.Cmd
- func LoadDashboardCmd(svc DashboardService, repo domain.Repository, force bool) tea.Cmd
- func LoadDiffCmd(svc PRService, repo domain.Repository, number int, headSHA string, force bool) tea.Cmd
- func LoadInvolvingCmd(svc DashboardService, repo domain.Repository, viewer string, force bool) tea.Cmd
- func LoadPRCommitsCmd(svc PRService, repo domain.Repository, number int, force bool) tea.Cmd
- func LoadPRDetailCmd(svc PRService, repo domain.Repository, number int, force bool) tea.Cmd
- func LoadPreviewCmd(svc DashboardService, repo string, number int, host string, force bool) tea.Cmd
- func MergePRCmd(svc PRService, repo domain.Repository, number int, prID string, ...) tea.Cmd
- func PostCommentCmd(svc PRService, repo domain.Repository, prID, body string) tea.Cmd
- func PostReviewCommentCmd(svc PRService, repo domain.Repository, prID, body string) tea.Cmd
- func RebuildPRIndexCmd(svc SearchService, repo domain.Repository, snap domain.DashboardSnapshot) tea.Cmd
- func RebuildRepoIndexCmd(svc SearchService, repos []domain.Repository) tea.Cmd
- func ReopenPRCmd(svc PRService, repo domain.Repository, number int, prID string) tea.Cmd
- func ResolveViewerCmd(svc ViewerService, host string) tea.Cmd
- func SubmitReviewWithDraftsCmd(svc PRService, repo domain.Repository, prID, body, event string, ...) tea.Cmd
- func UpdatePRCmd(svc PRService, repo domain.Repository, number int, prID string, title string, ...) tea.Cmd
- type AllPRsPageLoaded
- type ApprovalFailed
- type ApprovalPosted
- type CheckoutResult
- type CommentFailed
- type CommentPosted
- type CommitDiffLoaded
- type CommitsLoaded
- type DashboardLoaded
- type DashboardService
- type DiffLoaded
- type DiscoveryService
- type InvolvingLoaded
- type MergePRMsg
- type MergeableChecked
- type PRDetailLoaded
- type PRService
- type PRStateChangedMsg
- type PRUpdated
- type PreviewLoaded
- type RefreshFailed
- type RefreshFinished
- type RefreshStarted
- type ReposDiscovered
- type ReviewFailed
- type ReviewPosted
- type SearchIndexRebuilt
- type SearchService
- type ViewerResolved
- type ViewerService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApprovePRCmd ¶
func CheckMergeableCmd ¶
func CheckoutBranchCmd ¶ added in v0.1.32
func CheckoutBranchCmd(repo domain.Repository, prNumber int, branch string, isCrossRepo bool) tea.Cmd
CheckoutBranchCmd runs git fetch + checkout for a PR branch asynchronously. If the working tree is dirty, changes are stashed before checkout. For cross-repository PRs it fetches refs/pull/<number>/head and creates a local branch named pr-<number> (with suffixes if necessary).
func ClosePRCmd ¶ added in v0.1.29
func DiscoverReposCmd ¶
func DiscoverReposCmd(svc DiscoveryService, root string) tea.Cmd
func FetchAllPRsPageCmd ¶
func FetchAllPRsPageCmd(svc DashboardService, repo domain.Repository, cursor string, pagesLeft int) tea.Cmd
FetchAllPRsPageCmd fires a background all-PRs page fetch for the jump index.
func LoadCommitDiffCmd ¶ added in v0.1.30
func LoadDashboardCmd ¶
func LoadDashboardCmd(svc DashboardService, repo domain.Repository, force bool) tea.Cmd
func LoadDiffCmd ¶
func LoadInvolvingCmd ¶
func LoadInvolvingCmd(svc DashboardService, repo domain.Repository, viewer string, force bool) tea.Cmd
func LoadPRCommitsCmd ¶ added in v0.1.30
func LoadPRDetailCmd ¶
func LoadPreviewCmd ¶
func MergePRCmd ¶
func PostCommentCmd ¶
func PostReviewCommentCmd ¶
func RebuildPRIndexCmd ¶
func RebuildPRIndexCmd(svc SearchService, repo domain.Repository, snap domain.DashboardSnapshot) tea.Cmd
func RebuildRepoIndexCmd ¶
func RebuildRepoIndexCmd(svc SearchService, repos []domain.Repository) tea.Cmd
func ReopenPRCmd ¶ added in v0.1.29
func ResolveViewerCmd ¶
func ResolveViewerCmd(svc ViewerService, host string) tea.Cmd
func SubmitReviewWithDraftsCmd ¶
func SubmitReviewWithDraftsCmd(svc PRService, repo domain.Repository, prID, body, event string, drafts []domain.DraftInlineComment) tea.Cmd
Types ¶
type AllPRsPageLoaded ¶
type AllPRsPageLoaded struct {
Repo string
Entries []domain.PullRequestSummary
HasMore bool
NextCursor string
PagesLeft int
Err error
}
AllPRsPageLoaded is emitted when a background all-PRs page fetch completes.
type ApprovalFailed ¶
type ApprovalFailed struct{ Err error }
type ApprovalPosted ¶
type ApprovalPosted struct{}
type CheckoutResult ¶ added in v0.1.32
CheckoutResult is emitted when the local git checkout command completes.
type CommentFailed ¶
type CommentFailed struct{ Err error }
type CommentPosted ¶
type CommentPosted struct{}
type CommitDiffLoaded ¶ added in v0.1.30
type CommitsLoaded ¶ added in v0.1.30
type DashboardLoaded ¶
type DashboardLoaded struct {
Repo string
Snapshot domain.DashboardSnapshot
FromCache bool
Err error
}
type DashboardService ¶
type DashboardService interface {
LoadRepo(ctx context.Context, repo domain.Repository, force bool) (domain.DashboardSnapshot, error)
LoadInvolving(ctx context.Context, repo domain.Repository, viewer string, force bool) (domain.InvolvingSnapshot, error)
LoadPreview(ctx context.Context, repo string, number int, force bool) (domain.PRPreviewSnapshot, error)
LoadAllPRsPage(ctx context.Context, repo domain.Repository, cursor string) ([]domain.PullRequestSummary, bool, string, error)
InvalidateRepo(ctx context.Context, repo domain.Repository) error
}
type DiffLoaded ¶
type DiscoveryService ¶
type InvolvingLoaded ¶
type InvolvingLoaded struct {
Repo string
Snapshot domain.InvolvingSnapshot
FromCache bool
Err error
}
type MergeableChecked ¶
type MergeableChecked struct {
Repo string
Number int
State domain.MergeableState
Err error
}
type PRDetailLoaded ¶
type PRService ¶
type PRService interface {
LoadDetail(ctx context.Context, repo domain.Repository, number int, force bool) (domain.PRPreviewSnapshot, bool, error)
LoadDiff(ctx context.Context, repo domain.Repository, number int, headSHA string, force bool) (model.DiffModel, bool, error)
LoadPRCommits(ctx context.Context, repo domain.Repository, number int, force bool) ([]domain.Commit, error)
LoadCommitDiff(ctx context.Context, repo domain.Repository, sha string, force bool) (model.DiffModel, error)
PostComment(ctx context.Context, repo domain.Repository, prID string, body string) error
PostReviewComment(ctx context.Context, repo domain.Repository, prID string, body string) error
ApprovePR(ctx context.Context, repo domain.Repository, prID string, body string) error
SubmitReviewWithComments(ctx context.Context, repo domain.Repository, prID, body, event string, comments []domain.DraftInlineComment) error
SaveDraftComments(ctx context.Context, repo domain.Repository, number int, headSHA string, drafts []domain.DraftInlineComment) error
LoadDraftComments(ctx context.Context, repo domain.Repository, number int, headSHA string) ([]domain.DraftInlineComment, error)
DeleteDraftComments(ctx context.Context, repo domain.Repository, number int, headSHA string) error
MergePR(ctx context.Context, repo domain.Repository, number int, prID string, headRefOID string, method string) error
CheckMergeable(ctx context.Context, repo domain.Repository, number int) (domain.MergeableState, error)
ClosePR(ctx context.Context, repo domain.Repository, number int, prID string) error
ReopenPR(ctx context.Context, repo domain.Repository, number int, prID string) error
UpdatePR(ctx context.Context, repo domain.Repository, number int, prID string, title string, body string) error
}
type PRStateChangedMsg ¶ added in v0.1.29
type PreviewLoaded ¶
type RefreshFailed ¶
type RefreshFinished ¶
type RefreshFinished struct {
Key string
}
type RefreshStarted ¶
type RefreshStarted struct {
Key string
}
type ReposDiscovered ¶
type ReposDiscovered struct {
Repos []domain.Repository
Err error
}
type ReviewFailed ¶
type ReviewFailed struct{ Err error }
type ReviewPosted ¶
type ReviewPosted struct{}
type SearchIndexRebuilt ¶
type SearchService ¶
type SearchService interface {
BuildPRIndex(repo domain.Repository, snap domain.DashboardSnapshot) error
BuildRepoIndex(repos []domain.Repository) error
}
type ViewerResolved ¶
Click to show internal directories.
Click to hide internal directories.