githubnext / githubnext/gh-aw-test

Suggested test: copilot/agent-job-if-gating

Closed
#10,904 0 comments 1 reaction 2 assignees Claimed by @pelikhan View on GitHub
suggested new test
Dominant language
Shell
Stars
8
Forks
5
PR merge metrics
No merged PRs in 30d

Description

## Motivation

github/gh-aw#49814 — Adds explicit `jobs.agent.if` and `jobs.agent.needs` frontmatter for gating the generated agent job on custom setup jobs, instead of relying on the `on.needs` + top-level `if` cascade pattern.

## Proposed test

- **Workflow file**: `test-copilot-agent-job-if-gating.md`
- **Trigger**: `workflow_dispatch`
- **Engine**: copilot
- **Safe output**: `create-issue` (used only to confirm agent ran when gated `if` is true)
- **Variant**: standard

## Minimal test prompt sketch

Define a custom setup job that sets an output (e.g. `should_run: true`), configure `jobs.agent.needs: [setup]` and `jobs.agent.if: needs.setup.outputs.should_run == 'true'` in frontmatter, then have the agent create a small issue confirming it executed. Verifies the compiler correctly wires `jobs.agent.if`/`needs` instead of the older `on.needs` cascade.

## New fixtures or secrets needed

None.

## Notes

No existing test exercises `jobs.agent.if`/`jobs.agent.needs` frontmatter; existing custom-job tests use the older `on.needs` pattern. Not present in open-suggestions or fails.txt.

> Generated by [🔍 Suggest New E2E Tests](https://github.com/githubnext/gh-aw-test/actions/runs/30802419698) · auto · 27.9 AIC · ⌖ 6.91 AIC · ⊞ 8.3K · [◷](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

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.