expandLabelCommandShorthand takes a label name and returns a map that represents the expanded label_command + workflow_dispatch configuration. This is the intermediate form stored in the frontmatter "on" map before parseOnSection processes it into WorkflowData.LabelCommand.
(labelName string)
| 11 | // This is the intermediate form stored in the frontmatter "on" map before |
| 12 | // parseOnSection processes it into WorkflowData.LabelCommand. |
| 13 | func expandLabelCommandShorthand(labelName string) map[string]any { |
| 14 | labelCommandParserLog.Printf("Expanding label-command shorthand for label: %s", labelName) |
| 15 | return map[string]any{ |
| 16 | "label_command": labelName, |
| 17 | "workflow_dispatch": nil, |
| 18 | } |
| 19 | } |