inferWorkflowPathFromDisplayName derives a best-effort workflow file path from a workflow display name when the GitHub API returns an empty path for the run. The inference converts the display name to a kebab-case slug using the same character-replacement rules as the JS sanitizeWorkflowName helper
(displayName string)
| 530 | // the workflow filename was chosen independently of its display name. It is only used |
| 531 | // when no authoritative path is available. |
| 532 | func inferWorkflowPathFromDisplayName(displayName string) string { |
| 533 | if displayName == "" { |
| 534 | return "" |
| 535 | } |
| 536 | // Match sanitizeWorkflowName.cjs: lowercase, replace :[\/\s] with "-", |
| 537 | // replace other non-identifier chars with "-", preserve "." and "_". |
| 538 | slug := stringutil.SanitizeName(displayName, &stringutil.SanitizeOptions{ |
| 539 | PreserveSpecialChars: []rune{'.', '_'}, |
| 540 | TrimHyphens: true, |
| 541 | }) |
| 542 | if slug == "" { |
| 543 | return "" |
| 544 | } |
| 545 | return constants.WorkflowsDirSlash + slug + ".lock.yml" |
| 546 | } |
| 547 | |
| 548 | // runHasDifcFilteredItems checks if a run's gateway logs contain any DIFC_FILTERED events. |
| 549 | // It parses the gateway logs (falling back to rpc-messages.jsonl when gateway.jsonl is absent) |