diff --git a/.github/workflows/test-copilot-push-to-pull-request-branch-multi-file-using-dispatch.md b/.github/workflows/test-copilot-push-to-pull-request-branch-multi-file-using-dispatch.md new file mode 100644 index 00000000..436d8444 --- /dev/null +++ b/.github/workflows/test-copilot-push-to-pull-request-branch-multi-file-using-dispatch.md @@ -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 }} diff --git a/README.md b/README.md index e918206c..f668fa6d 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/e2e.sh b/e2e.sh index 7245d4b6..6dbe0d42 100755 --- a/e2e.sh +++ b/e2e.sh @@ -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" @@ -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