gitpod-io / gitpod

The developer platform for on-demand cloud development environments to create software faster and more securely.
https://www.gitpod.io
GNU Affero General Public License v3.0
12.82k stars 1.23k forks source link

Can't open branch with german umlaut "ä" #4236

Open Pawluq opened 3 years ago

Pawluq commented 3 years ago

Bug description

Hi,

we have a Branch called: sprint_21_10-5013-benutzerin-benachrichtigung-awareness-personen-via-erwähnen. If I try to open it in Gitpod i get the following Error:

Cannot find tag/branch for context: [...]/sprint_21_10-5013-benutzerin-benachrichtigung-awareness-personen-via- erw%C3%A4hnen.

It looks like there's some problem with the umlaut "ä". I cloned the branch into a new one and replaced the letter with "ae" and now it works.

Steps to reproduce

  1. Create a branch with the german umlaut "ä"
  2. Open it in Gitpod via GitLab

Expected behavior

Gitpod opens branches with germans umlauts

Example repository

No response

Anything else?

No response

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

filiptronicek commented 3 years ago

Wow, this is cool, had no idea one could add non-ASCII characters to git branches 😄, but according to git's docs it's really valid.

bigint commented 3 years ago

I can reproduce this issue 👍🏻

image

filiptronicek commented 3 years ago

Did a bit of research on this, looks like this is happening just with GitLab, GitHub opens these non-ascii characters just fine (tried yümmy, gítpóď).

This error is thrown in https://github.com/gitpod-io/gitpod/blob/de5ee830711ac2f501d458492ce3f6f4eb20ce9b/components/server/src/gitlab/gitlab-context-parser.ts#L264, and it looks like the branch's name is just incorrectly parsed without decoding the special characters. Maybe decodeURIComponent could help?

bigint commented 3 years ago

/cc @dnsmichi

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.