Skip to content
This repository has been archived by the owner on May 29, 2023. It is now read-only.

Commit

Permalink
fix(deps): update dependency @octokit/rest to v16.33.1 (#358)
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinBeckwith authored Oct 12, 2019
1 parent 3efbe2c commit 8c939d9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"author": "Justin Beckwith",
"license": "Apache-2.0",
"dependencies": {
"@octokit/rest": "16.31.0",
"@octokit/rest": "16.33.1",
"cli-table": "^0.3.1",
"csv-string": "^3.1.5",
"gaxios": "^2.0.1",
Expand Down
10 changes: 8 additions & 2 deletions src/users.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,10 @@ export async function reconcileUsers() {
if (!match) {
console.log(`Adding ${u} to ${o}/${team.name}...`);
const p = octo.teams
.addMember({team_id: team.id, username: u})
.addOrUpdateMembership({
team_id: team.id,
username: u,
})
.catch(e => {
console.error(`Error adding ${u} to ${team.org}/${team.name}.`);
console.error(e.message);
Expand All @@ -164,7 +167,10 @@ export async function reconcileUsers() {
if (!match) {
console.log(`Removing ${u.login} from ${team.name}...`);
const p = octo.teams
.removeMember({team_id: team.id, username: u.login})
.removeMembership({
team_id: team.id,
username: u.login,
})
.catch(e => {
console.error(`Error removing ${u.login} from ${team.name}.`);
// console.error(e);
Expand Down

0 comments on commit 8c939d9

Please sign in to comment.