Documentation
¶
Index ¶
- type AWSClient
- func (c *AWSClient) CreatePR(ctx context.Context, repo, title, description, sourceBranch, destBranch string) (CreatePRResult, error)
- func (c *AWSClient) GetPRComments(ctx context.Context, repo, prID, beforeCommit, afterCommit string) ([]Comment, error)
- func (c *AWSClient) GetPRMetadata(ctx context.Context, repo, prID string) (PRMetadata, error)
- func (c *AWSClient) ListPRs(ctx context.Context, repo, status string) ([]PRSummary, error)
- func (c *AWSClient) PostComment(ctx context.Context, repo, prID, beforeCommit, afterCommit, content string) (PostCommentResult, error)
- type Client
- type Comment
- type CreatePRResult
- type PRMetadata
- type PRSummary
- type PostCommentResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AWSClient ¶
type AWSClient struct {
// contains filtered or unexported fields
}
AWSClient implements Client using the AWS SDK.
func NewAWSClient ¶
NewAWSClient creates a new CodeCommit client for the given region and profile. If profile is empty, the default credential chain is used.
func (*AWSClient) GetPRComments ¶
func (*AWSClient) GetPRMetadata ¶
func (*AWSClient) PostComment ¶ added in v0.6.0
type Client ¶
type Client interface {
GetPRMetadata(ctx context.Context, repo, prID string) (PRMetadata, error)
GetPRComments(ctx context.Context, repo, prID, beforeCommit, afterCommit string) ([]Comment, error)
ListPRs(ctx context.Context, repo, status string) ([]PRSummary, error)
PostComment(ctx context.Context, repo, prID, beforeCommit, afterCommit, content string) (PostCommentResult, error)
CreatePR(ctx context.Context, repo, title, description, sourceBranch, destBranch string) (CreatePRResult, error)
}
Client defines the interface for interacting with AWS CodeCommit.
type Comment ¶
type Comment struct {
CommentId string
InReplyTo string
Author string
Content string
Timestamp time.Time
FilePath string
}
Comment represents a single comment on a pull request. FilePath is empty for PR-level comments.
type CreatePRResult ¶ added in v0.7.0
type CreatePRResult struct {
PRId string
Title string
SourceBranch string
DestinationBranch string
}
CreatePRResult contains the result of creating a pull request.
type PRMetadata ¶
type PRMetadata struct {
Title string
Description string
AuthorARN string
SourceBranch string
DestinationBranch string
SourceCommit string
DestinationCommit string
Status string
CreationDate time.Time
}
PRMetadata contains the metadata of a CodeCommit pull request.
Click to show internal directories.
Click to hide internal directories.