Conversation
|
OMG!! WOW How did I make such a mistake 🤦 |
461391d to
da213cf
Compare
|
This feature keeps getting longer and longer…. 😅 |
|
Buggy code 😏 |
@fregante ready. Right now the only thing that is broken is the |
| } | ||
|
|
||
| static escapeValue(value: string): string { | ||
| return /\s|^:/.test(value) ? `"${value}"` : value; |
There was a problem hiding this comment.
Changed is since GitHub will add quotes if it starts with a : or if it contains a space you can test it https://github.com/yakov116/TestR/labels
There was a problem hiding this comment.
Doesn't look accurate: https://github.com/fregante/sandbox/issues?q=is%3Aopen+sort%3Aupdated-desc+label%3A%3Aa%3A
I think it only happens for spaces, but there might be other characters as well. It might be worth creating new labels to test this out. You can do so in a test repo from the issue sidebar
There was a problem hiding this comment.
I did you want more tests?
There was a problem hiding this comment.
I mean manual tests on GitHub.com to determine what characters triggers the quotes. From what I see, currently this should be:
| return /\s|^:/.test(value) ? `"${value}"` : value; | |
| return value.includes(' ') ? `"${value}"` : value; |
There was a problem hiding this comment.
There was a problem hiding this comment.
maybe if it has an emoji?
There was a problem hiding this comment.
There was a problem hiding this comment.
|
Uhhhh this could have been useful 2 weeks ago 😂 https://github.blog/changelog/2021-08-02-search-issues-by-label-using-logical-or/ Might be worth updating the feature? The current situation is still better for the user though since:
So we're good without it anyway 😁 |
|
Yup I think the way it is now is good. But if we see a need we know we have other options. |
|
This doesn't seem to support uppercase characters in the label for me. Shouldn't the regex end with |
Can you give a real url? |
|
This one from the original post doesn't seem to work for me: But this repo works: |
|
Thanks |
|
I've opened #4811. I tried the |
|
You can send a PR |



Closes #4452
Test URLs
https://github.com/nodejs/node/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3Aconfirmed-bug
https://github.com/sindresorhus/refined-github/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22bug%22
https://github.com/MithrilJS/mithril.js/issues?q=is%3Aissue+is%3Aopen+label%3A%22Type%3A+Bug%22+sort%3Aupdated-desc
https://github.com/yakov116/TestR/issues?q=is%3Aissue+is%3Aopen+label%3A%22%3Abug%3A+bug%22+sort%3Aupdated-desc
Screenshot