You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
github/gh-aw#41937 — fix(changeset): restrict safe-outputs allowed-files to .changeset/*.md revealed that the allowed-files configuration option on push-to-pull-request-branch is used in production but has no regression test in the E2E suite.
What this adds
A new workflow_dispatch-triggered test that exercises push-to-pull-request-branch with allowed-files: ["*.md"]. The agent is asked to create and push a single Markdown file; the pre-canned sample contains a .md patch that passes the allowed-files filter.
This verifies:
The allowed-files config compiles correctly into the lock file
The safe-output handler accepts patches whose files match the allowed pattern (happy path)
Next steps for a reviewer
Run gh aw compile .github/workflows/test-copilot-push-to-pull-request-branch-allowed-files.md to generate the lock file and commit it
Add test-copilot-push-to-pull-request-branch-allowed-files to get_all_tests() in e2e.sh under the workflow_dispatch section (alongside the other push-to-pull-request-branch dispatch tests)
The bundle file is available in the agent artifact in the workflow run linked above.
To create a pull request with the changes:
# Download the artifact from the workflow run
gh run download 28318008590 -n agent -D /tmp/agent-28318008590
# Fetch the bundle into a temporary ref, then update the local branch
git fetch /tmp/agent-28318008590/aw-suggest-test-push-allowed-files.bundle refs/heads/suggest-test-push-allowed-files:refs/bundles/create-pr-suggest-test-push-allowed-files-146d9d89f9c8f37d-dc61d872
git update-ref refs/heads/suggest-test-push-allowed-files-146d9d89f9c8f37d refs/bundles/create-pr-suggest-test-push-allowed-files-146d9d89f9c8f37d-dc61d872
git checkout suggest-test-push-allowed-files-146d9d89f9c8f37d
# Ensure the working tree matches the updated branch
git reset --hard
# Remove the temporary bundle ref
git update-ref -d refs/bundles/create-pr-suggest-test-push-allowed-files-146d9d89f9c8f37d-dc61d872
# Push the branch to origin
git push origin suggest-test-push-allowed-files-146d9d89f9c8f37d
# Create the pull request
gh pr create --title 'Add test-copilot-push-to-pull-request-branch-allowed-files' --base main --head suggest-test-push-allowed-files-146d9d89f9c8f37d --repo githubnext/gh-aw-test
Caution
Protected files were modified in this change.
This pull request is in
request_reviewmode and requires explicit human scrutiny before merge.Protected files:
.github/workflows/test-copilot-push-to-pull-request-branch-allowed-files.mdMotivation
github/gh-aw#41937 —
fix(changeset): restrict safe-outputs allowed-files to .changeset/*.mdrevealed that theallowed-filesconfiguration option onpush-to-pull-request-branchis used in production but has no regression test in the E2E suite.What this adds
A new
workflow_dispatch-triggered test that exercisespush-to-pull-request-branchwithallowed-files: ["*.md"]. The agent is asked to create and push a single Markdown file; the pre-canned sample contains a.mdpatch that passes the allowed-files filter.This verifies:
allowed-filesconfig compiles correctly into the lock fileNext steps for a reviewer
gh aw compile .github/workflows/test-copilot-push-to-pull-request-branch-allowed-files.mdto generate the lock file and commit ittest-copilot-push-to-pull-request-branch-allowed-filestoget_all_tests()ine2e.shunder the workflow_dispatch section (alongside the other push-to-pull-request-branch dispatch tests)Note
This was originally intended as a pull request, but the git push operation failed.
Original error: pushSignedCommits: refusing unsigned push for branch 'suggest-test-push-allowed-files-146d9d89f9c8f37d': Signed-commit payload violates file-protection policy (request_review): .github/workflows/test-copilot-push-to-pull-request-branch-allowed-files.md
Workflow Run: View run details and download bundle artifact
The bundle file is available in the
agentartifact in the workflow run linked above.To create a pull request with the changes: