Documentation
¶
Index ¶
- type Client
- func (c *Client) CommitAndPush(workspace *models.Workspace, result *models.ExecutionResult, ...) (string, error)
- func (c *Client) CreateBranch(workspace *models.Workspace) error
- func (c *Client) CreateComment(ctx context.Context, owner, repo string, issueNumber int, body string) (*github.IssueComment, error)
- func (c *Client) CreatePullRequest(workspace *models.Workspace) (*github.PullRequest, error)
- func (c *Client) CreatePullRequestComment(pr *github.PullRequest, commentBody string) error
- func (c *Client) DeleteCodeAgentBranch(ctx context.Context, owner, repo, branchName string) error
- func (c *Client) GetAllPRComments(pr *github.PullRequest) (*models.PRAllComments, error)
- func (c *Client) GetClient() *github.Client
- func (c *Client) GetComment(ctx context.Context, owner, repo string, commentID int64) (*github.IssueComment, error)
- func (c *Client) GetPullRequest(owner, repo string, prNumber int) (*github.PullRequest, error)
- func (c *Client) GetReviewComments(pr *github.PullRequest, reviewID int64) ([]*github.PullRequestComment, error)
- func (c *Client) PullLatestChanges(workspace *models.Workspace, pr *github.PullRequest) error
- func (c *Client) ReplyToReviewComment(pr *github.PullRequest, commentID int64, commentBody string) error
- func (c *Client) UpdateComment(ctx context.Context, owner, repo string, commentID int64, body string) error
- func (c *Client) UpdatePullRequest(pr *github.PullRequest, newBody string) error
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 (*Client) CommitAndPush ¶
func (c *Client) CommitAndPush(workspace *models.Workspace, result *models.ExecutionResult, codeClient code.Code) (string, error)
CommitAndPush 检测文件变更并提交推送
func (*Client) CreateBranch ¶
CreateBranch creates branch locally and pushes to remote
func (*Client) CreateComment ¶
func (c *Client) CreateComment(ctx context.Context, owner, repo string, issueNumber int, body string) (*github.IssueComment, error)
CreateComment 在Issue或PR上创建评论
func (*Client) CreatePullRequest ¶
CreatePullRequest 创建 Pull Request
func (*Client) CreatePullRequestComment ¶
func (c *Client) CreatePullRequestComment(pr *github.PullRequest, commentBody string) error
CreatePullRequestComment 在 PR 上创建评论
func (*Client) DeleteCodeAgentBranch ¶
DeleteCodeAgentBranch 删除CodeAgent创建的分支
func (*Client) GetAllPRComments ¶
func (c *Client) GetAllPRComments(pr *github.PullRequest) (*models.PRAllComments, error)
GetAllPRComments 获取 PR 的所有评论,包括一般评论和代码行评论
func (*Client) GetComment ¶
func (c *Client) GetComment(ctx context.Context, owner, repo string, commentID int64) (*github.IssueComment, error)
GetComment 获取评论内容
func (*Client) GetPullRequest ¶
GetPullRequest 获取 PR 的完整信息
func (*Client) GetReviewComments ¶
func (c *Client) GetReviewComments(pr *github.PullRequest, reviewID int64) ([]*github.PullRequestComment, error)
GetReviewComments 获取指定 review 的所有 comments
func (*Client) PullLatestChanges ¶
PullLatestChanges 拉取远端最新代码(优先使用rebase策略)
func (*Client) ReplyToReviewComment ¶
func (c *Client) ReplyToReviewComment(pr *github.PullRequest, commentID int64, commentBody string) error
ReplyToReviewComment 回复 PR 代码行评论
func (*Client) UpdateComment ¶
func (c *Client) UpdateComment(ctx context.Context, owner, repo string, commentID int64, body string) error
UpdateComment 更新已存在的评论
func (*Client) UpdatePullRequest ¶
func (c *Client) UpdatePullRequest(pr *github.PullRequest, newBody string) error
UpdatePullRequest 更新 PR 的 Body
Click to show internal directories.
Click to hide internal directories.