Skip to content

ci(publish-preview): convert the pull-request input to a number - #175

Merged
Mrtenz merged 1 commit into
mainfrom
mrtenz/fix-publish-preview-number-input
Nov 13, 2026
Merged

Mrtenz merged 1 commit into
mainfrom
mrtenz/fix-publish-preview-number-input

Conversation

@Mrtenz

@Mrtenz Mrtenz commented Nov 13, 2026

Copy link
Copy Markdown
Member

Explanation

The typed inputs context added in #174 was not enough. A workflow_dispatch number input reaches the inputs context as a string, so the reusable workflow still rejected both an empty pull-request value and 0 for its number input with Unexpected value. This converts the input with fromJSON and falls back to 0 when it is blank. The reusable workflow in MetaMask/github-tools treats 0 as unset (inputs.pull-request || github.event.issue.number), so the branch input keeps working.

References

None.

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

A `workflow_dispatch` number input reaches the `inputs` context as a string, so the reusable workflow rejected both an empty value and `0` for its `number` input. Convert it with `fromJSON`, falling back to `0` when the input is blank. The reusable workflow treats `0` as unset.
@Mrtenz
Mrtenz marked this pull request as ready for review November 13, 2026 16:57
@Mrtenz
Mrtenz requested a review from a team as a code owner November 13, 2026 16:57
@Mrtenz
Mrtenz deployed to default-branch November 13, 2026 16:57 — with GitHub Actions Active
@Mrtenz
Mrtenz enabled auto-merge November 13, 2026 16:58
@Mrtenz
Mrtenz added this pull request to the merge queue Nov 13, 2026
Merged via the queue into main with commit f52be4d Nov 13, 2026
62 checks passed
@Mrtenz
Mrtenz deleted the mrtenz/fix-publish-preview-number-input branch November 13, 2026 17:00

This branch was successfully deployed

1 active deployment
default-branch — b566eba5 Deployed Nov 13, 2026 by Mrtenz via Determine whether this PR is a release PR #233
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants