Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
salemxd committed Apr 17, 2024
1 parent e4569a5 commit f91f1f6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
26 changes: 11 additions & 15 deletions src/identitiesInRepo/identitiesInRepoService.ts
Original file line number Diff line number Diff line change
@@ -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<void> {
Expand All @@ -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, {

Check warning on line 17 in src/identitiesInRepo/identitiesInRepoService.ts

View workflow job for this annotation

GitHub Actions / build

Unexpected any. Specify a different type
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);
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<void>} Resolves when the action is complete.
Expand Down

0 comments on commit f91f1f6

Please sign in to comment.