NewCheckoutManager creates a new CheckoutManager pre-loaded with user-supplied CheckoutConfig entries from the frontmatter.
(userCheckouts []*CheckoutConfig)
| 189 | // NewCheckoutManager creates a new CheckoutManager pre-loaded with user-supplied |
| 190 | // CheckoutConfig entries from the frontmatter. |
| 191 | func 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 |