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

Get databaseId for organizations #114

Open
ericboucher opened this issue Apr 28, 2022 · 2 comments
Open

Get databaseId for organizations #114

ericboucher opened this issue Apr 28, 2022 · 2 comments

Comments

@ericboucher
Copy link
Contributor

Following up on #112, we should:

  • create a utility function to avoid duplication between repos and users streams
  • use this util to implement a similar behavior for organizations and their children's streams

Some initial thoughts on refactoring

Technically, user{i} could be item{i} and we could extract the TempStream as a ContextStream to be shared between users, repos, and orgs streams

Some pseudo code of what I am thinking about:

ContextStream(request_records, request_body) -> [request_body_reponses]

repo:
request_records = [{repo, org}]
request_body = "{nameWithOwner, databaseId, id: nodeId }"

users
request_records = [{login}]
request_body = "{login, databaseId, id: nodeId }"
@laurentS
Copy link
Contributor

laurentS commented May 9, 2022

#117 is related, and actually makes this refactoring a bit harder because of limitations in the github API.

@ericboucher
Copy link
Contributor Author

Quick note/heads up, we also need to differentiate Bots. The current implementation does not work if a bot is specified in the list of user_usernames

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

2 participants