Repository navigation
fix(ci): omit empty pr_number meta from preview deploys - #274
Merged
Merged
Conversation
A preview dispatched by hand has no pull request, and Vercel now rejects the deploy with "meta.pr_number should NOT be shorter than 1 characters". Pass the pr_number meta only when one was given. Assisted-by: AI
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merge order
Independent. The OpenAPI spike (#273) carries the same commit so its preview can deploy before this lands.
Summary
Hand-dispatched runs of
docs-pr-preview.ymlleavepr_numberempty, and the deploy step always passed--meta pr_number=""to the Vercel CLI. Vercel now rejects that withInvalid request: meta.pr_number should NOT be shorter than 1 characters, so every manual preview fails at the deploy step after a full build (run 40710687219).Fix
The deploy step builds the
--metaflags as an array and addspr_numberonly when one was given. Calls from coder/coder with a PR number are unchanged.QA
There is nothing to see on the site. The check is a manual preview run of #273's branch, which carries this commit, reaching "Deploy the prebuilt output as a coder-docs preview" and printing a URL.
Testing
actionlint(with ShellCheck) andoxfmt --checkpass on the workflow.Upstream
No: this is our own CI workflow.
🤖 Built with AI assistance.