github

package
v0.37.1 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2025 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateCRD

func CreateCRD(ctx context.Context, t *testing.T, repoinfo *ghlib.Repository, run *params.Run, opts options.E2E, targetNS string) error

func CreateCRDIncoming added in v0.17.0

func CreateCRDIncoming(ctx context.Context, t *testing.T, repoinfo *ghlib.Repository, run *params.Run, incomings *[]v1alpha1.Incoming, opts options.E2E, targetNS string) error

func PRCreate

func PRCreate(ctx context.Context, cs *params.Run, ghcnx *ghprovider.Provider, owner, repo, targetRef, defaultBranch, title string) (int, error)

func PushFilesToRef

func PushFilesToRef(ctx context.Context, client *ghlib.Client, commitMessage, baseBranch, targetRef, owner, repo string, files map[string]string) (string, *ghlib.Reference, error)

func Setup

func Setup(ctx context.Context, onSecondController, viaDirectWebhook bool) (context.Context, *params.Run, options.E2E, *github.Provider, error)

Types

type InstrumentationAPICall added in v0.37.0

type InstrumentationAPICall struct {
	Operation          string `json:"operation"`
	DurationMs         int64  `json:"duration_ms"`
	URLPath            string `json:"url_path"`
	RateLimitRemaining string `json:"rate_limit_remaining"`
	StatusCode         int    `json:"status_code"`
	Provider           string `json:"provider"`
	Repo               string `json:"repo"`
}

InstrumentationAPICall represents a single GitHub API call with its metadata.

type PRTest added in v0.25.0

type PRTest struct {
	Label            string
	YamlFiles        []string
	SecondController bool
	Webhook          bool
	NoStatusCheck    bool

	Cnx             *params.Run
	Options         options.E2E
	Provider        *ghprovider.Provider
	TargetNamespace string
	TargetRefName   string
	PRNumber        int
	SHA             string
	Logger          *zap.SugaredLogger
	CommitTitle     string
}

func (*PRTest) RunPullRequest added in v0.25.0

func (g *PRTest) RunPullRequest(ctx context.Context, t *testing.T)

func (*PRTest) RunPushRequest added in v0.25.0

func (g *PRTest) RunPushRequest(ctx context.Context, t *testing.T)

func (*PRTest) TearDown added in v0.25.0

func (g *PRTest) TearDown(ctx context.Context, t *testing.T)

type TestResult added in v0.37.0

type TestResult struct {
	TestName         string                   `json:"test_name"`
	Timestamp        string                   `json:"timestamp"`
	Controller       string                   `json:"controller"`
	PRNumber         int                      `json:"pr_number"`
	SHA              string                   `json:"sha"`
	TargetNamespace  string                   `json:"target_namespace"`
	GitHubAPICalls   []InstrumentationAPICall `json:"github_api_calls"`
	TotalCalls       int                      `json:"total_calls"`
	OAuth2MarkerLine int                      `json:"oauth2_marker_line"`
}

TestResult represents the complete test result with GitHub API calls.

Jump to

Keyboard shortcuts

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