Skip to content
This repository has been archived by the owner on Oct 15, 2021. It is now read-only.

Look into rate limiting through Octokit plugin and remove... #78 #120

Merged
merged 1 commit into from
Jan 26, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions src/Sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ const DEFAULT_ORG_PERMISSIONS = {
members_can_create_public_repositories: false,
members_allowed_repository_creation_type: 'none',
};
const MB_IN_BYTES = 1024;
const DEFAULT_WAIT_PERIOD_IN_MS = 500;
const API_OK_STATUS = 200;
const EXIT_ERROR_STATE = 1;

Expand All @@ -74,11 +72,6 @@ var eclipseApi;
var bots;
var stm;

// thread sleeping to prevent abuse of API
var sab = new SharedArrayBuffer(MB_IN_BYTES);
var int32 = new Int32Array(sab);
const waitTimeInMS = DEFAULT_WAIT_PERIOD_IN_MS;

_prepareSecret();

/**
Expand Down Expand Up @@ -358,8 +351,6 @@ async function updateTeam(org, teamName, designatedMembers) {
if (members !== undefined) {
members = members.filter(e => e.login !== user.github_handle);
}
// wait to make sure that we don't abuse GitHub API
Atomics.wait(int32, 0, 0, waitTimeInMS);
}

console.log(`Leftover members: ${JSON.stringify(members)}`);
Expand Down Expand Up @@ -454,7 +445,6 @@ async function removeOrgExternalContributors(projects, org) {
}
// get the collaborators
var collaborators = await wrap.getOrgCollaborators(org);
Atomics.wait(int32, 0, 0, waitTimeInMS);
if (collaborators === undefined) {
console.log(`Error while fetching collaborators for ${org}`);
return;
Expand Down