Documentation ¶
Index ¶
- Constants
- func ResolveOwnerName(owner *gogithub.User) (string, error)
- func String(str string) *string
- type Client
- func (c *Client) AddMergeRequestDiscussionReply(ctx context.Context, prID int, fullName, discussionID, comment string) (vcs.MRNote, error)
- func (c *Client) CloneMergeRequest(ctx context.Context, project string, mr vcs.MR, dest string) (vcs.GitRepo, error)
- func (c *Client) CreateMergeRequestComment(ctx context.Context, prID int, fullName string, comment string) error
- func (c *Client) CreateMergeRequestDiscussion(ctx context.Context, prID int, fullName string, comment string) (vcs.MRDiscussionNotes, error)
- func (c *Client) GetIssue(ctx context.Context, owner *gogithub.User, repo string, issueId int) (*gogithub.Issue, error)
- func (c *Client) GetMergeRequest(ctx context.Context, prID int, fullName string) (vcs.DetailedMR, error)
- func (c *Client) GetMergeRequestApprovals(ctx context.Context, id int, project string) (vcs.MRApproved, error)
- func (c *Client) GetMergeRequestModifiedFiles(ctx context.Context, prID int, fullName string) ([]string, error)
- func (c *Client) GetOldRunUrls(ctx context.Context, prID int, fullName string, rootCommentID int) (string, error)
- func (c *Client) GetPipelinesForCommit(ctx context.Context, projectWithNS string, commitSHA string) ([]vcs.ProjectPipeline, error)
- func (c *Client) GetPullRequest(ctx context.Context, fullName string, prID int) (*GithubPR, error)
- func (c *Client) GetRepoFile(ctx context.Context, fullName string, file string, ref string) ([]byte, error)
- func (c *Client) MergeMR(ctx context.Context, mrIID int, project string) error
- func (c *Client) PostIssueComment(ctx context.Context, prId int, fullName string, body string) (*gogithub.IssueComment, error)
- func (c *Client) PostPullRequestComment(ctx context.Context, owner, repo string, prId int, body string) error
- func (c *Client) ResolveMergeRequestDiscussion(ctx context.Context, s string, i int, s2 string) error
- func (c *Client) SetCommitStatus(ctx context.Context, projectWithNS string, commitSHA string, ...) (vcs.CommitStatus, error)
- func (c *Client) UpdateMergeRequestDiscussionNote(ctx context.Context, 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) GetOldRunUrls ¶ added in v0.2.0
func (c *Client) GetOldRunUrls(ctx context.Context, prID int, fullName string, rootCommentID int) (string, error)
Go over all comments on a PR, trying to grab any old TFC run urls and deleting the bodies
func (*Client) GetPipelinesForCommit ¶
func (*Client) GetPullRequest ¶
func (*Client) GetRepoFile ¶
func (*Client) PostIssueComment ¶
func (c *Client) PostIssueComment(ctx context.Context, prId int, fullName string, body string) (*gogithub.IssueComment, error)
PostIssueComment adds a comment to an existing Pull Request
func (*Client) PostPullRequestComment ¶
func (c *Client) PostPullRequestComment(ctx context.Context, owner, repo string, prId int, body string) error
PostPullRequestComment adds a review comment to an existing PullRequest
func (*Client) ResolveMergeRequestDiscussion ¶
func (*Client) SetCommitStatus ¶
func (c *Client) SetCommitStatus(ctx context.Context, 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.