Skip to content

check-news.yml reusable workflow doesn't forward PR label context to the wrapped changelog-check-action #143

Description

@d-morrison

What's broken

check-news.yml's workflow_call job wraps UCD-SERG/changelog-check-action@v2, which is supposed to skip the changelog gate when the PR carries a no-changelog label. That escape hatch never actually fires for callers.

Root cause: inside a workflow_call job, github.event.pull_request is empty (the triggering pull_request event context isn't automatically forwarded into a called reusable workflow). NO_CHANGELOG_LABEL inside the wrapped composite ends up evaluating false even when the label is present on the calling PR.

Separately, UCD-SERG/changelog-check-action's hardcoded label check uses the string 'no changelog' (with a space), while at least one consumer repo (UCD-SERG/serocalculator) documents and uses no-changelog (with a hyphen) as its convention — so even if the context were forwarded correctly, the label name wouldn't match in that repo.

How this was found

Found while driving UCD-SERG/serocalculator#537 (the pilot migration to this reusable workflow) to a clean review verdict. Applying the no-changelog label and re-triggering the check still failed; adding a real NEWS.md bullet was used as the workaround to get that PR's changelog gate to pass.

Suggested fix

  • In check-news.yml's workflow_call job, explicitly pass through whatever label context the wrapped action needs (e.g. via with: inputs sourced from ${{ github.event.pull_request.labels }} at the caller level, or by having the reusable workflow accept a no-changelog-label input the caller can set).
  • Reconcile the hardcoded 'no changelog' string in changelog-check-action against actual consumer conventions (some repos use a hyphen), or make the label name configurable.

Impact

Any repo migrating to d-morrison/gha's central check-news.yml@v1 (per the consolidation effort) loses its no-changelog escape hatch silently — PRs that should be exempt from the changelog gate will fail it instead, with no clear error pointing at the real cause.

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