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

[REST] avatar_url examples are misleading #3259

Open
1 task done
jsoref opened this issue Dec 20, 2023 · 7 comments
Open
1 task done

[REST] avatar_url examples are misleading #3259

jsoref opened this issue Dec 20, 2023 · 7 comments

Comments

@jsoref
Copy link

jsoref commented Dec 20, 2023

Code of Conduct

What article on docs.github.com is affected?

https://docs.github.com/en/rest/commits/statuses?apiVersion=2022-11-28

What part(s) of the article would you like to see updated?

The example responses have things like:

  {
    "url": "https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e",
    "avatar_url": "https://github.com/images/error/hubot_happy.gif",
    "id": 1,
    "node_id": "MDY6U3RhdHVzMQ==",
    "state": "success",
    "description": "Build has completed successfully",
    "target_url": "https://ci.example.com/1000/output",
    "context": "continuous-integration/jenkins",
    "created_at": "2012-07-20T01:19:13Z",
    "updated_at": "2012-07-20T01:19:13Z",
    "creator": {
      "login": "octocat",
      "id": 1,
      "node_id": "MDQ6VXNlcjE=",
      "avatar_url": "https://github.com/images/error/octocat_happy.gif",

Note that both avatar_urls are 404:

This doesn't seem to match the real world, and since I'm looking for the word error, it's really confusing/misleading.

Checking https://api.github.com/users/octocat, it appears it's more likely that it should be something like:

{
  "login": "octocat",
  "id": 583231,
  "node_id": "MDQ6VXNlcjU4MzIzMQ==",
  "avatar_url": "https://avatars.githubusercontent.com/u/583231?v=4",

I can't tell if that's the avatar_url I should see in both places or if they're very different things.

Additional information

I'm trying to get information on error, failure, pending, or success, so I'm looking for those in the output of responses...

Note that the use of a lot of "id": 1, for things that might be different is very counter-productive.

It'd be really nice if the sample output covered each of the status states instead of just one.

@jsoref jsoref added the content label Dec 20, 2023
@codewithdev
Copy link

Hey team, happy to pick it up. 😄

@jsoref
Copy link
Author

jsoref commented Dec 20, 2023

fwiw, REST content can't be fixed by externals

@codewithdev
Copy link

codewithdev commented Dec 20, 2023

@jsoref Did you ran your spell-checker for GitHub Docs as well? like others? 😁

@jsoref
Copy link
Author

jsoref commented Dec 20, 2023

Yes. And most of my fixes are merged.

@nguyenalex836
Copy link

@jsoref Thank you for opening this issue! I'll get this triaged for review ✨

@docs-bot
Copy link
Collaborator

Thank you for opening this issue! Changes to the REST API schema can be requested in github/rest-api-description. I will transfer your issue over to that open source repo.

@docs-bot docs-bot transferred this issue from github/docs Dec 20, 2023
@becco becco added the feature label Jan 2, 2024
@SomeTroglodyte

This comment was marked as spam.

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

No branches or pull requests

7 participants
@jsoref @codewithdev @becco @SomeTroglodyte @docs-bot @nguyenalex836 and others