From 4b08e014306beea151e1b02edfa0a43e5fbf1580 Mon Sep 17 00:00:00 2001 From: "Mr.k" Date: Sat, 6 Apr 2024 20:18:35 +0300 Subject: [PATCH] Add a Break Statement To Skip Checking The Remaining Labels of an Issue in Github Actions Auto Close Issues --- .github/workflows/close-old-issues.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/close-old-issues.yaml b/.github/workflows/close-old-issues.yaml index a2ea3a62..3050c4b1 100644 --- a/.github/workflows/close-old-issues.yaml +++ b/.github/workflows/close-old-issues.yaml @@ -54,6 +54,7 @@ jobs: if (label.name === labelKeepIssue) { console.log(`Issue #${issue.number} will not be closed`); closeIssue = false; + break; // Break from the loop, no need to check the remaining Labels. } } } catch (error) {