This commit is contained in:
Froilan Irizarry Rivera 2021-04-07 12:24:36 -04:00
Родитель 1ee9357296
Коммит ff041b98d1
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 28A579A109B79D40
2 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -38,9 +38,9 @@ const { cursor, pretty, limit, api, apiType, token, org, outputFile, source } =
function buildGitHubClient () {
const Octo = Octokit.plugin(retry, throttling)
const enterpiseOcto = Octo.plugin(enterpriseCloud)
const EnterpiseOcto = Octo.plugin(enterpriseCloud)
const octokit = new enterpiseOcto({
const octokit = new EnterpiseOcto({
auth: token,
throttle: {
onRateLimit: (retryAfter, _) => {

Просмотреть файл

@ -49,7 +49,7 @@ async function requestV4Entries (octokit, org, limit, cursor) {
// In this case we are not using the cursors from the header Link as identifies the page and the last element, but wouldn't
// be reliable if pagination, limit and size changes. To avoid that we are using the findHashedEntry method and we are hashing
// each of the elements separately so we can find them in a more reliable way
async function requestV3Entries (octokit, entity, limit, cursor, apiType, auditLogSource='org') {
async function requestV3Entries (octokit, entity, limit, cursor, apiType, auditLogSource = 'org') {
let entries = []
const hasLimit = limit || false
let foundCursor = false
@ -58,7 +58,7 @@ async function requestV3Entries (octokit, entity, limit, cursor, apiType, auditL
let options = {}
// Hardcoded org endpoints. We need to add the enterprise endpoints
switch(auditLogSource) {
switch (auditLogSource) {
case 'enterprise':
endpoint = '/enterprises/{enterprise}/audit-log'
options = { enterprise: entity }