generated from atls-lab/template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0102dd6
commit 7a20dc7
Showing
5 changed files
with
57 additions
and
49 deletions.
There are no files selected for viewing
16 changes: 5 additions & 11 deletions
16
app/fragments/app-member-cards-grid/src/hooks/check-members-onbording-conditions.hook.ts
This file contains 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
This file contains 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
23 changes: 23 additions & 0 deletions
23
app/fragments/app-member-cards-grid/src/hooks/get-members-withot-2fa.hook.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { createOctokitRestClient } from '@globals/data' | ||
import { getGithubOrganizationMembersWithout2fa } from '@globals/data' | ||
|
||
export const getMembersWithout2fa = async (token) => { | ||
const defaultOrganizationName = process.env.NEXT_PUBLIC_GITHUB_ORG_NAME as string | ||
|
||
const membersWithou2fa = [] | ||
|
||
const restClient = createOctokitRestClient(token) | ||
const query = getGithubOrganizationMembersWithout2fa({ | ||
organizatoinName: defaultOrganizationName, | ||
}) as [any] | ||
|
||
const restResponse = await restClient(...query) | ||
|
||
if (restResponse.data.length) { | ||
for (const { id: memberId } of restResponse.data) { | ||
membersWithou2fa.push(memberId) | ||
} | ||
} | ||
|
||
return membersWithou2fa | ||
} |
1 change: 1 addition & 0 deletions
1
...ts/app-member-cards-grid/src/hooks/helpers/check-member-in-default-organization.helper.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const checkMemberInDefaultOrganization = () => {} |
This file contains 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