util

package
v0.0.0-...-2e23435 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const KnowledgeLabel string = "knowledge"

Variables

This section is empty.

Functions

func CheckBotEnableStatus

func CheckBotEnableStatus(ctx context.Context, client *github.Client, params PullRequestStatusParams) (bool, error)

func CheckKnowledgeLabel

func CheckKnowledgeLabel(labels []*github.Label) (bool, error)

func CheckRequiredLabel

func CheckRequiredLabel(labels []*github.Label, requiredLabels []string) (bool, error)

func PostBotWelcomeMessage

func PostBotWelcomeMessage(ctx context.Context, client *github.Client, repoOwner string, repoName string, prNum int, prSha string, botName string, maintainers []string) error

func PostPullRequestCheck

func PostPullRequestCheck(ctx context.Context, client *github.Client, params PullRequestStatusParams) error

func PostPullRequestComment

func PostPullRequestComment(ctx context.Context, client *github.Client, params PullRequestStatusParams) error

func PostPullRequestErrorComment

func PostPullRequestErrorComment(ctx context.Context, client *github.Client, params PullRequestStatusParams, err error) error

func PostPullRequestStatus

func PostPullRequestStatus(ctx context.Context, client *github.Client, params PullRequestStatusParams) error

func StatusExist

func StatusExist(ctx context.Context, client *github.Client, params PullRequestStatusParams, statusName string) (bool, error)

Types

type PullRequestStatusParams

type PullRequestStatusParams struct {
	Status       string
	Conclusion   string
	CheckName    string
	CheckSummary string
	CheckDetails string
	Comment      string
	StatusDesc   string

	JobType string
	JobID   string
	JobErr  string

	RepoOwner string
	RepoName  string
	PrNum     int
	PrSha     string
}

Jump to

Keyboard shortcuts

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