From 7573b3845c24a73385c3791aff64f972a893296b Mon Sep 17 00:00:00 2001 From: chiranjib-swain Date: Wed, 24 Sep 2025 14:56:16 +0530 Subject: [PATCH] Refactor error handling in getPullRequests to simplify catch block --- dist/index.js | 2 +- src/api/get-changed-pull-requests.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index 35bb1084..8bb8e918 100644 --- a/dist/index.js +++ b/dist/index.js @@ -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; } diff --git a/src/api/get-changed-pull-requests.ts b/src/api/get-changed-pull-requests.ts index f8383891..effa9540 100644 --- a/src/api/get-changed-pull-requests.ts +++ b/src/api/get-changed-pull-requests.ts @@ -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; }