You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
body: 'Your comment was flagged as too short and will be automatically deleted. Please elaborate further on your thoughts, I want to hear what you have to say!'
44
41
});
45
42
46
-
// Delete the short comment if it's a reply comment
47
-
if (commentId) {
48
-
await github.rest.issues.deleteComment({
49
-
owner: context.repo.owner,
50
-
repo: context.repo.repo,
51
-
comment_id: commentId
52
-
});
53
-
} else {
54
-
// If it's the issue body, close the issue
55
-
await github.rest.issues.update({
56
-
owner: context.repo.owner,
57
-
repo: context.repo.repo,
58
-
issue_number: context.issue.number,
59
-
state: 'closed',
60
-
state_reason: 'not_planned'
61
-
});
62
-
}
43
+
// Delete the short comment
44
+
await github.rest.issues.deleteComment({
45
+
owner: context.repo.owner,
46
+
repo: context.repo.repo,
47
+
comment_id: comment.id
48
+
});
63
49
64
-
console.log(`Deleted comment - too short (${charCount} characters)`);
50
+
console.log(`Deleted comment #${comment.id} - too short (${charCount} characters)`);
0 commit comments