Documentation
¶
Index ¶
- type Client
- func (c *Client) CreatePR(ctx context.Context, repo RepoRef, ...) (*PullRequest, error)
- func (c *Client) FindOpenPRBySourceBranch(ctx context.Context, repo RepoRef, branch, destBranch string) (*PullRequest, error)
- func (c *Client) GetPR(ctx context.Context, repo RepoRef, prID int) (*PullRequest, error)
- func (c *Client) GetStepLog(ctx context.Context, repo RepoRef, pipelineUUID, stepUUID string) (string, error)
- func (c *Client) ListPRStatuses(ctx context.Context, repo RepoRef, prID int) ([]CommitStatus, error)
- func (c *Client) ListPipelineSteps(ctx context.Context, repo RepoRef, pipelineUUID string) ([]PipelineStep, error)
- func (c *Client) ListPipelinesByCommit(ctx context.Context, repo RepoRef, commitSHA string) ([]Pipeline, error)
- func (c *Client) UpdatePR(ctx context.Context, repo RepoRef, prID int, title, body string) (*PullRequest, error)
- type CommitStatus
- type Host
- func (h *Host) Available(_ context.Context) error
- func (h *Host) Capabilities() scm.Capabilities
- func (h *Host) CreatePR(ctx context.Context, branch, base string, content scm.PRContent) (*scm.PR, error)
- func (h *Host) FetchFailedCheckLogs(ctx context.Context, pr *scm.PR, _ string, headSHA string, ...) (string, error)
- func (h *Host) FindPR(ctx context.Context, branch, base string) (*scm.PR, error)
- func (h *Host) GetChecks(ctx context.Context, pr *scm.PR) ([]scm.Check, error)
- func (h *Host) GetMergeableState(_ context.Context, _ *scm.PR) (scm.MergeableState, error)
- func (h *Host) GetPRState(ctx context.Context, pr *scm.PR) (scm.PRState, error)
- func (h *Host) Provider() scm.Provider
- func (h *Host) UpdatePR(ctx context.Context, pr *scm.PR, content scm.PRContent) (*scm.PR, error)
- type Pipeline
- type PipelineStep
- type PullRequest
- type RepoRef
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClientFromEnv ¶
func (*Client) FindOpenPRBySourceBranch ¶
func (*Client) GetStepLog ¶
func (*Client) ListPRStatuses ¶
func (*Client) ListPipelineSteps ¶
func (*Client) ListPipelinesByCommit ¶
type CommitStatus ¶
type CommitStatus struct {
Name string `json:"name"`
Key string `json:"key"`
State string `json:"state"`
Description string `json:"description"`
URL string `json:"url"`
}
func LatestStatuses ¶
func LatestStatuses(statuses []CommitStatus) []CommitStatus
LatestStatuses keeps only the newest status per unique key/name. Exported because legacy step code still calls it by name during the migration.
type Host ¶
type Host struct {
// contains filtered or unexported fields
}
Host implements scm.Host for Bitbucket using the REST API client.
func (*Host) Capabilities ¶
func (h *Host) Capabilities() scm.Capabilities
Capabilities reports Bitbucket's feature matrix. Bitbucket's REST API does not expose a reliable merge-conflict probe, so MergeableState is off.
func (*Host) FetchFailedCheckLogs ¶
func (*Host) GetMergeableState ¶
func (*Host) GetPRState ¶
type PipelineStep ¶
type PullRequest ¶
Click to show internal directories.
Click to hide internal directories.