Skip to content

verify-release-intent workflow fails to access PR labels in workflow_call context #86

Description

@cratis-direct

Issue

The verify-release-intent reusable workflow cannot access PR labels when called via workflow_call.

Root Cause

Line 31 of .github/workflows/verify-release-intent.yml attempts to access github.event.pull_request.labels directly:

LABELS: ${{ toJSON(github.event.pull_request.labels.*.name) }}

In a workflow_call context, the github.event.pull_request object is not available, causing LABELS to be set to an empty array [], which triggers a verification failure even when the PR has the required labels.

Current Impact

PRs that properly have labels like no-release, major, minor, or patch still fail the verification check because the workflow cannot see the labels.

Solution

The reusable workflow should accept the PR labels as input parameters so that the caller workflow can pass them explicitly. Example:

on:
  workflow_call:
    inputs:
      labels:
        description: 'JSON array of PR label names'
        type: string
        required: true

Then use inputs.labels instead of github.event.pull_request.labels.*.name.

Reproduction

This affects Arc.Kotlin PR #44 and likely other repositories using this reusable workflow.

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

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions