If a PR is opened on a branch that contains a name longer than 63 characters, the Forge Deploy Preview fails as the string is not shortened for the database name (though it appears to be shortened for the site domain name).
Solution
Shorten the database name the same way the site name is. This can likely be done by changing .substring(0, 64) to .substring(0, 63).
Creating preview site for branch: 714-some-absurd-and-lengthy-branch-name-generated-from-github-issues.
Creating site: 714-some-absurd-and-lengthy-branch-name-generated-from-github-i.dev.app.glitchsecure.com.
{
"database": [
"The database field must not be greater than 63 characters."
]
}
Error: Forge API request failed with status code 422.
Problem
If a PR is opened on a branch that contains a name longer than 63 characters, the Forge Deploy Preview fails as the string is not shortened for the database name (though it appears to be shortened for the site domain name).
Solution
Shorten the database name the same way the site name is. This can likely be done by changing
.substring(0, 64)
to.substring(0, 63)
.at https://github.com/bakerkretzmar/laravel-deploy-preview/blob/c04e09216fc48b895313139ff40f148bbe9a7dc1/src/lib.ts#L25
Additional information
Error output example:
Related to: #22 and #32