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

Github Page Not Found Issue Due to Special Characters in Branch Name(ref) Links #87

Open
gwansikk opened this issue Aug 15, 2024 · 0 comments

Comments

@gwansikk
Copy link

Summary

When the branch name contains special characters, the hyperlink "Click here if you're a maintainer who wants to add a changeset to this PR" results in a "Page not found" error on GitHub.

Troubleshooting

image

We use branch names that include the issue number, like this: (feature/#39). However, when using the changeset-bot to generate a changeset.md, it fails because GitHub's URL handling with special characters leads to a "Page not found" error.

❌ feature/#39 ✅ feature/%2339
image image

How about converting the branch name (context.payload.pull_request.head.ref) using encodeURIComponent? This will ensure that GitHub correctly recognizes it!

encodeURIComponent("feature/#39") // 'feature%2F%2339'
image
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

No branches or pull requests

1 participant