Documentation ¶
Index ¶
- Constants
- func ResolveOwnerName(owner *gogithub.User) (string, error)
- func String(str string) *string
- type Client
- func (c *Client) AddMergeRequestDiscussionReply(prID int, fullName, discussionID, comment string) (vcs.MRNote, error)
- func (c *Client) CloneMergeRequest(project string, mr vcs.MR, dest string) (vcs.GitRepo, error)
- func (c *Client) CreateMergeRequestComment(prID int, fullName string, comment string) error
- func (c *Client) CreateMergeRequestDiscussion(prID int, fullName string, comment string) (vcs.MRDiscussionNotes, error)
- func (c *Client) GetIssue(owner *gogithub.User, repo string, issueId int) (*gogithub.Issue, error)
- func (c *Client) GetMergeRequest(prID int, fullName string) (vcs.DetailedMR, error)
- func (c *Client) GetMergeRequestApprovals(id int, project string) (vcs.MRApproved, error)
- func (c *Client) GetMergeRequestModifiedFiles(prID int, fullName string) ([]string, error)
- func (c *Client) GetPipelinesForCommit(projectWithNS string, commitSHA string) ([]vcs.ProjectPipeline, error)
- func (c *Client) GetPullRequest(fullName string, prID int) (*GithubPR, error)
- func (c *Client) GetRepoFile(fullName string, file string, ref string) ([]byte, error)
- func (c *Client) PostIssueComment(prId int, fullName string, body string) (*gogithub.IssueComment, error)
- func (c *Client) PostPullRequestComment(owner, repo string, prId int, body string) error
- func (c *Client) ResolveMergeRequestDiscussion(s string, i int, s2 string) error
- func (c *Client) SetCommitStatus(projectWithNS string, commitSHA string, status vcs.CommitStatusOptions) (vcs.CommitStatus, error)
- func (c *Client) UpdateMergeRequestDiscussionNote(mrIID, noteID int, project, discussionID, comment string) (vcs.MRNote, error)
- type GithubPR
- func (gm *GithubPR) GetAuthor() vcs.MRAuthor
- func (gm *GithubPR) GetInternalID() int
- func (gm *GithubPR) GetSourceBranch() string
- func (gm *GithubPR) GetTargetBranch() string
- func (gm *GithubPR) GetTitle() string
- func (gm *GithubPR) GetWebURL() string
- func (gm *GithubPR) HasConflicts() bool
- func (gm *GithubPR) IsApproved() bool
- type GithubPRAuthor
- type GithubPRIssueComment
- type IssueComment
- type PRApproved
- type RunEventsWorker
Constants ¶
View Source
const DefaultMaxRetries = 3
View Source
const GITHUB_CLONE_DEPTH_ENV = "TFBUDDY_GITHUB_CLONE_DEPTH"
Variables ¶
This section is empty.
Functions ¶
func ResolveOwnerName ¶
ResolveOwnerName is a helper func to find a name for the repo owner, which could be in the `Name` field or `Login.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewGithubClient ¶
func NewGithubClient() *Client
func (*Client) AddMergeRequestDiscussionReply ¶
func (*Client) CloneMergeRequest ¶
func (*Client) CreateMergeRequestComment ¶
func (*Client) CreateMergeRequestDiscussion ¶
func (*Client) GetMergeRequest ¶
func (*Client) GetMergeRequestApprovals ¶
func (*Client) GetMergeRequestModifiedFiles ¶
func (*Client) GetPipelinesForCommit ¶
func (*Client) GetPullRequest ¶
func (*Client) GetRepoFile ¶
func (*Client) PostIssueComment ¶
func (c *Client) PostIssueComment(prId int, fullName string, body string) (*gogithub.IssueComment, error)
PostIssueComment adds a comment to an existing Pull Request
func (*Client) PostPullRequestComment ¶
PostPullRequestComment adds a review comment to an existing PullRequest
func (*Client) ResolveMergeRequestDiscussion ¶
func (*Client) SetCommitStatus ¶
func (c *Client) SetCommitStatus(projectWithNS string, commitSHA string, status vcs.CommitStatusOptions) (vcs.CommitStatus, error)
type GithubPR ¶
type GithubPR struct {
*gogithub.PullRequest
}
func (*GithubPR) GetInternalID ¶
func (*GithubPR) GetSourceBranch ¶
func (*GithubPR) GetTargetBranch ¶
func (*GithubPR) HasConflicts ¶
func (*GithubPR) IsApproved ¶
type GithubPRAuthor ¶
func (*GithubPRAuthor) GetUsername ¶
func (ga *GithubPRAuthor) GetUsername() string
type GithubPRIssueComment ¶
type GithubPRIssueComment struct {
*gogithub.IssueComment
}
func (*GithubPRIssueComment) GetDiscussionID ¶
func (c *GithubPRIssueComment) GetDiscussionID() string
func (*GithubPRIssueComment) GetMRNotes ¶
func (c *GithubPRIssueComment) GetMRNotes() []vcs.MRNote
type IssueComment ¶
type IssueComment struct {
*gogithub.IssueComment
}
func (*IssueComment) GetDiscussionID ¶
func (c *IssueComment) GetDiscussionID() string
func (*IssueComment) GetMRNotes ¶
func (c *IssueComment) GetMRNotes() []vcs.MRNote
func (*IssueComment) GetNoteID ¶
func (c *IssueComment) GetNoteID() int64
type PRApproved ¶
type PRApproved struct {
// contains filtered or unexported fields
}
func (*PRApproved) IsApproved ¶
func (p *PRApproved) IsApproved() bool
type RunEventsWorker ¶
type RunEventsWorker struct {
// contains filtered or unexported fields
}
func NewRunEventsWorker ¶
func NewRunEventsWorker(client *Client, rs runstream.StreamClient, tfc tfc_api.ApiClient) *RunEventsWorker
func (*RunEventsWorker) Close ¶
func (w *RunEventsWorker) Close()
Click to show internal directories.
Click to hide internal directories.