Documentation ¶
Index ¶
- Constants
- Variables
- func AddLabelToPR(ctx context.Context, client LabelsService, prID int, newLabel string) error
- func CreateEnterpriseBuildFailedComment(ctx context.Context, client CommentService, link string, prID int) error
- func CreateEnterpriseStatus(ctx context.Context, client StatusesService, sha, link, status string) (*github.RepoStatus, error)
- func DeleteEnterpriseBranch(ctx context.Context, client GitService, branchName string) error
- func NewGitHubClient(ctx context.Context, token string) *github.Client
- func PRCheckRegexp() *regexp.Regexp
- type CommentService
- type GitService
- type LabelsService
- type StatusesService
Constants ¶
View Source
const ( MainBranch = "main" HomeDir = "." RepoOwner = "grafana" OSSRepo = "grafana" EnterpriseRepo = "grafana-enterprise" EnterpriseCheckName = "Grafana Enterprise" EnterpriseCheckDescription = "Downstream tests to ensure that your changes are compatible with Grafana Enterprise" )
Variables ¶
View Source
var EnterpriseCheckLabels = []string{"enterprise-ok", "enterprise-failed", "enterprise-override"}
View Source
var (
ErrorNoDroneBuildLink = errors.New("no drone build link")
)
Functions ¶
func AddLabelToPR ¶
func CreateEnterpriseStatus ¶
func CreateEnterpriseStatus(ctx context.Context, client StatusesService, sha, link, status string) (*github.RepoStatus, error)
CreateEnterpriseStatus sets the status on a commit for the enterprise build check.
func DeleteEnterpriseBranch ¶
func DeleteEnterpriseBranch(ctx context.Context, client GitService, branchName string) error
func NewGitHubClient ¶
NewGitHubClient creates a new Client using the provided GitHub token if not empty.
func PRCheckRegexp ¶
Types ¶
type CommentService ¶
type GitService ¶
type LabelsService ¶
type LabelsService interface { ListLabelsByIssue(ctx context.Context, owner string, repo string, number int, opts *github.ListOptions) ([]*github.Label, *github.Response, error) RemoveLabelForIssue(ctx context.Context, owner string, repo string, number int, label string) (*github.Response, error) AddLabelsToIssue(ctx context.Context, owner string, repo string, number int, labels []string) ([]*github.Label, *github.Response, error) }
type StatusesService ¶
type StatusesService interface {
CreateStatus(ctx context.Context, owner, repo, ref string, status *github.RepoStatus) (*github.RepoStatus, *github.Response, error)
}
Click to show internal directories.
Click to hide internal directories.