Documentation
¶
Index ¶
- type Client
- type ClientProxy
- func (d *ClientProxy) CreateComment(logger logging.SimpleLogging, repo models.Repo, pullNum int, comment string, ...) error
- func (d *ClientProxy) DiscardReviews(logger logging.SimpleLogging, repo models.Repo, pull models.PullRequest) error
- func (d *ClientProxy) GetCloneURL(logger logging.SimpleLogging, VCSHostType models.VCSHostType, repo string) (string, error)
- func (d *ClientProxy) GetFileContent(logger logging.SimpleLogging, repo models.Repo, branch string, fileName string) (bool, []byte, error)
- func (d *ClientProxy) GetModifiedFiles(logger logging.SimpleLogging, repo models.Repo, pull models.PullRequest) ([]string, error)
- func (d *ClientProxy) GetPullLabels(logger logging.SimpleLogging, repo models.Repo, pull models.PullRequest) ([]string, error)
- func (d *ClientProxy) GetTeamNamesForUser(logger logging.SimpleLogging, repo models.Repo, user models.User) ([]string, error)
- func (d *ClientProxy) HidePrevCommandComments(logger logging.SimpleLogging, repo models.Repo, pullNum int, command string, ...) error
- func (d *ClientProxy) MarkdownPullLink(pull models.PullRequest) (string, error)
- func (d *ClientProxy) MergePull(logger logging.SimpleLogging, pull models.PullRequest, ...) error
- func (d *ClientProxy) PullIsApproved(logger logging.SimpleLogging, repo models.Repo, pull models.PullRequest) (models.ApprovalStatus, error)
- func (d *ClientProxy) PullIsMergeable(logger logging.SimpleLogging, repo models.Repo, pull models.PullRequest, ...) (models.MergeableStatus, error)
- func (d *ClientProxy) ReactToComment(logger logging.SimpleLogging, repo models.Repo, pullNum int, commentID int64, ...) error
- func (d *ClientProxy) SupportsSingleFileDownload(repo models.Repo) bool
- func (d *ClientProxy) UpdateStatus(logger logging.SimpleLogging, repo models.Repo, pull models.PullRequest, ...) error
- type NotConfiguredVCSClient
- func (a *NotConfiguredVCSClient) CreateComment(_ logging.SimpleLogging, _ models.Repo, _ int, _ string, _ string) error
- func (a *NotConfiguredVCSClient) DiscardReviews(_ logging.SimpleLogging, _ models.Repo, _ models.PullRequest) error
- func (a *NotConfiguredVCSClient) GetCloneURL(_ logging.SimpleLogging, _ models.VCSHostType, _ string) (string, error)
- func (a *NotConfiguredVCSClient) GetFileContent(_ logging.SimpleLogging, _ models.Repo, _ string, _ string) (bool, []byte, error)
- func (a *NotConfiguredVCSClient) GetModifiedFiles(_ logging.SimpleLogging, _ models.Repo, _ models.PullRequest) ([]string, error)
- func (a *NotConfiguredVCSClient) GetPullLabels(_ logging.SimpleLogging, _ models.Repo, _ models.PullRequest) ([]string, error)
- func (a *NotConfiguredVCSClient) GetTeamNamesForUser(_ logging.SimpleLogging, _ models.Repo, _ models.User) ([]string, error)
- func (a *NotConfiguredVCSClient) HidePrevCommandComments(_ logging.SimpleLogging, _ models.Repo, _ int, _ string, _ string) error
- func (a *NotConfiguredVCSClient) MarkdownPullLink(_ models.PullRequest) (string, error)
- func (a *NotConfiguredVCSClient) MergePull(_ logging.SimpleLogging, _ models.PullRequest, _ models.PullRequestOptions) error
- func (a *NotConfiguredVCSClient) PullIsApproved(_ logging.SimpleLogging, _ models.Repo, _ models.PullRequest) (models.ApprovalStatus, error)
- func (a *NotConfiguredVCSClient) PullIsMergeable(_ logging.SimpleLogging, _ models.Repo, _ models.PullRequest, _ string, ...) (models.MergeableStatus, error)
- func (a *NotConfiguredVCSClient) ReactToComment(logger logging.SimpleLogging, repo models.Repo, pullNum int, commentID int64, ...) error
- func (a *NotConfiguredVCSClient) SupportsSingleFileDownload(_ models.Repo) bool
- func (a *NotConfiguredVCSClient) UpdateStatus(_ logging.SimpleLogging, _ models.Repo, _ models.PullRequest, ...) error
- type PullReqStatusFetcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
// GetModifiedFiles returns the names of files that were modified in the merge request
// relative to the repo root, e.g. parent/child/file.txt.
GetModifiedFiles(logger logging.SimpleLogging, repo models.Repo, pull models.PullRequest) ([]string, error)
CreateComment(logger logging.SimpleLogging, repo models.Repo, pullNum int, comment string, command string) error
ReactToComment(logger logging.SimpleLogging, repo models.Repo, pullNum int, commentID int64, reaction string) error
HidePrevCommandComments(logger logging.SimpleLogging, repo models.Repo, pullNum int, command string, dir string) error
PullIsApproved(logger logging.SimpleLogging, repo models.Repo, pull models.PullRequest) (models.ApprovalStatus, error)
PullIsMergeable(logger logging.SimpleLogging, repo models.Repo, pull models.PullRequest, vcsstatusname string, ignoreVCSStatusNames []string) (models.MergeableStatus, error)
// UpdateStatus updates the commit status to state for pull. src is the
// source of this status. This should be relatively static across runs,
// ex. atlantis/plan or atlantis/apply.
// description is a description of this particular status update and can
// change across runs.
// url is an optional link that users should click on for more information
// about this status.
UpdateStatus(logger logging.SimpleLogging, repo models.Repo, pull models.PullRequest, state models.CommitStatus, src string, description string, url string) error
DiscardReviews(logger logging.SimpleLogging, repo models.Repo, pull models.PullRequest) error
MergePull(logger logging.SimpleLogging, pull models.PullRequest, pullOptions models.PullRequestOptions) error
MarkdownPullLink(pull models.PullRequest) (string, error)
GetTeamNamesForUser(logger logging.SimpleLogging, repo models.Repo, user models.User) ([]string, error)
// GetFileContent a repository file content from VCS (which support fetch a single file from repository)
// The first return value indicates whether the repo contains a file or not
// if BaseRepo had a file, its content will placed on the second return value
GetFileContent(logger logging.SimpleLogging, repo models.Repo, branch string, fileName string) (bool, []byte, error)
SupportsSingleFileDownload(repo models.Repo) bool
GetCloneURL(logger logging.SimpleLogging, VCSHostType models.VCSHostType, repo string) (string, error)
// GetPullLabels returns the labels of a pull request
GetPullLabels(logger logging.SimpleLogging, repo models.Repo, pull models.PullRequest) ([]string, error)
}
Client is used to make API calls to a VCS host like GitHub or GitLab.
type ClientProxy ¶
type ClientProxy struct {
// contains filtered or unexported fields
}
ClientProxy proxies calls to the correct VCS client depending on which VCS host is required.
func NewClientProxy ¶ added in v0.5.0
func (*ClientProxy) CreateComment ¶
func (d *ClientProxy) CreateComment(logger logging.SimpleLogging, repo models.Repo, pullNum int, comment string, command string) error
func (*ClientProxy) DiscardReviews ¶ added in v0.22.0
func (d *ClientProxy) DiscardReviews(logger logging.SimpleLogging, repo models.Repo, pull models.PullRequest) error
func (*ClientProxy) GetCloneURL ¶ added in v0.19.8
func (d *ClientProxy) GetCloneURL(logger logging.SimpleLogging, VCSHostType models.VCSHostType, repo string) (string, error)
func (*ClientProxy) GetFileContent ¶ added in v0.22.0
func (d *ClientProxy) GetFileContent(logger logging.SimpleLogging, repo models.Repo, branch string, fileName string) (bool, []byte, error)
func (*ClientProxy) GetModifiedFiles ¶
func (d *ClientProxy) GetModifiedFiles(logger logging.SimpleLogging, repo models.Repo, pull models.PullRequest) ([]string, error)
func (*ClientProxy) GetPullLabels ¶ added in v0.26.0
func (d *ClientProxy) GetPullLabels(logger logging.SimpleLogging, repo models.Repo, pull models.PullRequest) ([]string, error)
func (*ClientProxy) GetTeamNamesForUser ¶ added in v0.18.0
func (d *ClientProxy) GetTeamNamesForUser(logger logging.SimpleLogging, repo models.Repo, user models.User) ([]string, error)
func (*ClientProxy) HidePrevCommandComments ¶ added in v0.17.1
func (d *ClientProxy) HidePrevCommandComments(logger logging.SimpleLogging, repo models.Repo, pullNum int, command string, dir string) error
func (*ClientProxy) MarkdownPullLink ¶ added in v0.13.0
func (d *ClientProxy) MarkdownPullLink(pull models.PullRequest) (string, error)
func (*ClientProxy) MergePull ¶ added in v0.4.14
func (d *ClientProxy) MergePull(logger logging.SimpleLogging, pull models.PullRequest, pullOptions models.PullRequestOptions) error
func (*ClientProxy) PullIsApproved ¶
func (d *ClientProxy) PullIsApproved(logger logging.SimpleLogging, repo models.Repo, pull models.PullRequest) (models.ApprovalStatus, error)
func (*ClientProxy) PullIsMergeable ¶ added in v0.4.13
func (d *ClientProxy) PullIsMergeable(logger logging.SimpleLogging, repo models.Repo, pull models.PullRequest, vcsstatusname string, ignoreVCSStatusNames []string) (models.MergeableStatus, error)
func (*ClientProxy) ReactToComment ¶ added in v0.24.0
func (d *ClientProxy) ReactToComment(logger logging.SimpleLogging, repo models.Repo, pullNum int, commentID int64, reaction string) error
func (*ClientProxy) SupportsSingleFileDownload ¶ added in v0.15.0
func (d *ClientProxy) SupportsSingleFileDownload(repo models.Repo) bool
func (*ClientProxy) UpdateStatus ¶
func (d *ClientProxy) UpdateStatus(logger logging.SimpleLogging, repo models.Repo, pull models.PullRequest, state models.CommitStatus, src string, description string, url string) error
type NotConfiguredVCSClient ¶
type NotConfiguredVCSClient struct {
Host models.VCSHostType
}
NotConfiguredVCSClient is used as a placeholder when Atlantis isn't configured on startup to support a certain VCS host. For example, if there is no GitHub config then this client will be used which will error if it's ever called.
func (*NotConfiguredVCSClient) CreateComment ¶
func (a *NotConfiguredVCSClient) CreateComment(_ logging.SimpleLogging, _ models.Repo, _ int, _ string, _ string) error
func (*NotConfiguredVCSClient) DiscardReviews ¶ added in v0.22.0
func (a *NotConfiguredVCSClient) DiscardReviews(_ logging.SimpleLogging, _ models.Repo, _ models.PullRequest) error
func (*NotConfiguredVCSClient) GetCloneURL ¶ added in v0.19.8
func (a *NotConfiguredVCSClient) GetCloneURL(_ logging.SimpleLogging, _ models.VCSHostType, _ string) (string, error)
func (*NotConfiguredVCSClient) GetFileContent ¶ added in v0.22.0
func (a *NotConfiguredVCSClient) GetFileContent(_ logging.SimpleLogging, _ models.Repo, _ string, _ string) (bool, []byte, error)
func (*NotConfiguredVCSClient) GetModifiedFiles ¶
func (a *NotConfiguredVCSClient) GetModifiedFiles(_ logging.SimpleLogging, _ models.Repo, _ models.PullRequest) ([]string, error)
func (*NotConfiguredVCSClient) GetPullLabels ¶ added in v0.26.0
func (a *NotConfiguredVCSClient) GetPullLabels(_ logging.SimpleLogging, _ models.Repo, _ models.PullRequest) ([]string, error)
func (*NotConfiguredVCSClient) GetTeamNamesForUser ¶ added in v0.18.0
func (a *NotConfiguredVCSClient) GetTeamNamesForUser(_ logging.SimpleLogging, _ models.Repo, _ models.User) ([]string, error)
func (*NotConfiguredVCSClient) HidePrevCommandComments ¶ added in v0.17.1
func (a *NotConfiguredVCSClient) HidePrevCommandComments(_ logging.SimpleLogging, _ models.Repo, _ int, _ string, _ string) error
func (*NotConfiguredVCSClient) MarkdownPullLink ¶ added in v0.13.0
func (a *NotConfiguredVCSClient) MarkdownPullLink(_ models.PullRequest) (string, error)
func (*NotConfiguredVCSClient) MergePull ¶ added in v0.4.14
func (a *NotConfiguredVCSClient) MergePull(_ logging.SimpleLogging, _ models.PullRequest, _ models.PullRequestOptions) error
func (*NotConfiguredVCSClient) PullIsApproved ¶
func (a *NotConfiguredVCSClient) PullIsApproved(_ logging.SimpleLogging, _ models.Repo, _ models.PullRequest) (models.ApprovalStatus, error)
func (*NotConfiguredVCSClient) PullIsMergeable ¶ added in v0.4.13
func (a *NotConfiguredVCSClient) PullIsMergeable(_ logging.SimpleLogging, _ models.Repo, _ models.PullRequest, _ string, _ []string) (models.MergeableStatus, error)
func (*NotConfiguredVCSClient) ReactToComment ¶ added in v0.24.0
func (a *NotConfiguredVCSClient) ReactToComment(logger logging.SimpleLogging, repo models.Repo, pullNum int, commentID int64, reaction string) error
func (*NotConfiguredVCSClient) SupportsSingleFileDownload ¶ added in v0.15.0
func (a *NotConfiguredVCSClient) SupportsSingleFileDownload(_ models.Repo) bool
func (*NotConfiguredVCSClient) UpdateStatus ¶
func (a *NotConfiguredVCSClient) UpdateStatus(_ logging.SimpleLogging, _ models.Repo, _ models.PullRequest, _ models.CommitStatus, _ string, _ string, _ string) error
type PullReqStatusFetcher ¶ added in v0.17.6
type PullReqStatusFetcher interface {
FetchPullStatus(logger logging.SimpleLogging, pull models.PullRequest) (models.PullReqStatus, error)
}
func NewPullReqStatusFetcher ¶ added in v0.17.6
func NewPullReqStatusFetcher(client Client, vcsStatusName string, ignoreVCSStatusNames []string) PullReqStatusFetcher
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package bitbucketcloud holds code for Bitbucket Cloud aka (bitbucket.org).
|
Package bitbucketcloud holds code for Bitbucket Cloud aka (bitbucket.org). |
|
Package common is used to share common code between all VCS clients without running into circular dependency issues.
|
Package common is used to share common code between all VCS clients without running into circular dependency issues. |
Click to show internal directories.
Click to hide internal directories.