diff --git a/src/identitiesInRepo/identitiesInRepoService.ts b/src/identitiesInRepo/identitiesInRepoService.ts index d089b83b..bef3ddb3 100644 --- a/src/identitiesInRepo/identitiesInRepoService.ts +++ b/src/identitiesInRepo/identitiesInRepoService.ts @@ -1,7 +1,6 @@ import * as core from '@actions/core'; import * as github from '@actions/github'; import { Octokit } from '@octokit/rest'; -import {OctokitResponse} from '@octokit/types'; export class IdentitiesInRepoService { public static async setIdentitiesInRepoFindings(): Promise { @@ -13,23 +12,20 @@ export class IdentitiesInRepoService { const octokit: Octokit = new Octokit({ auth: token, }); - + // https://www.npmjs.com/package/octokit#pagination - const iterator: any = - octokit.paginate.iterator(octokit.repos.listContributors, { - owner: owner, - repo: repo, - per_page: 100 - }); + const iterator: any = octokit.paginate.iterator(octokit.repos.listContributors, { + owner: owner, + repo: repo, + per_page: 100, + }); - for await (const { data: page } of iterator) { - for (const user of page) { - console.log("---") - console.log(user.type) - } + for await (const { data: page } of iterator) { + for (const user of page) { + console.log('---'); + console.log(user.type); } - - + } } catch (error) { core.warning('Failed to fetch identities for repo'); core.warning(error.message); diff --git a/src/index.ts b/src/index.ts index c55ac9a5..790f8a45 100644 --- a/src/index.ts +++ b/src/index.ts @@ -9,7 +9,7 @@ import { CodeQualityService } from './codequalitytools/CodeQualityService'; import { SastService } from './sasttools/SastService'; import { ScaService } from './scatools/ScaService'; import { SecretScanningService } from './secretscanning/SecretScanningService'; -import { IdentitiesInRepoService } from './identitiesInRepo/identitiesInRepoService' +import { IdentitiesInRepoService } from './identitiesInRepo/identitiesInRepoService'; /** * The main function for the action. * @returns {Promise} Resolves when the action is complete.