Refactor error handling in getPullRequests to simplify catch block

This commit is contained in:
chiranjib-swain
2025-09-24 14:56:16 +05:30
parent 7e1b2670a6
commit 7573b3845c
2 changed files with 2 additions and 2 deletions

2
dist/index.js vendored
View File

@@ -140,7 +140,7 @@ function getPullRequests(client, prNumbers) {
}));
prData = result.data;
}
catch (error) {
catch (_a) {
core.warning(`Could not find pull request #${prNumber}, skipping`);
continue;
}

View File

@@ -17,7 +17,7 @@ export async function* getPullRequests(
pull_number: prNumber
});
prData = result.data;
} catch (error: any) {
} catch {
core.warning(`Could not find pull request #${prNumber}, skipping`);
continue;
}