Skip to content

Commit

Permalink
Update close_issues.yml (nomic-ai#629)
Browse files Browse the repository at this point in the history
Signed-off-by: Richard Guo <[email protected]>
  • Loading branch information
rguo123 authored May 18, 2023
1 parent d1e65e8 commit 546600f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/close_issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ jobs:
for (let { number } of issues.data) {
const issueData = await github.issues.get({...repo, issue_number: number});
const comments = await github.issues.listComments({...repo, issue_number: number});
if (issueData.data.labels.length === 0 && comments.data.length < 1) {
if (issueData.data.labels.length === 0 && comments.data.length <= 1) {
await github.issues.update({...repo, issue_number: number, state: 'closed'});
await github.issues.createComment({...repo, issue_number: number, body: 'Issue closed as it does not have any labels or comments.'});
}
}
}

0 comments on commit 546600f

Please sign in to comment.