mirror of
https://github.com/actions/labeler.git
synced 2025-12-10 11:41:56 +00:00
Refactor error handling in getPullRequests to simplify catch block
This commit is contained in:
2
dist/index.js
vendored
2
dist/index.js
vendored
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user