MCPcopy Create free account
hub / github.com/github/gh-aw / NewCheckoutManager

Function NewCheckoutManager

pkg/workflow/checkout_manager.go:191–200  ·  view source on GitHub ↗

NewCheckoutManager creates a new CheckoutManager pre-loaded with user-supplied CheckoutConfig entries from the frontmatter.

(userCheckouts []*CheckoutConfig)

Source from the content-addressed store, hash-verified

189// NewCheckoutManager creates a new CheckoutManager pre-loaded with user-supplied
190// CheckoutConfig entries from the frontmatter.
191func NewCheckoutManager(userCheckouts []*CheckoutConfig) *CheckoutManager {
192 checkoutManagerLog.Printf("Creating checkout manager with %d user checkout config(s)", len(userCheckouts))
193 cm := &CheckoutManager{
194 index: make(map[checkoutKey]int),
195 }
196 for _, cfg := range userCheckouts {
197 cm.add(cfg)
198 }
199 return cm
200}
201
202// SetCrossRepoTargetRepo stores the platform (host) repository expression used for
203// .github/.agents sparse checkout steps. Call this when the workflow has a workflow_call

Calls 2

addMethod · 0.95
PrintfMethod · 0.45