Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bot profiles are incorrect #1002

Closed
ghost opened this issue Jul 20, 2020 · 8 comments
Closed

Bot profiles are incorrect #1002

ghost opened this issue Jul 20, 2020 · 8 comments

Comments

@ghost
Copy link

ghost commented Jul 20, 2020

As titled. The tag [bot] gets added to the username, which is apparently used everywhere, showing an invalid user.

@maniac103
Copy link
Collaborator

showing an invalid user.

What do you mean by that?

@ghost
Copy link
Author

ghost commented Jul 20, 2020

The username is supposed to be 'dependabot'. I'm not sure why the [bot] part gets added as it results in an incorrect user.

@maniac103
Copy link
Collaborator

What do you mean by 'incorrect user'? Incorrect in what way?

IIRC that suffix is added by GH themselves (IOW, is part of the API response), but I'll double check.

@ghost
Copy link
Author

ghost commented Jul 20, 2020

Incorrect as in [bot] shouldn't be added to username like that

@maniac103
Copy link
Collaborator

I guess I can't reproduce?

Screenshot_20200720-171834_OctoDroid

@maniac103
Copy link
Collaborator

Or rather, you're looking at an entirely different user. Can you please share the URL of that user ('Share' in the user activity you screenshotted)?

@ghost
Copy link
Author

ghost commented Jul 20, 2020

Click here this is where it'll show dependabot[bot] instead of dependabot.

@maniac103
Copy link
Collaborator

Something's weird with that dependabot user. API response for your linked PR (curl https://api.github.com/repos/SwampApe/node-amf/pulls/2):

{
  "url": "https://api.github.com/repos/SwampApe/node-amf/pulls/2",
  [...]
  "user": {
    "login": "dependabot[bot]",
    "id": 49699333,
    "node_id": "MDM6Qm90NDk2OTkzMzM=",
    "avatar_url": "https://avatars0.githubusercontent.com/in/29110?v=4",
    "gravatar_id": "",
    "url": "https://api.github.com/users/dependabot%5Bbot%5D",
    "html_url": "https://github.com/apps/dependabot",
    "followers_url": "https://api.github.com/users/dependabot%5Bbot%5D/followers",
    "following_url": "https://api.github.com/users/dependabot%5Bbot%5D/following{/other_user}",
    "gists_url": "https://api.github.com/users/dependabot%5Bbot%5D/gists{/gist_id}",
    "starred_url": "https://api.github.com/users/dependabot%5Bbot%5D/starred{/owner}{/repo}",
    "subscriptions_url": "https://api.github.com/users/dependabot%5Bbot%5D/subscriptions",
    "organizations_url": "https://api.github.com/users/dependabot%5Bbot%5D/orgs",
    "repos_url": "https://api.github.com/users/dependabot%5Bbot%5D/repos",
    "events_url": "https://api.github.com/users/dependabot%5Bbot%5D/events{/privacy}",
    "received_events_url": "https://api.github.com/users/dependabot%5Bbot%5D/received_events",
    "type": "Bot",
    "site_admin": false
  },

so the suffix clearly is part of the GH API response, as visible in the 'login' and various URL fields. Querying that user indeed works (and gives the response you're seeing):

{
  "login": "dependabot[bot]",
  "id": 49699333,
  "node_id": "MDM6Qm90NDk2OTkzMzM=",
  "avatar_url": "https://avatars0.githubusercontent.com/in/29110?v=4",
  "gravatar_id": "",
  "url": "https://api.github.com/users/dependabot%5Bbot%5D",
  "html_url": "https://github.com/apps/dependabot",
  "followers_url": "https://api.github.com/users/dependabot%5Bbot%5D/followers",
  "following_url": "https://api.github.com/users/dependabot%5Bbot%5D/following{/other_user}",
  "gists_url": "https://api.github.com/users/dependabot%5Bbot%5D/gists{/gist_id}",
  "starred_url": "https://api.github.com/users/dependabot%5Bbot%5D/starred{/owner}{/repo}",
  "subscriptions_url": "https://api.github.com/users/dependabot%5Bbot%5D/subscriptions",
  "organizations_url": "https://api.github.com/users/dependabot%5Bbot%5D/orgs",
  "repos_url": "https://api.github.com/users/dependabot%5Bbot%5D/repos",
  "events_url": "https://api.github.com/users/dependabot%5Bbot%5D/events{/privacy}",
  "received_events_url": "https://api.github.com/users/dependabot%5Bbot%5D/received_events",
  "type": "Bot",
  "site_admin": false,
  "name": null,
  "company": null,
  "blog": "",
  "location": null,
  "email": null,
  "hireable": null,
  "bio": null,
  "twitter_username": null,
  "public_repos": 0,
  "public_gists": 0,
  "followers": 0,
  "following": 0,
  "created_at": "2019-04-16T22:34:25Z",
  "updated_at": "2019-05-23T08:22:16Z"
}

This bot user also clearly is distinct from the actual dependabot user (curl https://api.github.com/users/dependabot):

{
  "login": "dependabot",
  "id": 27347476,
  "node_id": "MDEyOk9yZ2FuaXphdGlvbjI3MzQ3NDc2",
  "avatar_url": "https://avatars1.githubusercontent.com/u/27347476?v=4",
  "gravatar_id": "",
  "url": "https://api.github.com/users/dependabot",
  "html_url": "https://github.com/dependabot",
  "followers_url": "https://api.github.com/users/dependabot/followers",
  "following_url": "https://api.github.com/users/dependabot/following{/other_user}",
  "gists_url": "https://api.github.com/users/dependabot/gists{/gist_id}",
  "starred_url": "https://api.github.com/users/dependabot/starred{/owner}{/repo}",
  "subscriptions_url": "https://api.github.com/users/dependabot/subscriptions",
  "organizations_url": "https://api.github.com/users/dependabot/orgs",
  "repos_url": "https://api.github.com/users/dependabot/repos",
  "events_url": "https://api.github.com/users/dependabot/events{/privacy}",
  "received_events_url": "https://api.github.com/users/dependabot/received_events",
  "type": "Organization",
  "site_admin": false,
  "name": "Dependabot",
  "company": null,
  "blog": "https://github.com/features/security",
  "location": "San Francisco, CA",
  "email": null,
  "hireable": null,
  "bio": "Automated dependency updates built into GitHub",
  "twitter_username": null,
  "public_repos": 19,
  "public_gists": 0,
  "followers": 0,
  "following": 0,
  "created_at": "2017-04-12T11:03:37Z",
  "updated_at": "2020-06-01T16:23:44Z"
}

(mind the differing id fields), so I can't simply drop the [bot] suffix from the login field.

Notes to self: I probably need to do the following:

  • If user type is 'Bot', remove '[bot]' suffix if present when showing login name (user fragment, event list)
  • Maybe move user type (organization, bot) out of login name in user activity
  • Indicate bot in event list by special span (similar to e.g. 'contributor')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant