Skip to content

Plan job fails on schedule/workflow_dispatch: Resolve-Version requires a pull_request event (v6.1.0+ regression) #373

Description

Summary

Since v6.1.0 (#342, which moved version resolution into the new Plan job), the Plan job fails on any event that is not pull_request. The Resolve-Version step (PSModule/Resolve-PSModuleVersion@v1.1.0) throws:

Exception: GitHub event does not contain pull_request data. This action must be run from a pull_request event.

Because every downstream job needs: Plan, the whole run fails on schedule and workflow_dispatch events.

Impact

The reusable workflow's own recommended caller (README) and PSModule/Template-PSModule both trigger on workflow_dispatch, schedule (daily cron), and pull_request. On v6.1.0/v6.1.1 the scheduled and manual runs now fail for every consumer. pull_request events are unaffected.

Evidence

  • Process-PSModule self-test Workflow-Test [Default]:
    • 2026-07-09 schedule → success (pre-v6.1.0)
    • 2026-07-10 schedulefailure at Plan / Plan, Resolve-Version step (run 29060730986)
  • PSModule/Template-PSModule workflow_dispatch on v6.1.1 → failure at Plan / Plan with the same exception (run 29085027012)

Root cause

.github/workflows/Plan.yml runs the Resolve-Version step unconditionally, but PSModule/Resolve-PSModuleVersion requires pull_request event data.

Suggested fix

One of:

  • Gate the Resolve-Version step in Plan.yml with if: github.event_name == 'pull_request', and have Enrich-Settings fall back to safe Settings.Module.* defaults for non-PR events; or
  • Make Resolve-PSModuleVersion a no-op (e.g. resolve 0.0.0) on non-pull_request events instead of throwing.

Either keep schedule / workflow_dispatch working (they still run build/test), or update the README caller example and Template-PSModule to drop those triggers.

Metadata

Metadata

Assignees

No one assigned

    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