Skip to content

Required PR Check mirror: the skipped PR-run job shows its raw name expression in the checks list #350

Description

@Shinrai

The consumer ci.yml template now gives the required-check mirror job a conditional name, so the skipped pull_request run of an in-repo feature PR can't post a skipped check under the required name. GitHub treats a skipped required check as satisfied. The name is:

name: ${{ (github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == true || github.event.pull_request.head.ref == 'next' || github.event.pull_request.head.ref == 'hotfixes') && '✅ Required PR Check' || '⏭️ Required PR Check (reported by the push run)' }}

GitHub doesn't evaluate a skipped job's name:, so on every in-repo feature PR the checks list shows the whole expression as the job name, for example on CLDMV/slothlet#556. The guarantee itself holds:

  • On the skipped path, the raw text is not the required name, so it can't satisfy the ruleset.
  • On every path that runs, the name evaluates to ✅ Required PR Check. Verified on CLDMV/slothlet push run 37065469706 (613c6a41, the commit that adopted the change): job ✅ Required PR Check concluded success.

Problem: the raw expression is noisy and reads like a broken workflow to anyone looking at a PR's checks.

Options to evaluate:

  • Keep the expression, but make the skipped case land on a short readable string. This isn't possible while GitHub skips name evaluation for skipped jobs, unless the job no longer skips.
  • Don't skip at all on the in-repo PR path: let the job run, with a constant name (⏭️ Required PR Check (reported by the push run)) and a single no-op step. Pair it with a separately named ✅ Required PR Check job that only exists on the paths that own the status. Confirm that a job whose if: is false doesn't post a check under its name, or that its name differs on that path.
  • Move the PR-event mirror into a separate workflow file whose job name never equals the required name on the in-repo path.

Whichever option is chosen must keep the invariant the current change established: no skipped or no-op check named ✅ Required PR Check may ever appear on an in-repo feature PR before the push run's real mirror reports.

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

    priority: lowMinor issue or improvement that can be deferred without impactstatus: implementedBuilt and deployed, but not yet fully tested/verifiedtype: bugSomething is broken or not behaving as expected

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions