githubnext / githubnext/gh-aw-test

Suggested test: copilot/create-pull-request-allowed-files

Closed Beginner friendly
#5,621 0 comments 0 reactions 0 assignees View on GitHub
suggested new test
Dominant language
Shell
Stars
8
Forks
5
PR merge metrics
No merged PRs in 30d

Description

## Motivation

Link to the gh-aw PR: github/gh-aw#43496 — daily-yamllint-fixer: remove allowed-files restriction from safe-outputs

This PR fixed a bug where `allowed-files` globs on `create-pull-request` incorrectly rejected valid file paths (e.g. `header.go`, `*_test.go`). There is an open suggestion for `push-to-pull-request-branch-allowed-files` (#4417), but no test verifies `allowed-files` on `create-pull-request` itself.

## Proposed test

- **Workflow file**: `test-copilot-create-pull-request-allowed-files.md`
- **Trigger**: `workflow_dispatch`
- **Engine**: copilot
- **Safe output**: `create-pull-request` with an `allowed-files` glob
- **Variant**: standard

## Minimal test prompt sketch

Ask the agent to create a pull request that modifies exactly one file matching a declared `allowed-files` glob (e.g. `trials/*.md`). A second variant could attempt a patch that includes a file outside the glob and assert the safe output is blocked — but start with the happy path first.

## New fixtures or secrets needed

None. `trials/` directory already exists in the repo and is gitignored by conventions; a test file there would be a clean target.

## Notes

The open suggestion #4417 covers `push-to-pull-request-branch` with `allowed-files`; this is the `create-pull-request` equivalent and does not overlap with it. The bug in #43496 shows the field previously had real coverage gaps, making a regression test useful.

> [!WARNING]
>
> Firewall blocked 1 domain
>
> The following domain was blocked by the firewall during workflow execution:
>
> - `awmgmcpg`
>> To allow these domains, add them to the `network.allowed` list in your workflow frontmatter:
>
> ```yaml
> network:
> allowed:
> - defaults
> - "awmgmcpg"
> ```
>
> See [Network Configuration](https://github.github.com/gh-aw/reference/network/) for more information.
>
>

> Generated by [🔍 Suggest New E2E Tests](https://github.com/githubnext/gh-aw-test/actions/runs/28736210721) · 111.5 AIC · ⌖ 6.75 AIC · ⊞ 5.6K · [◷](https://github.com/search?q=repo%3Agithubnext%2Fgh-aw-test+is%3Aissue+%22gh-aw-workflow-call-id%3A+githubnext%2Fgh-aw-test%2Fsuggest-new-e2e-tests%22&type=issues)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the proposed workflow file, test-copilot-create-pull-request-allowed-files.md, and review the repository's existing workflow conventions. Add a workflow_dispatch Copilot test targeting one file under trials/ with a create-pull-request allowed-files glob; done means the matching-file happy path is exercised without new fixtures or secrets.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions
Domain
ci-cd, testing
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
74/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.