File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ export function getAuthenticatedOctokit() {
1616 } )
1717}
1818
19- export async function getGithubUsersFromGithub ( ) : Set < string > {
19+ export async function getGithubUsersFromGithub ( ) : Promise < Set < string > > {
2020 const members = await octokit . paginate ( octokit . orgs . listMembers , {
2121 org : process . env . GITHUB_ORG ,
2222 } )
@@ -57,7 +57,7 @@ export async function addUsersToGitHubOrg(users: Set<string>): Promise<void> {
5757 }
5858}
5959
60- export async function addUserToGitHubOrg ( user : string ) : Promise < void > {
60+ export async function addUserToGitHubOrg ( user : string ) : Promise < void | boolean > {
6161 if ( ignoredUsers . includes ( user . toLowerCase ( ) ) ) {
6262 console . log ( `Ignoring add for ${ user } ` )
6363 return false
Original file line number Diff line number Diff line change @@ -23,12 +23,10 @@ export async function getAdminService() {
2323 } )
2424}
2525
26- export async function getGithubUsersFromGoogle ( ) : Set < string > {
26+ export async function getGithubUsersFromGoogle ( ) : Promise < Set < string > > {
2727 const service = await getAdminService ( )
2828
29- const userList : {
30- data : { users : Array < userResponseEntry > }
31- } = await service . users . list ( {
29+ const userList = await service . users . list ( {
3230 customer : 'my_customer' ,
3331 maxResults : 250 ,
3432 projection : 'custom' ,
@@ -40,11 +38,8 @@ export async function getGithubUsersFromGoogle(): Set<string> {
4038 return githubAccounts
4139}
4240
43- interface userResponseEntry {
44- customSchemas : { Accounts : { github : Array < { value : string } > } }
45- }
46-
47- export function formatUserList ( users : Array < userResponseEntry > ) : Set < string > {
41+ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
42+ export function formatUserList ( users ) : Set < string > {
4843 return new Set (
4944 users
5045 . map ( ( user ) => user ?. customSchemas ?. Accounts ?. github . map ( ( account ) => account . value . toLowerCase ( ) ) )
You can’t perform that action at this time.
0 commit comments