Atmos Pro dispatches your plan and apply workflows from the default branch, so until now
they had the commit SHA but no way to tell which pull request started the run. Workflows
that comment on a PR, label it, or name an environment after it had to look the number up
from the SHA through the GitHub API.
Add an optional
pr_number input to the workflow and Atmos Pro fills it in:on:
workflow_dispatch:
inputs:
pr_number:
description: "Pull request number, when available"
required: false
type: stringHow It Behaves
- It is sent only to workflows that declare
pr_number, so nothing changes for workflows that don't. - It is a string. Merge queue runs receive the number of the pull request that entered the queue.
- Runs with no pull request (releases, for example) don't receive it. Declare the input with
required: false; a workflow that marks itrequired: truefails on those runs with GitHub's missing-input error. - The name is reserved. A
pr_numberset underinputsinsettings.prois replaced by the real pull request number, or dropped when the run has none. - Legacy workflows that still declare
atmos_pro_run_iddon't receive it.
If Atmos Pro cannot read your workflow file to check its inputs, it sends
pr_number
anyway, the same way it always sends sha. A workflow that doesn't declare the input is
then rejected by GitHub for that dispatch.See GitHub Actions Workflows for the full input list
and the Atmos Pro settings for how
workflow inputs are configured.