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

Function extractConcurrencyJobDiscriminator

pkg/workflow/workflow_builder.go:490–508  ·  view source on GitHub ↗

extractConcurrencyJobDiscriminator reads the job-discriminator value from the frontmatter concurrency block without modifying the original map. Returns the discriminator expression string or empty string if not present.

(frontmatter map[string]any)

Source from the content-addressed store, hash-verified

488// frontmatter concurrency block without modifying the original map.
489// Returns the discriminator expression string or empty string if not present.
490func extractConcurrencyJobDiscriminator(frontmatter map[string]any) string {
491 concurrencyRaw, ok := frontmatter["concurrency"]
492 if !ok {
493 return ""
494 }
495 concurrencyMap, ok := concurrencyRaw.(map[string]any)
496 if !ok {
497 return ""
498 }
499 discriminator, ok := concurrencyMap["job-discriminator"]
500 if !ok {
501 return ""
502 }
503 discriminatorStr, ok := discriminator.(string)
504 if !ok {
505 return ""
506 }
507 return discriminatorStr
508}
509
510// extractConcurrencySection extracts the workflow-level concurrency YAML section,
511// stripping the gh-aw-specific job-discriminator field so it does not appear in

Callers 2

extractYAMLSectionsMethod · 0.85

Calls

no outgoing calls

Tested by 1