Skip to content

[bug-hunter] Text Auditor example workflow fails validation due to empty with: block #711

Description

@github-actions

Impact

Users who copy the shipped text-auditor example workflow get an invalid workflow configuration. This blocks adoption because workflow lint/validation fails before runtime.

The example currently includes with: but only commented keys, which parses as an empty/null with section.

Reproduction Steps

  1. Create a new repro file from the shipped example structure:
# /tmp/gh-aw/agent/repro-text-auditor.yml
name: Text Auditor
on:
  pull_request:
    types: [opened, synchronize, reopened]
jobs:
  text-auditor:
    uses: elastic/ai-github-actions/.github/workflows/gh-aw-text-auditor.lock.yml@main
    with:
      # intentionally mirrors shipped example's empty with block
    secrets:
      COPILOT_GITHUB_TOKEN: $\{\{ secrets.COPILOT_GITHUB_TOKEN }}
  1. Run:
./bin/actionlint -shellcheck= -pyflakes= /tmp/gh-aw/agent/repro-text-auditor.yml

Expected vs Actual

Expected: The published example should validate as-is (or omit with: entirely when no inputs are set).

Actual: Validation fails with syntax error:

../../../../../tmp/gh-aw/agent/repro-text-auditor.yml:8:10: "with" section should not be empty. please remove this section if it's unnecessary [syntax-check]
  |
8 |     with:
  |          ^

Failing Test

#!/usr/bin/env bash
set -euo pipefail

cat > /tmp/gh-aw/agent/repro-text-auditor.yml <<'YAML'
name: Text Auditor
on:
  pull_request:
    types: [opened, synchronize, reopened]
jobs:
  text-auditor:
    uses: elastic/ai-github-actions/.github/workflows/gh-aw-text-auditor.lock.yml@main
    with:
      # intentionally mirrors shipped example's empty with block
    secrets:
      COPILOT_GITHUB_TOKEN: $\{\{ secrets.COPILOT_GITHUB_TOKEN }}
YAML

./bin/actionlint -shellcheck= -pyflakes= /tmp/gh-aw/agent/repro-text-auditor.yml

Evidence

  • Shipped example contains empty with: block: gh-agent-workflows/text-auditor/example.yml:15-20
  • Duplicate checks showed no matching open issue/PR for this exact failure.
  • bug-hunter label does not exist in this repo (checked via label API), so filing without label.

What is this? | From workflow: Trigger Bug Hunter

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

  • expires on Mar 23, 2026, 11:34 AM UTC

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions