Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/refiner.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 4 additions & 6 deletions .github/workflows/smoke-claude.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions .github/workflows/smoke-claude.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,13 @@ safe-outputs:
inputs:
channel:
description: Slack channel name to post to
required: true
required: false
default: "#general"
type: string
message:
description: Message text to post
required: true
required: false
default: ""
type: string
script: |
const targetChannel = item.channel || "#general";
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/smoke-copilot-arm.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion .github/workflows/smoke-copilot-arm.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ safe-outputs:
inputs:
message:
description: "The message to send"
required: true
required: false
default: ""
type: string
permissions:
contents: read
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/smoke-copilot.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion .github/workflows/smoke-copilot.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ safe-outputs:
inputs:
message:
description: "The message to send"
required: true
required: false
default: ""
type: string
permissions:
contents: read
Expand Down
7 changes: 5 additions & 2 deletions pkg/workflow/label_trigger_parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,15 @@ func expandLabelTriggerShorthand(entityType string, labelNames []string) map[str
}
triggerConfig["names"] = namesAny

// Create workflow_dispatch with item_number input
// Create workflow_dispatch with item_number input (not required so the workflow can be
// triggered manually without providing a value; the activation job will fall back to
// the event payload when item_number is not supplied).
workflowDispatchConfig := map[string]any{
"inputs": map[string]any{
"item_number": map[string]any{
"description": "The number of the " + getItemTypeName(entityType),
"required": true,
"required": false,
"default": "",
"type": "string",
},
},
Expand Down
9 changes: 7 additions & 2 deletions pkg/workflow/label_trigger_parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -426,8 +426,13 @@ func TestExpandLabelTriggerShorthand(t *testing.T) {
}

required, ok := itemNumber["required"].(bool)
if !ok || !required {
t.Errorf("expandLabelTriggerShorthand() required = %v, want true", required)
if !ok || required {
t.Errorf("expandLabelTriggerShorthand() required = %v, want false", required)
}

defaultVal, ok := itemNumber["default"].(string)
if !ok || defaultVal != "" {
t.Errorf("expandLabelTriggerShorthand() default = %v, want empty string", defaultVal)
}

inputType, ok := itemNumber["type"].(string)
Expand Down
3 changes: 2 additions & 1 deletion pkg/workflow/testdata/wasm_golden/fixtures/smoke-copilot.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ safe-outputs:
inputs:
message:
description: "The message to send"
required: true
required: false
default: ""
type: string
permissions:
contents: read
Expand Down
7 changes: 5 additions & 2 deletions pkg/workflow/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,15 @@ func (c *Compiler) applyDefaults(data *WorkflowData, markdownPath string) error
}
}

// Add workflow_dispatch with item_number input for manual testing
// Add workflow_dispatch with item_number input for manual testing.
// Not required so the workflow can be triggered without providing a value;
// the activation job falls back to the event payload when item_number is omitted.
labelEventsMap["workflow_dispatch"] = map[string]any{
"inputs": map[string]any{
"item_number": map[string]any{
"description": "The number of the issue, pull request, or discussion",
"required": true,
"required": false,
"default": "",
"type": "string",
},
},
Expand Down
Loading