[BUG] Branch protection settings break for checks with emojis 🙅‍♂️

So my GitHub App posts a check called Work-in-progress state :robot:.

When I create a branch projection in the repo, I select Require status checks to pass before merging.

Then, I select Work-in-progress state :robot: and save.

Next thing I notice: there’s now ☐ Work-in-progress state :robot: and :ballot_box_with_check: Work-in-progress state in options.

So it saved another check name as an expectation and there’s no way to select and save the correct one with emoji.

On the PR discussion page, down next to “Merge” button it also says Work-in-progress state  Expected — Waiting for status to be reported which, of course, is not what I wanted.

So I’ve tried removing that emoji and whitespace before it from my code and it still didn’t match that branch protection check.

I used DevTools to inspect the label on the branch protection page and found out that there’s a trailing space.

So this time it didn’t work because "Work-in-progress state " != “Work-in-progress state”

From my observation, it looks like some sanitizing code on the branch protection page is broken affecting other places by just saving the wrong value to the database. It seems it removes Unicode things but in my case, it was especially hard to debug because that trailing whitespace is hard to visually spot on the web-page.

I hope, this can be addressed :slight_smile:

1 Like

Hi @webknjaz,

Thanks for being here and for taking the time to write in about this, are you still having this issue?

Just checked. Now it’s even worse: I’m getting HTTP 500 internal server error at https://github.com/webknjaz/comment-reactor-pyconsk-324/settings/branch_protection_rules/4834400 when trying to select that check with emoji and save it.

And the related check itself is at https://github.com/webknjaz/comment-reactor-pyconsk-324/pull/3/checks?check_run_id=84785783

As of 7-20-2020, it is still broken for me as well.

1 Like