Skip to content

The Prose Gate Misses a Comments Label Applied While the Pull Request Opens #2305

Closed as not planned

Description

@ptr727

Problem

validate-task.yml computes the prose gate's allow-comments input from contains(github.event.pull_request.labels.*.name, 'comments'), which reads the label set frozen in the triggering event's payload.

gh pr create --label comments opens the pull request and applies the label in a separate call, so the opened event can fire before the label lands. The first run then reports every added comment line as comment-added and fails the required check, although the pull request carries the label. A re-run reuses the same payload and fails the same way. Only a new event clears it, such as closing and reopening the pull request, or a push.

Observed on two KiCadLibrary pull requests in one session: one opened with --label comments failed its first lint run, and another passed only because the label happened to land first. The caller stubs trigger on the default pull_request types, so a later labeled event starts no run either.

Fix

Pick one:

  • Read labels live. Have the step read the pull request's current labels through the API at run time rather than from the payload.
  • Trigger on labels. Add labeled and unlabeled to the caller stubs' pull_request types, so applying the label starts a fresh run.
  • Document the workaround. State it where the comments label is documented: open the pull request, apply the label, then close and reopen it.

The first fixes the class. The other two leave each adopter to remember it.

🤖 Generated with Claude Code

Activity

  1. added
    bug
    on Oct 3, 2026
  2. ptr727 commented on Oct 3, 2026

    @ptr727
    OwnerAuthor

    Duplicate of #1703, where the observation is recorded.

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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions