MCPcopy
hub / github.com/akuity/kargo / fakePullRequestsClient

Struct fakePullRequestsClient

pkg/governance/github_client_test.go:547–574  ·  view source on GitHub ↗

fakePullRequestsClient is a configurable fake PullRequestsClient.

Source from the content-addressed store, hash-verified

545
546// fakePullRequestsClient is a configurable fake PullRequestsClient.
547type fakePullRequestsClient struct {
548 EditFn func(
549 ctx context.Context,
550 owner string,
551 repo string,
552 number int,
553 pr *github.PullRequest,
554 ) (*github.PullRequest, *github.Response, error)
555 GetFn func(
556 ctx context.Context,
557 owner string,
558 repo string,
559 number int,
560 ) (*github.PullRequest, *github.Response, error)
561 ListFilesFn func(
562 ctx context.Context,
563 owner string,
564 repo string,
565 number int,
566 opts *github.ListOptions,
567 ) ([]*github.CommitFile, *github.Response, error)
568 ConvertToDraftFn func(
569 ctx context.Context,
570 owner string,
571 repo string,
572 number int,
573 ) error
574}
575
576// Edit implements PullRequestsClient.
577func (f *fakePullRequestsClient) Edit(

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected