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

Response for List app installations accessible to the user access token is odd #1397

Open
1 task done
jsoref opened this issue Jul 31, 2022 · 2 comments
Open
1 task done

Comments

@jsoref
Copy link

jsoref commented Jul 31, 2022

Code of Conduct

What article on docs.github.com is affected?

https://docs.github.com/en/rest/apps/installations#list-app-installations-accessible-to-the-user-access-token

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

The JSON response is suspicious:

{
    "total_count": 2,
    "installations": [
      {
        "id": 1,
        "account": {
          "login": "octocat",
          "id": 1,
          "node_id": "MDQ6VXNlcjE=",
          "avatar_url": "https://github.com/images/error/octocat_happy.gif",
          "gravatar_id": "",
          "url": "https://api.github.com/users/octocat",
          "html_url": "https://github.com/octocat",
          "followers_url": "https://api.github.com/users/octocat/followers",
          "following_url": "https://api.github.com/users/octocat/following{/other_user}",
          "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
          "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
          "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
          "organizations_url": "https://api.github.com/users/octocat/orgs",
          "repos_url": "https://api.github.com/users/octocat/repos",
          "events_url": "https://api.github.com/users/octocat/events{/privacy}",
          "received_events_url": "https://api.github.com/users/octocat/received_events",
          "type": "User",
          "site_admin": false
        },
        "access_tokens_url": "https://api.github.com/installations/1/access_tokens",
        "repositories_url": "https://api.github.com/installation/repositories",
        "html_url": "https://github.com/organizations/github/settings/installations/1",
        "app_id": 1,
        "target_id": 1,
        "target_type": "Organization",
        "permissions": {
          "checks": "write",
          "metadata": "read",
          "contents": "read"
        },
        "events": [
          "push",
          "pull_request"
        ],
        "single_file_name": "config.yaml",
        "has_multiple_single_files": true,
        "single_file_paths": [
          "config.yml",
          ".github/issue_TEMPLATE.md"
        ],
        "repository_selection": "all",
        "created_at": "2017-07-08T16:18:44-04:00",
        "updated_at": "2017-07-08T16:18:44-04:00",
        "app_slug": "github-actions",
        "suspended_at": null,
        "suspended_by": null
      },
      {
        "id": 3,
        "account": {
          "login": "octocat",
          "id": 2,
          "node_id": "MDQ6VXNlcjE=",
          "avatar_url": "https://github.com/images/error/octocat_happy.gif",
          "gravatar_id": "",
          "url": "https://api.github.com/users/octocat",
          "html_url": "https://github.com/octocat",
          "followers_url": "https://api.github.com/users/octocat/followers",
          "following_url": "https://api.github.com/users/octocat/following{/other_user}",
          "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
          "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
          "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
          "organizations_url": "https://api.github.com/users/octocat/orgs",
          "repos_url": "https://api.github.com/users/octocat/repos",
          "events_url": "https://api.github.com/users/octocat/events{/privacy}",
          "received_events_url": "https://api.github.com/users/octocat/received_events",
          "type": "User",
          "site_admin": false
        },
        "access_tokens_url": "https://api.github.com/installations/1/access_tokens",
        "repositories_url": "https://api.github.com/installation/repositories",
        "html_url": "https://github.com/organizations/github/settings/installations/1",
        "app_id": 1,
        "target_id": 1,
        "target_type": "Organization",
        "permissions": {
          "checks": "write",
          "metadata": "read",
          "contents": "read"
        },
        "events": [
          "push",
          "pull_request"
        ],
        "single_file_name": "config.yaml",
        "has_multiple_single_files": true,
        "single_file_paths": [
          "config.yml",
          ".github/issue_TEMPLATE.md"
        ],
        "repository_selection": "all",
        "created_at": "2017-07-08T16:18:44-04:00",
        "updated_at": "2017-07-08T16:18:44-04:00",
        "app_slug": "github-actions",
        "suspended_at": null,
        "suspended_by": null
      }
    ]
  }

I'd expect these fields to differ for each element in the array:

        "access_tokens_url": "https://api.github.com/installations/1/access_tokens",
        "html_url": "https://github.com/organizations/github/settings/installations/1",

It'd also be nice if the example provided something that matched the experience described in https://github.com/orgs/community/discussions/27520

Additional information

No response

@jsoref jsoref added the content label Jul 31, 2022
@cmwilson21
Copy link

@jsoref Thanks so much for opening an issue and providing all this information! I'll triage this for the team to take a look 👀

@docubot
Copy link

docubot commented Aug 1, 2022

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.

@docubot docubot transferred this issue from github/docs Aug 1, 2022
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

3 participants