Skip to content

Commit

Permalink
Remove incompatible error handling dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
hampus-andersson-op committed Apr 12, 2024
1 parent f52393c commit 3600603
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
1 change: 0 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
"@actions/core": "^1.10.0",
"@actions/github": "^5.1.1",
"@octokit/plugin-retry": "^7.0.3",
"@octokit/request-error": "^6.0.2",
"@octokit/rest": "^20.0.2",
"@vercel/ncc": "^0.36.1",
"azure-devops-node-api": "^12.4.0"
Expand Down
12 changes: 4 additions & 8 deletions src/secretscanning/SecretScanningService.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import * as core from '@actions/core';
import * as github from '@actions/github';
import { RequestError } from '@octokit/request-error';
import { Octokit } from '@octokit/rest';
import { OctokitResponse, GetResponseDataTypeFromEndpointMethod } from '@octokit/types';
import { GetResponseDataTypeFromEndpointMethod, OctokitResponse } from '@octokit/types';

export class SecretScanningService {
public static async getStateOfExposedSecrets(): Promise<void> {
Expand Down Expand Up @@ -37,12 +36,9 @@ export class SecretScanningService {
console.log('Number of exposed secrets:', numberOfExposedSecrets);
core.exportVariable('numberOfExposedSecrets', numberOfExposedSecrets);
} catch (error) {
if (error instanceof RequestError) {
core.warning(error.message);
console.log('Error status:', error.status);
} else {
core.warning('Failed to get number of exposed secrets');
}
core.warning('Failed to get number of exposed secrets');
console.log('Error status:', error.status);
core.warning(error.message);
core.exportVariable('numberOfExposedSecrets', 0);
}
}
Expand Down

0 comments on commit 3600603

Please sign in to comment.