Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Branches with long names break Forge Deploy Preview #40

Closed
GlitchWitch opened this issue Jun 16, 2024 · 1 comment · Fixed by #41
Closed

Branches with long names break Forge Deploy Preview #40

GlitchWitch opened this issue Jun 16, 2024 · 1 comment · Fixed by #41
Labels
bug Something isn't working

Comments

@GlitchWitch
Copy link
Contributor

GlitchWitch commented Jun 16, 2024

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).

- .substring(0, 64)
+ .substring(0, 63)

at

.substring(0, 64)

Additional information

Error output example:

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.

Related to: #22 and #32

@bakerkretzmar
Copy link
Owner

Thanks!

@bakerkretzmar bakerkretzmar added the bug Something isn't working label Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants