Skip to content

Commit 4c08183

Browse files
Refactor error handling in getPullRequests to simplify catch block
1 parent 17d2309 commit 4c08183

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dist/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ function getPullRequests(client, prNumbers) {
140140
}));
141141
prData = result.data;
142142
}
143-
catch (error) {
143+
catch (_a) {
144144
core.warning(`Could not find pull request #${prNumber}, skipping`);
145145
continue;
146146
}

src/api/get-changed-pull-requests.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export async function* getPullRequests(
1717
pull_number: prNumber
1818
});
1919
prData = result.data;
20-
} catch (error: any) {
20+
} catch {
2121
core.warning(`Could not find pull request #${prNumber}, skipping`);
2222
continue;
2323
}

0 commit comments

Comments
 (0)