diff --git a/badges/coverage.svg b/badges/coverage.svg
index af57a94..ff3ef5c 100644
--- a/badges/coverage.svg
+++ b/badges/coverage.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/dist/index.js b/dist/index.js
index 854cb5d..7616656 100644
--- a/dist/index.js
+++ b/dist/index.js
@@ -33249,6 +33249,9 @@ async function run() {
Authorization: `token ${GITHUB_TOKEN}`
}
});
+ if (response.data.length === 0) {
+ core.setFailed('There are no reviews for this pull request yet. Or the url is incorrect.');
+ }
const approvedReviews = response.data.filter((review) => review.state === 'APPROVED');
const teamApprovalStatus = await Promise.all(conditions.map(async (c) => {
const res = await axios_1.default.get(`https://api.github.com/orgs/${owner}/teams/${c.team}/members`, {
diff --git a/src/main.ts b/src/main.ts
index 37d5ecf..ca567e5 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -41,6 +41,12 @@ export async function run(): Promise {
}
)
+ if (response.data.length === 0) {
+ core.setFailed(
+ 'There are no reviews for this pull request yet. Or the url is incorrect.'
+ )
+ }
+
const approvedReviews = response.data.filter(
(review: Review) => review.state === 'APPROVED'
)