gitlabutil

package
v0.0.0-...-b2f41c8 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2025 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const OpsEventHost string = "ops.gitlab.net"

Variables

View Source
var Labels = map[string]string{
	"IncidentDeclare":    "Source::IMA::IncidentDeclare",
	"BlocksFeatureFlags": "blocks feature-flags",
	"BlocksDeployments":  "blocks deployments",
}

Functions

func ClientCheck

func ClientCheck(c *gitlab.Client) error

func FollowRemotePipeline

func FollowRemotePipeline(ctx context.Context, logger log.Logger, client *gitlab.Client, projectPath, commitSHA string) error

func ListPrivateEmails

func ListPrivateEmails(ctx context.Context, pdClient *gopagerduty.Client, gitlabClient *gitlab.Client, escalationPolicies []string) ([]string, error)

func NewGitLabWebhookMiddleware

func NewGitLabWebhookMiddleware(secretToken string, next http.Handler) http.Handler

func NotifyMergeRequestFromMirrorSource

func NotifyMergeRequestFromMirrorSource(ctx context.Context, client *gitlab.Client, logger log.Logger, mirrorProjectPath, pipelineStatus string, waitDuration time.Duration, dryRun bool) error

Types

type CreateDiscussionResponse

type CreateDiscussionResponse struct {
	// {"data":{"createDiscussion":{"errors":[]}}}
	// {"errors":[{"message":"..."}]}
	Data struct {
		CreateDiscussion struct{} `json:"createDiscussion"`
	} `json:"data"`
	Errors []struct {
		Message string `json:"message"`
	} `json:"errors"`
}

type GraphQLClient

type GraphQLClient struct {
	// contains filtered or unexported fields
}

func NewGraphQLClient

func NewGraphQLClient(client *httpretryable.Client, token, url string) *GraphQLClient

func (*GraphQLClient) CreateInternalDiscussion

func (c *GraphQLClient) CreateInternalDiscussion(ctx context.Context, id int, body string) error

func (*GraphQLClient) CreateLinkedResource

func (c *GraphQLClient) CreateLinkedResource(ctx context.Context, id int, link, linkText string) error

func (*GraphQLClient) SetIssueSeverity

func (c *GraphQLClient) SetIssueSeverity(ctx context.Context, iid int, projectPath, severity string) error

type SetSeverityResponse

type SetSeverityResponse struct {
	Data struct {
		IssueSetSeverity struct{} `json:"issueSetSeverity"`
	} `json:"data"`
	Errors []struct {
		Message string `json:"message"`
	} `json:"errors"`
}

Jump to

Keyboard shortcuts

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