Refined-github: `show-names` feature broken

Created on 25 Apr 2019  ยท  12Comments  ยท  Source: sindresorhus/refined-github

โŒ show-names
content.js:1880 Error: GraphQL:
Parse error on "[" (LBRACKET) at [1, 61]
    at content.js:1992

https://github.com/highlightjs/highlight.js/pull/2023

bug good first issue help wanted

Most helpful comment

Thanks for the details @bfred-it. We'll get that fixed.

All 12 comments

Interesting. The bot has a link but:

  • the link is a 404
  • the hovercard also fails to load

Since [ isn't allowed in a real username, we could do one of these two things:

  • skip names with [ (they're bots)
  • don't add names to commits, which I think is duplicate info anyway ๐Ÿค”

cc @sindresorhus and @DrewML (original author) thoughts?

Interesting. The bot has a link but:

  • the link is a 404
  • the hovercard also fails to load

That's an issue from GitHub, the bot has a valid username (greenkeeper), but GH mistakenly appends [bot] to the link. GH was only supposed to append it to the text inside link, not the href of the anchor tag too (https://github.com/greenkeeper __is__ a valid link).

/cc @lukehefson @shayfrendt


  • skip names with [ (they're bots)

How about removing that while querying, for now. Can be documented as a case for bot names.


  • don't add names to commits, which I think is duplicate info anyway ๐Ÿค”

Yup agree, emails always exists, names may not (can be empty).

skip names with [ (they're bots)

๐Ÿ‘

don't add names to commits, which I think is duplicate info anyway

๐Ÿ‘

/cc @lukehefson @shayfrendt

Going to throw a comment out to my rad rad colleague @jmilas who I _believe_ would have more context around this ๐Ÿ˜„

That's an issue from GitHub, the bot has a valid username (greenkeeper), but GH mistakenly appends [bot] to the link. GH was only supposed to append it to the text inside link, not the href of the anchor tag too (https://github.com/greenkeeper is a valid link).

:wave: I work with the GitHub Apps and API teams at GitHub, so I can help to dig in on this.

Bots and Apps are a bit tricky, so to make sure I fully understand - can you share a bit more detail around when/where you're seeing this behavior? If there's a specific query you could point me to, that'd be super helpful.

https://github.com/highlightjs/highlight.js/pull/2023

On this page there are two links to greenkeeper

  • the comment author
  • the commit author

The first one links to the real account while the second one includes [bot] in both the name and the URL, making it incorrect and pointing to a 404

3A9689BE-BAD4-4EDE-8422-C0D6928FE362

Thanks for the details @bfred-it. We'll get that fixed.

@bfred-it it was fix but...

โŒ show-names
content.js:1880 Error: GraphQL:
Could not resolve to a User with the login of 'greenkeeper'.
    at content.js:1992

It still errored out Since the link changed (its now marketplace)

New error even on the current page ๐Ÿ˜…

TypeError: "names[userKey] is undefined"
    show_names_init moz-extension://03ea1fad-5d68-ca45-a1c5-6257313c7f47/content.js:4586

@bfred-it not seeing that ๐Ÿ˜•

@jmilas there's a similar bug in "Edit history" modals: https://github.com/sindresorhus/refined-github/issues/2161 (+ related feature request)

The bots appear as namebot[bot] {botlabel}

Was this page helpful?
0 / 5 - 0 ratings