File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -13,9 +13,12 @@ function uniq(a) {
1313}
1414
1515function teamHasWrite(permission) {
16- return permission == 'push';
16+ console.debug(`Permission provided: ${permission}`);
17+ const options = ['write', 'push', 'admin'];
18+ return options.indexOf(permission) != -1;
1719}
1820
21+
1922async function getTeamUsers(org, team) {
2023 const {data} = await octokit.request('GET /orgs/{org}/teams/{team_slug}/members', {
2124 org: org,
Original file line number Diff line number Diff line change @@ -7,9 +7,12 @@ function uniq(a) {
77}
88
99function teamHasWrite ( permission ) {
10- return permission == 'push' ;
10+ console . debug ( `Permission provided: ${ permission } ` ) ;
11+ const options = [ 'write' , 'push' , 'admin' ] ;
12+ return options . indexOf ( permission ) != - 1 ;
1113}
1214
15+
1316async function getTeamUsers ( org , team ) {
1417 const { data} = await octokit . request ( 'GET /orgs/{org}/teams/{team_slug}/members' , {
1518 org : org ,
You can’t perform that action at this time.
0 commit comments