Skip to content

[BUG](ci) Changelog fragment check false-fails on PRs that touch no package #635

Description

The Require changelog on package change job (.github/workflows/require-changelog-fragment.yaml) aborts with a bare exit 1 on any PR whose diff touches no file under packages/ — a workflow-only, docs-only, or root-only change.

Root cause: the job computes the changed packages with

touched=$(echo "$changed" | grep -oE "^packages/[^/]+/" | sort -u | while read -r prefix; do ... done)

When $changed contains no packages/ path, grep -oE matches nothing and exits 1. Under set -euo pipefail the pipeline inherits that non-zero status, and the command substitution in an assignment makes set -e abort the whole script before any output. The failure is indistinguishable from a genuine missing-fragment failure: no ::error::, no package list, just exit 1.

The sibling has_fragment / has_changelog substitutions already guard their grep -c with || true; the touched pipeline was missed.

Impact: every no-package PR falsely fails the required check and is forced to add a spurious fragment to get green. Observed on #626 (a workflow-only publish fix).

Fix: tolerate the no-match exit on the touched pipeline (append || true), matching the existing pattern. Detection of real missing fragments is unaffected.

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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions