mirror of
https://github.com/actions/labeler.git
synced 2025-12-12 20:51:42 +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;
|
prData = result.data;
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (_a) {
|
||||||
core.warning(`Could not find pull request #${prNumber}, skipping`);
|
core.warning(`Could not find pull request #${prNumber}, skipping`);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ export async function* getPullRequests(
|
|||||||
pull_number: prNumber
|
pull_number: prNumber
|
||||||
});
|
});
|
||||||
prData = result.data;
|
prData = result.data;
|
||||||
} catch (error: any) {
|
} catch {
|
||||||
core.warning(`Could not find pull request #${prNumber}, skipping`);
|
core.warning(`Could not find pull request #${prNumber}, skipping`);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user