Documentation
¶
Index ¶
- type GithubAdapter
- func (a *GithubAdapter) AddComment(ctx context.Context, externalID string, body string) error
- func (a *GithubAdapter) Capabilities() adapter.AdapterCapabilities
- func (a *GithubAdapter) Fetch(ctx context.Context, externalID string) (domain.Session, error)
- func (a *GithubAdapter) FetchReviewComments(ctx context.Context, target adapter.ReviewCommentTarget) ([]adapter.ReviewComment, error)
- func (a *GithubAdapter) ListSelectable(ctx context.Context, opts adapter.ListOpts) (*adapter.ListResult, error)
- func (a *GithubAdapter) Name() string
- func (a *GithubAdapter) Provider() string
- func (a *GithubAdapter) RepoLifecycleAdapter() RepoLifecycleAdapter
- func (a *GithubAdapter) Resolve(ctx context.Context, sel adapter.Selection) (domain.Session, error)
- func (a *GithubAdapter) StartPRRefresh(ctx context.Context, workspaceID string) func()
- func (a *GithubAdapter) UpdateState(ctx context.Context, externalID string, state domain.TrackerState) error
- func (a *GithubAdapter) Watch(ctx context.Context, filter adapter.WorkItemFilter) (<-chan adapter.WorkItemEvent, error)
- func (a *GithubAdapter) WorkItemAdapter() WorkItemAdapter
- type GithubRepoSource
- type RepoLifecycleAdapter
- type WorkItemAdapter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GithubAdapter ¶
type GithubAdapter struct {
// contains filtered or unexported fields
}
func New ¶
func New(ctx context.Context, cfg config.GithubConfig) (*GithubAdapter, error)
func NewRepoLifecycle ¶
func NewRepoLifecycle(ctx context.Context, cfg config.GithubConfig, repos adapter.ReviewArtifactRepos) (*GithubAdapter, error)
func (*GithubAdapter) AddComment ¶
func (*GithubAdapter) Capabilities ¶
func (a *GithubAdapter) Capabilities() adapter.AdapterCapabilities
func (*GithubAdapter) FetchReviewComments ¶ added in v0.0.30
func (a *GithubAdapter) FetchReviewComments(ctx context.Context, target adapter.ReviewCommentTarget) ([]adapter.ReviewComment, error)
FetchReviewComments returns the unresolved review comment threads for the given PR. Only the opening (first) comment of each unresolved thread is surfaced. The query paginates through all review threads via GraphQL cursors so PRs with more than reviewThreadsPageSize threads are fully covered.
func (*GithubAdapter) ListSelectable ¶
func (a *GithubAdapter) ListSelectable(ctx context.Context, opts adapter.ListOpts) (*adapter.ListResult, error)
func (*GithubAdapter) Name ¶
func (a *GithubAdapter) Name() string
func (*GithubAdapter) Provider ¶ added in v0.0.30
func (a *GithubAdapter) Provider() string
func (*GithubAdapter) RepoLifecycleAdapter ¶ added in v0.0.33
func (a *GithubAdapter) RepoLifecycleAdapter() RepoLifecycleAdapter
func (*GithubAdapter) StartPRRefresh ¶
func (a *GithubAdapter) StartPRRefresh(ctx context.Context, workspaceID string) func()
StartPRRefresh starts a background goroutine that periodically refreshes non-terminal GitHub pull requests from the API. It runs an immediate refresh on startup and then repeats every 120 seconds.
func (*GithubAdapter) UpdateState ¶
func (a *GithubAdapter) UpdateState(ctx context.Context, externalID string, state domain.TrackerState) error
func (*GithubAdapter) Watch ¶
func (a *GithubAdapter) Watch(ctx context.Context, filter adapter.WorkItemFilter) (<-chan adapter.WorkItemEvent, error)
func (*GithubAdapter) WorkItemAdapter ¶ added in v0.0.33
func (a *GithubAdapter) WorkItemAdapter() WorkItemAdapter
type GithubRepoSource ¶
type GithubRepoSource struct {
// contains filtered or unexported fields
}
GithubRepoSource lists the user's GitHub repositories and supports search.
func NewRepoSource ¶
func NewRepoSource(ctx context.Context, cfg config.GithubConfig) (*GithubRepoSource, error)
NewRepoSource creates a GitHub repo source, resolving the token from config or falling back to the gh CLI.
func (*GithubRepoSource) ListRepos ¶
func (s *GithubRepoSource) ListRepos(ctx context.Context, opts adapter.RepoListOpts) (*adapter.RepoListResult, error)
ListRepos returns repositories available for cloning.
func (*GithubRepoSource) Name ¶
func (s *GithubRepoSource) Name() string
Name returns the source identifier.
type RepoLifecycleAdapter ¶ added in v0.0.33
type RepoLifecycleAdapter struct {
*GithubAdapter
}
func (RepoLifecycleAdapter) OnEvent ¶ added in v0.0.33
func (a RepoLifecycleAdapter) OnEvent(ctx context.Context, event domain.SystemEvent) error
type WorkItemAdapter ¶ added in v0.0.33
type WorkItemAdapter struct {
*GithubAdapter
}
func (WorkItemAdapter) OnEvent ¶ added in v0.0.33
func (a WorkItemAdapter) OnEvent(ctx context.Context, event domain.SystemEvent) error