Skip to content

Commit

Permalink
Fix async/await in code scanning and secret scanning alerts
Browse files Browse the repository at this point in the history
  • Loading branch information
austenstone committed Jan 31, 2024
1 parent 46c6211 commit c6533cd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export function getInputs(): Input {
result.codeScanningQueryParams = codeScanningQueryParams ? JSON.parse(codeScanningQueryParams) : codeScanningQueryParams;
const secretScanningQueryParams = getInput("secret-scanning-query-params");
result.secretScanningQueryParams = secretScanningQueryParams ? JSON.parse(secretScanningQueryParams) : secretScanningQueryParams;

return result;
}

Expand All @@ -58,7 +58,7 @@ export const run = async (): Promise<void> => {

if (input.dependabot) {
const dependabotAlerts = group('Dependabot Alerts', async () => {
const alerts = getDependabotAlerts(octokit, { ...owner, queryParams: input.dependabotQueryParams });
const alerts = await getDependabotAlerts(octokit, { ...owner, queryParams: input.dependabotQueryParams });
info(`Dependabot Alerts: ${JSON.stringify(alerts, null, 2)}`);
return alerts;
});
Expand All @@ -67,7 +67,7 @@ export const run = async (): Promise<void> => {

if (input.codeScanning) {
const codeScanningAlerts = await group('Code Scanning Alerts', async () => {
const alerts = getCodeScanningAlerts(octokit, { ...owner, queryParams: input.codeScanningQueryParams });
const alerts = await getCodeScanningAlerts(octokit, { ...owner, queryParams: input.codeScanningQueryParams });
info(`Code Scanning Alerts: ${JSON.stringify(alerts, null, 2)}`);
return alerts;
});
Expand All @@ -76,7 +76,7 @@ export const run = async (): Promise<void> => {

if (input.secretScanning) {
const secretScanningAlerts = await group('Secret Scanning Alerts', async () => {
const alerts = getSecretScanningAlerts(octokit, { ...owner, queryParams: input.secretScanningQueryParams });
const alerts = await getSecretScanningAlerts(octokit, { ...owner, queryParams: input.secretScanningQueryParams });
info(`Secret Scanning Alerts: ${JSON.stringify(alerts, null, 2)}`);
return alerts;
});
Expand Down

0 comments on commit c6533cd

Please sign in to comment.