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

Add Person Who Closed Issue to Issues Table #2456

Open
sgoggins opened this issue Jun 28, 2023 · 2 comments
Open

Add Person Who Closed Issue to Issues Table #2456

sgoggins opened this issue Jun 28, 2023 · 2 comments
Assignees
Labels
add-feature Adds new features API Related to Augur's metrics API database Related to Augur's unifed data model

Comments

@sgoggins
Copy link
Member

The cntrb_id at the end of the issues table is intended to have the user id for the person who closed the issue. This is available from the issue API, here: https://docs.github.com/en/rest/issues/issues?apiVersion=2022-11-28#get-an-issue

Here is the returned JSON block containing that information:

  "closed_by": {
    "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
  },

Simply add to the issue task.

@sgoggins sgoggins added add-feature Adds new features API Related to Augur's metrics API database Related to Augur's unifed data model labels Jun 28, 2023
@sgoggins
Copy link
Member Author

I think the issues API block also gives us everything we need to create a user if they do not already exist, as well. FWIW.

@sgoggins
Copy link
Member Author

per @ABrain7710 : "Yes, it can be retrieved from that endpoint. Which we can do, but it will drastically decrease the speed of issue collection since we would need to make an api call for every single issue. Since that endpoint is a on a per issue basis
It also doesn’t appear to be available in the graphql API"

Need to think a little more on this then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
add-feature Adds new features API Related to Augur's metrics API database Related to Augur's unifed data model
Projects
None yet
Development

No branches or pull requests

2 participants