Skip to content

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

@gwansikk

Description

@gwansikk

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions