-
Notifications
You must be signed in to change notification settings - Fork 27
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
Showing
2 changed files
with
77 additions
and
0 deletions.
There are no files selected for viewing
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,65 @@ | ||
// Copyright 2023, University of Colorado Boulder | ||
|
||
const buildLocal = require( '../../perennial-alias/js/common/buildLocal' ); | ||
const { Octokit } = require( 'octokit' ); // eslint-disable-line require-statement-match | ||
const octokit = new Octokit( { | ||
auth: buildLocal.phetDevGitHubAccessToken | ||
} ); | ||
|
||
// List all users for the organization | ||
const getUsersFromGitHub = async () => { // eslint-disable-line no-unused-vars | ||
const result = await octokit.request( 'GET /orgs/phetsims/members', { | ||
org: 'phetsims', | ||
per_page: 100 | ||
} ); | ||
|
||
// console.log( result.data.length ); | ||
const logins = result.data.map( member => member.login ); | ||
return logins; | ||
}; | ||
|
||
// Users that have >=1 ready for review issue as of Feb 16, 2023 | ||
const getUsersStatic = async () => { | ||
return [ | ||
'AgustinVallejo', | ||
'amanda-phet', | ||
'arouinfar', | ||
'chrisklus', | ||
'emily-phet', | ||
'JacquiHayes', | ||
'jbphet', | ||
'jessegreenberg', | ||
'jonathanolson', | ||
'kathy-phet', | ||
'Luisav1', | ||
'matthew-blackman', | ||
'Matthew-Moore240', | ||
'mattpen', | ||
'oliver-phet', | ||
'pixelzoom', | ||
'samreid', | ||
'veillette', | ||
'zepumph' | ||
]; | ||
}; | ||
const getUsers = getUsersStatic; | ||
|
||
// https://docs.github.com/en/rest/users/users?apiVersion=2022-11-28#list-users | ||
( async () => { | ||
const users = await getUsers(); | ||
|
||
for ( let i = 0; i < users.length; i++ ) { | ||
const user = users[ i ]; | ||
|
||
const result = await octokit.request( 'GET /search/issues', { | ||
accept: 'application/vnd.github+json', | ||
// q: `is:issue is:open label:status:ready-for-review assignee:${user} org:phetsims`, | ||
q: `is:issue is:open assignee:${user} org:phetsims`, | ||
per_page: 100, | ||
page: 1 | ||
} ); | ||
// console.log( result.data.items.length ); | ||
// console.log( result.data.items ); | ||
console.log( `${user}: ${result.data.items.length}` ); | ||
} | ||
} )(); |
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,12 @@ | ||
{ | ||
"name": "phet-info", | ||
"version": "1.0.0", | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/phetsims/phet-info.git" | ||
}, | ||
"devDependencies": { | ||
"@octokit": "~4.2.0" | ||
} | ||
} |