Documentation
¶
Index ¶
- func FindTerraCIComment(comments []*gh.IssueComment) *gh.IssueComment
- func GetPRNumberFromEvent() int
- func ParseRepository(repository string) (owner, repo string)
- type Client
- func (c *Client) AddIssueLabels(ctx context.Context, prNumber int, labels []string) error
- func (c *Client) CreateIssueComment(ctx context.Context, prNumber int, body string) (*gh.IssueComment, error)
- func (c *Client) HasToken() bool
- func (c *Client) ListIssueComments(ctx context.Context, prNumber int) ([]*gh.IssueComment, error)
- func (c *Client) RemoveIssueLabel(ctx context.Context, prNumber int, label string) error
- func (c *Client) UpdateIssueComment(ctx context.Context, commentID int64, body string) (*gh.IssueComment, error)
- type Context
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindTerraCIComment ¶
func FindTerraCIComment(comments []*gh.IssueComment) *gh.IssueComment
func GetPRNumberFromEvent ¶
func GetPRNumberFromEvent() int
func ParseRepository ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClientFromEnv ¶
func NewClientFromEnv() *Client
func (*Client) AddIssueLabels ¶ added in v0.10.5
func (*Client) CreateIssueComment ¶
func (*Client) ListIssueComments ¶
func (*Client) RemoveIssueLabel ¶ added in v0.10.5
func (*Client) UpdateIssueComment ¶
type Context ¶
type Context struct {
Owner string
Repo string
PRNumber int
SourceBranch string
TargetBranch string
RunID string
CommitSHA string
InPR bool
}
func DetectContext ¶
func DetectContext() *Context
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewServiceFromEnv ¶
func NewServiceFromEnv() *Service
func (*Service) CurrentCommentBody ¶ added in v0.10.5
CurrentCommentBody returns the current TerraCI PR comment body, if present.
func (*Service) SyncLabels ¶ added in v0.10.5
SyncLabels synchronizes TerraCI-managed PR labels.
Click to show internal directories.
Click to hide internal directories.