File tree Expand file tree Collapse file tree 1 file changed +19
-6
lines changed
Expand file tree Collapse file tree 1 file changed +19
-6
lines changed Original file line number Diff line number Diff line change @@ -6,16 +6,29 @@ const octokit = new Octokit({ auth: GITHUB_TOKEN });
66
77export default {
88 async load ( ) {
9- const members = await octokit . paginate (
10- octokit . rest . teams . listMembersInOrg ,
11- {
12- org : "FabricMC" ,
13- team_slug : "documentation" ,
9+ const members = await ( async ( ) => {
10+ try {
11+ return await octokit . paginate ( octokit . rest . teams . listMembersInOrg , {
12+ org : "FabricMC" ,
13+ team_slug : "documentation" ,
14+ } ) ;
15+ } catch ( e ) {
16+ // Allows build without a GITHUB_TOKEN
17+ return [ ] ;
1418 }
15- ) ;
19+ } ) ( ) ;
1620
1721 return members
1822 . filter ( ( contributor ) => contributor . login !== "FabricMCBot" )
23+ . filter ( async ( contributor ) =>
24+ (
25+ await octokit . paginate ( octokit . rest . orgs . listForUser , {
26+ username : contributor . login ,
27+ } )
28+ )
29+ . map ( ( org ) => org . login )
30+ . includes ( "FabricMC" )
31+ )
1932 . map (
2033 ( member ) =>
2134 ( {
You can’t perform that action at this time.
0 commit comments