Open
Conversation
bjohansebas
commented
Feb 24, 2025
| * @param { import("knex").Knex } knex | ||
| * @returns { Promise<void> } | ||
| */ | ||
| exports.up = async (knex) => { |
Contributor
Author
There was a problem hiding this comment.
This table is being created with the response from https://docs.github.com/en/rest/orgs/members?apiVersion=2022-11-28#list-organization-members, I think it makes the most sense. I don't think we need all the user information.
0903448 to
78b45de
Compare
bjohansebas
commented
Feb 24, 2025
Contributor
Author
There was a problem hiding this comment.
This was brought from the schema provided by GitHub
bjohansebas
commented
Feb 25, 2025
Comment on lines
+75
to
+91
| for await (const org of organizations) { | ||
| debug(`Fetching members for org (${org.login})`) | ||
| logger.info(`Fetching members for org (${org.login})`) | ||
| const members = await github.fetchOrgMembersByLogin(org.login) | ||
| debug(`Got ${members.length} members for org: ${org.login}`) | ||
| debug('Validating data') | ||
| validateGithubListOrgMembers(members) | ||
|
|
||
| // Upsert each member in parallel | ||
| for await (const member of members) { | ||
| debug(`Upserting member (${member.login})`) | ||
| const mappedData = github.mappers.user(member) | ||
| await upsertGithubMembers(mappedData) | ||
| } | ||
| } | ||
| } | ||
|
|
Contributor
Author
Contributor
Author
|
I think the best option would be to split this PR into two: one for GitHub users and another for roles. @UlisesGascon What do you think? The roles topic has quite a bit of logic since there are roles by teams and by repository, at least that's what I understood from the GitHub API. |
Contributor
Author
|
Is there anything I can do to move this forward? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Related #148