Problem
The verify-release-intent.yml reusable workflow currently tries to access github.event.pull_request.labels directly, which is not available in the workflow_call context. This causes the workflow to always see an empty labels list, even when the calling PR has the required labels.
Solution
Modify the reusable workflow to accept labels as an explicit input parameter from calling workflows. This allows repositories to pass PR labels to the reusable workflow where they can be verified.
Changes needed:
-
Add an inputs section to the workflow_call trigger:
on:
workflow_call:
inputs:
labels:
type: string
required: false
default: '[]'
description: 'JSON array of label names from the pull request'
-
Update the environment variable to use the input:
env:
LABELS: ${{ inputs.labels }}
This makes the workflow compatible with all repositories that need to verify release intent labels. Calling workflows (like those in Arc.Kotlin, Arc.JavaScript, etc.) would pass labels like:
with:
labels: ${{ toJSON(github.event.pull_request.labels.*.name) }}
Impact
This is a backwards-compatible change (with a default empty array), but all calling workflows would need to be updated to pass the labels explicitly to work correctly. This prevents the common issue where PRs with valid labels fail the verification due to context limitations in reusable workflows.
Related Issues
Problem
The
verify-release-intent.ymlreusable workflow currently tries to accessgithub.event.pull_request.labelsdirectly, which is not available in theworkflow_callcontext. This causes the workflow to always see an empty labels list, even when the calling PR has the required labels.Solution
Modify the reusable workflow to accept labels as an explicit input parameter from calling workflows. This allows repositories to pass PR labels to the reusable workflow where they can be verified.
Changes needed:
Add an
inputssection to theworkflow_calltrigger:Update the environment variable to use the input:
This makes the workflow compatible with all repositories that need to verify release intent labels. Calling workflows (like those in Arc.Kotlin, Arc.JavaScript, etc.) would pass labels like:
Impact
This is a backwards-compatible change (with a default empty array), but all calling workflows would need to be updated to pass the labels explicitly to work correctly. This prevents the common issue where PRs with valid labels fail the verification due to context limitations in reusable workflows.
Related Issues