github-api icon indicating copy to clipboard operation
github-api copied to clipboard

Any plan to support getting field suspended_at for get user api?

Open jiao-zhangS opened this issue 1 year ago • 1 comments

github api response includes filed suspended_at, which can be used to check if user is suspended or not I think

sample response at github doc

{
      "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/app/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
    }

Any plan to support getSuspendedAt like getUpdatedAt? https://github-api.kohsuke.org/apidocs/org/kohsuke/github/GHPerson.html#getUpdatedAt()

jiao-zhangS avatar Feb 21 '24 09:02 jiao-zhangS

PRs welcome.

bitwiseman avatar Feb 23 '24 15:02 bitwiseman

@bitwiseman Hello! I made a PR (#1906) for this issue. When you have a moment, could you please review it? Thank you!

styner9 avatar Aug 08 '24 07:08 styner9

FYI. https://github.com/hub4j/github-api/pull/1912

styner9 avatar Aug 19 '24 08:08 styner9