Skip to content

A zero-input action emits a bare with: with nothing under it #652

Description

@Jamie-BitFlight

What is wrong

For an action declaring no inputs, the generated usage block still emits a with: key with no entries beneath it:

- uses: acme/t@v1.2.3
  with:

Where it was observed

The usage section, src/sections/update-usage.ts. The with: line is emitted unconditionally, before the input loop.

Evidence

Reproduced against the built binary with an action declaring no inputs: block. The output above is the complete generated usage section.

Two things I checked at the same time, which did not reproduce: the run exited 0, the text after the markers was preserved, and an existing inputs section body was left intact. The README truncation described in #195 does not occur on this version — that part appears to have been fixed since.

What remains is the objection the reporter of #195 actually raised: "I would expect this to be generated, and absent a 'with:' stanza as there are 0 inputs. Use case is for custom composite actions which require no input."

Impact

Zero-input actions are an ordinary shape, particularly for composite actions. A user copying the snippet gets a dangling with: they have to know to delete.

Activity

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

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions