WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Bug: changesets/action creates PRs for changesets that only reference ignored packages #541

@jbltx

Description

@jbltx

Problem

When all changeset files in .changeset/ only refer to packages listed in the ignore array of config.json, the Action still attempts to open version bump PRs, despite there being no valid changesets for non-ignored packages.

Expected behavior

No PR should be opened if all available changesets reference only ignored packages.

Actual behavior

The action creates PRs even when a local npx changeset status reports "NO packages to be bumped", and all changeset files are for only ignored packages. This is reproducible on v1.4.6 with recent @changesets/cli releases (v2.29.7).

Minimal Reproduction

  1. Create a monorepo with at least one ignored package (e.g., in .changeset/config.json: "ignore": ["my-ignored-package"]).
  2. Add a changeset targeting only the ignored package:
    npx changeset add my-ignored-package minor
  3. Push the changes and let changesets/action run on CI.
  4. Observe that a PR is created for version bump, even though npx changeset status on the branch says there is nothing to bump.

Environment

  • changesets/action: v1.4.6
  • @changesets/cli: v2.29.7
  • Node.js: 24.x
  • config.json (relevant):
    {
      "ignore": ["my-ignored-package"],
      "baseBranch": "main", // or your release branch
      ...
    }

Analysis

It appears the bug is caused by the Action not filtering out changesets for ignored packages in readChangesetState.ts.

See: https://github.com/changesets/action/files/src/readChangesetState.ts


Expected solution: Filter changesets so only those referencing non-ignored packages cause PR creation.

Additional context

  • Local workflow shows correct status; only CI (running action) gets this wrong.

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