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)
| 488 | // frontmatter concurrency block without modifying the original map. |
| 489 | // Returns the discriminator expression string or empty string if not present. |
| 490 | func 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 |
no outgoing calls