Skip to content

Commit

Permalink
Merge pull request #76 from jmklix/patch-1
Browse files Browse the repository at this point in the history
disable reopening of closed discussions
  • Loading branch information
kellertk authored May 10, 2024
2 parents 4169f70 + 0a1041c commit a68b59e
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,6 @@ export async function processDiscussions(githubClient: GithubDiscussionClient) {
core.warning(`Current discussion ID is NULL. Cannot proceed!!`);
continue;
}
else if (discussion?.node?.closed) {
core.info(`Reopening closed discussion: ${discussionId}`);
reopenClosedDiscussion(discussionId, githubClient);
}
else if (discussion?.node?.locked && CLOSE_LOCKED_DISCUSSIONS) {
core.info(`Discussion ${discussionId} is locked, keeping it open to make it searchable`);
//githubClient.closeDiscussionAsResolved(discussionId);
Expand Down Expand Up @@ -173,9 +169,4 @@ function markDiscussionCommentAsAnswer(comment: DiscussionCommentEdge, discussio
githubClient.markDiscussionCommentAsAnswer(commentId);
}

function reopenClosedDiscussion(discussionId: string, githubClient: GithubDiscussionClient) {
githubClient.addCommentToDiscussion(discussionId, OPEN_DISCUSSION_INSTRUCTION_TEXT);
githubClient.reopenDiscussion(discussionId);
}

main();

0 comments on commit a68b59e

Please sign in to comment.