Skip to content

Commit

Permalink
fix for various perm types
Browse files Browse the repository at this point in the history
  • Loading branch information
olivercodes committed Aug 11, 2022
1 parent bc32c6c commit 1553b38
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@ function uniq(a) {
}

function teamHasWrite(permission) {
return permission == 'push';
console.debug(`Permission provided: ${permission}`);
const options = ['write', 'push', 'admin'];
return options.indexOf(permission) != -1;
}


async function getTeamUsers(org, team) {
const {data} = await octokit.request('GET /orgs/{org}/teams/{team_slug}/members', {
org: org,
Expand Down
5 changes: 4 additions & 1 deletion lib/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@ function uniq(a) {
}

function teamHasWrite(permission) {
return permission == 'push';
console.debug(`Permission provided: ${permission}`);
const options = ['write', 'push', 'admin'];
return options.indexOf(permission) != -1;
}


async function getTeamUsers(org, team) {
const {data} = await octokit.request('GET /orgs/{org}/teams/{team_slug}/members', {
org: org,
Expand Down

0 comments on commit 1553b38

Please sign in to comment.