mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2024-12-31 18:24:27 -06:00
Add try-catch & Error Logging in Github Actions Auto Close Issues
This commit is contained in:
parent
9d1fae7917
commit
9978758327
4
.github/workflows/close-old-issues.yaml
vendored
4
.github/workflows/close-old-issues.yaml
vendored
@ -41,6 +41,7 @@ jobs:
|
|||||||
const closeIssue = true;
|
const closeIssue = true;
|
||||||
|
|
||||||
// Get all Labels of issue, and compared each label with the labelKeepIssue const variable
|
// Get all Labels of issue, and compared each label with the labelKeepIssue const variable
|
||||||
|
try {
|
||||||
const respondIssueLabels = await octokit.request("GET /repos/{owner}/{repo}/issues/{issue_number}/labels", {
|
const respondIssueLabels = await octokit.request("GET /repos/{owner}/{repo}/issues/{issue_number}/labels", {
|
||||||
owner: owner,
|
owner: owner,
|
||||||
repo: repo,
|
repo: repo,
|
||||||
@ -55,6 +56,9 @@ jobs:
|
|||||||
closeIssue = false;
|
closeIssue = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error(`Error while Fetching Labels for Issue #${issue.number}, Error: ${error}`);
|
||||||
|
}
|
||||||
|
|
||||||
if (!closeIssue) {
|
if (!closeIssue) {
|
||||||
continue; // Skip the next bit of code
|
continue; // Skip the next bit of code
|
||||||
|
Loading…
Reference in New Issue
Block a user