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
26 changes: 26 additions & 0 deletions pkg/cli/workflows/test-copilot-merge-pull-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
on:
workflow_dispatch:
permissions:
contents: read
pull-requests: read
engine: copilot
safe-outputs:
merge-pull-request:
max: 1
required-labels: ["automerge"]
allowed-branches: ["feature/*", "fix/*"]
timeout-minutes: 5
---

# Test Copilot Merge Pull Request

Test the `merge_pull_request` safe output type with the Copilot engine.

## Task

Merge pull request #1 using the "squash" merge method with:
- commit_title: "Test: Squash merge via automated workflow"
- commit_message: "This pull request was merged automatically by the Copilot test workflow to verify the merge_pull_request safe output type."

Output results in JSONL format using the `merge_pull_request` tool.
17 changes: 17 additions & 0 deletions pkg/workflow/compiler_safe_outputs_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -757,6 +757,23 @@ func TestAddHandlerManagerConfigEnvVar(t *testing.T) {
checkJSON: true,
expectedKeys: []string{"report_incomplete"},
},
{
name: "merge_pull_request config",
safeOutputs: &SafeOutputsConfig{
MergePullRequest: &MergePullRequestConfig{
BaseSafeOutputConfig: BaseSafeOutputConfig{
Max: strPtr("1"),
},
RequiredLabels: []string{"automerge"},
AllowedBranches: []string{"feature/*", "fix/*"},
},
},
checkContains: []string{
"GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG",
},
checkJSON: true,
expectedKeys: []string{"merge_pull_request"},
},
}

for _, tt := range tests {
Expand Down
Loading