isaacs / github

Just a place to track issues and feature requests that I have for github
2.21k stars 129 forks source link

Cannot create a pull request from a branch name that contains emoji with the "Compare & Pull request" button #752

Open camsaul opened 8 years ago

camsaul commented 8 years ago

Normally when I push a branch I'll see a message like this in my Slack:

screen shot 2016-08-24 at 4 34 23 pm

Now if I push a branch called ":shower:" I'll see this instead:

screen shot 2016-08-24 at 4 35 12 pm

And when I go to the home page of my repo it mentions that I pushed branches, but doesn't show the name:

screen shot 2016-08-24 at 4 35 36 pm

Clicking the "Compare & Pull Request" button doesn't work; I have to manually open a PR for the branch the hard way by looking through the list of all my branches and finding the appropriate one.

Anyways... I don't know the full extent of this issue (whether it extends to unicode characters in general or not). But I would like if GitHub better-supported emoji names for branches since a picture is worth a thousand words, as they say.

cirosantilli commented 8 years ago

How did you manage to push a branch called :shower:?

Current git considers that illegal: http://stackoverflow.com/questions/3651860/which-characters-are-illegal-within-a-branch-name

camsaul commented 8 years ago

I didn't push :shower: I pushed the actual Unicode character (U+1F6BF)

cirosantilli commented 8 years ago

Ah OK. Currently, it is possible to merge such a named branch: https://github.com/cirosantilli/test-git-web-interface/pull/21 , but I haven't tried from the create pull request button you mention.

But we can only create such branches from the web UI, otherwise a hook rejects the push with:

 ! [remote rejected] 🚿 -> 🚿 (pre-receive hook declined)

Unicode in general is alright it seems: https://github.com/cirosantilli/test-git-web-interface/tree/%E4%B8%AD%E6%96%87

eligundry commented 7 years ago

I'm having a similar issue. When I push up a branch with an emoji in it, the widget on the repo's home page that allows for quick opening of a PR will not render emoji and clicking on the open PR button will point to the wrong branch.

screenshot 2016-11-18 12 05 11

There should be a 💯 emoji there at the end.

TPS commented 7 years ago

Similar emoji-handling issues in #816 :cry: