From 4c08183adfcc0c1706755243ee906b8c20c50619 Mon Sep 17 00:00:00 2001 From: chiranjib-swain Date: Fri, 8 Aug 2025 15:01:21 +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 f720b3c7..d2046792 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; }