codecommit

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 26, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

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

func NewAWSClient(ctx context.Context, region, profile string) (*AWSClient, error)

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 (c *AWSClient) GetPRComments(ctx context.Context, repo, prID, beforeCommit, afterCommit string) ([]Comment, error)

func (*AWSClient) GetPRMetadata

func (c *AWSClient) GetPRMetadata(ctx context.Context, repo, prID string) (PRMetadata, error)

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)
}

Client defines the interface for interacting with AWS CodeCommit.

type Comment

type Comment struct {
	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 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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL