github

package
v0.0.0-...-59b8a6d Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const StatusError = "error"
View Source
const StatusFailure = "failure"
View Source
const StatusPending = "pending"
View Source
const StatusSuccess = "success"

Variables

This section is empty.

Functions

func Comment

func Comment(ctx context.Context, owner, repo string, prNum int, sha string, commentBodies []string) ([]*github.IssueComment, error)

Creates or updates comment on the specified pull request

func ConnectivityCheck

func ConnectivityCheck() error

func GetPullRequest

func GetPullRequest(ctx context.Context, owner, repo string, prNum int) (*github.PullRequest, error)

Gets the specified pull request

func Status

func Status(ctx context.Context, isPr bool, status, description, repoOwner, repoName, commitSha string, dryRun bool) error

Helper that sets commit status for the request commit sha

Types

type ArgoAppMarkdown

type ArgoAppMarkdown struct {
	AppName      string
	WarnStr      string
	SyncStatus   v1alpha1.SyncStatusCode
	HealthStatus health.HealthStatusCode
	HealthMsg    string
	Preamble     string
	Resources    []string
	Closing      string
}

func (*ArgoAppMarkdown) AddResourceDiff

func (a *ArgoAppMarkdown) AddResourceDiff(group, kind, name, ns, diffStr string)

func (ArgoAppMarkdown) OverviewStr

func (a ArgoAppMarkdown) OverviewStr(continued bool) string

type CommentMarkdown

type CommentMarkdown struct {
	Preamble string
	ArgoApps []ArgoAppMarkdown
	Closing  string
}

func (*CommentMarkdown) AppMarkdown

func (c *CommentMarkdown) AppMarkdown(appName, warnStr string, syncStatus v1alpha1.SyncStatusCode, healthStatus health.HealthStatusCode, healthMsg string) *ArgoAppMarkdown

func (CommentMarkdown) String

func (c CommentMarkdown) String() []string

Jump to

Keyboard shortcuts

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