Documentation ¶
Index ¶
Constants ¶
View Source
const ( // ReleaseNoteLabelNeeded defines the label used when a missing release-note label is blocking the // merge. ReleaseNoteLabelNeeded = "do-not-merge/release-note-label-needed" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Actions ¶
type Actions interface {
HandleReleaseNotesPR(c *Context, pr *github.PullRequestEvent)
}
Actions describes the interface for actions.
type Context ¶
type Context struct { GitHub GitHub Actions Actions RequestID string Logger logrus.FieldLogger }
Context provides the API with all necessary data and interfaces for responding to requests.
It is cloned before each request, allowing per-request changes such as logger annotations.
type GitHub ¶
type GitHub interface { ValidateSignature(receivedHash []string, bodyBuffer []byte) error CreateComment(org, repo string, number int, comment string) AddLabels(org, repo string, number int, labels []string) error RemoveLabel(org, repo string, number int, label string) error GetIssueLabels(org, repo string, number int) ([]*github.Label, error) ListIssueComments(org, repo string, number int) ([]*github.IssueComment, error) GetComments(org, repo string, number int) ([]*github.IssueComment, error) IsMember(org, repo string) (bool, error) SetStatus(org, repo, sha, state, message string) error GetPullRequest(org, repo string, number int) (*github.PullRequest, error) ListRepoLabels(org, repo string) ([]*github.Label, error) }
GitHub describes the interface required to persist changes made via API requests.
Click to show internal directories.
Click to hide internal directories.