Skip to content
Closed
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
on:
workflow_dispatch:
inputs:
pull_request_number:
description: 'Pull request number'
required: true
type: number

permissions: read-all

engine:
id: copilot

safe-outputs:
push-to-pull-request-branch:
target: ${{ inputs.pull_request_number }}
samples:
- message: "Dispatch-triggered multi-file push test from Copilot"
pull_request_number: "${{ github.event.inputs.pull_request_number }}"
patch: |
diff --git a/trials/copilot-multifile-a.md b/trials/copilot-multifile-a.md
new file mode 100644
--- /dev/null
+++ b/trials/copilot-multifile-a.md
@@ -0,0 +1,3 @@
+# Copilot Multi-file Dispatch Test A
+
+This file was created by the Copilot agentic workflow via workflow_dispatch.
diff --git a/trials/copilot-multifile-b.md b/trials/copilot-multifile-b.md
new file mode 100644
--- /dev/null
+++ b/trials/copilot-multifile-b.md
@@ -0,0 +1,3 @@
+# Copilot Multi-file Dispatch Test B
+
+This file was created by the Copilot agentic workflow via workflow_dispatch.
---

# Test Copilot Push to Branch (Dispatch, Multi-file)

This test exercises `push-to-pull-request-branch` triggered via `workflow_dispatch`
with a multi-file patch bundle.

1. Checkout the branch for PR #${{ inputs.pull_request_number }}
2. Create file `trials/copilot-multifile-a.md` with content:
```markdown
# Copilot Multi-file Dispatch Test A

This file was created by the Copilot agentic workflow via workflow_dispatch.
```
3. Create file `trials/copilot-multifile-b.md` with content:
```markdown
# Copilot Multi-file Dispatch Test B

This file was created by the Copilot agentic workflow via workflow_dispatch.
```
4. Commit both files in one commit
5. Push the commit to the pull request branch for PR #${{ inputs.pull_request_number }}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ Tracking the full matrix of [safe outputs](https://github.com/github/gh-aw/blob/
- [x] `update-pull-request` — test-copilot-update-pull-request
- [x] `push-to-pull-request-branch` (slash-command) — test-copilot-push-to-pull-request-branch-using-slash-command
- [x] `push-to-pull-request-branch` (dispatch, local repo) — test-copilot-push-to-pull-request-branch-using-dispatch
- [x] `push-to-pull-request-branch` (dispatch, local repo, multi-file) — test-copilot-push-to-pull-request-branch-multi-file-using-dispatch
- [x] `push-to-pull-request-branch` (dispatch, side-repo) — test-copilot-siderepo-push-to-pull-request-branch-using-dispatch
- [x] `push-to-pull-request-branch` (dispatch, side-repo, depth-1 sparse checkout `src/` + `docs/`) — test-copilot-siderepo-sparse-push-to-pull-request-branch-using-dispatch
- [x] `create-pull-request-review-comment` — test-copilot-create-pull-request-review-comment
Expand Down
3 changes: 2 additions & 1 deletion e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,7 @@ get_all_tests() {
echo "test-codex-push-to-pull-request-branch"
echo "test-copilot-push-to-pull-request-branch-using-slash-command"
echo "test-copilot-push-to-pull-request-branch-using-dispatch"
echo "test-copilot-push-to-pull-request-branch-multi-file-using-dispatch"
echo "test-claude-create-pull-request-review-comment"
echo "test-codex-create-pull-request-review-comment"
echo "test-copilot-create-pull-request-review-comment"
Expand Down Expand Up @@ -3678,7 +3679,7 @@ run_single_test() {
fi
fi
;;
*"push-to-pull-request-branch-using-dispatch")
*"push-to-pull-request-branch-using-dispatch"|*"push-to-pull-request-branch-multi-file-using-dispatch")
info "Creating test pull request to trigger $workflow..."
local pr_info=$(create_test_pr_with_branch "Test PR for $ai_display_name Push-to-Branch (Dispatch)" "This PR is for testing $workflow" "$target_repo")
if [[ -n "$pr_info" ]]; then
Expand Down