Skip to content

Commit 9d84785

Browse files
jehervecoder-karen
authored andcommitted
Repo gardening: don't send slack notifs for closed issues (#41165)
1 parent c05e477 commit 9d84785

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Significance: patch
2+
Type: changed
3+
Comment: Issue Triage: do not send Slack notifications for closed issues
4+
5+

projects/github-actions/repo-gardening/src/tasks/gather-support-references/index.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ async function createOrUpdateComment( payload, octokit, issueReferences, issueCo
414414
*/
415415
async function addHappinessLabel( payload, octokit ) {
416416
const {
417-
issue: { number },
417+
issue: { number, state },
418418
repository: {
419419
name: repo,
420420
owner: { login: ownerLogin },
@@ -441,9 +441,10 @@ async function addHappinessLabel( payload, octokit ) {
441441

442442
// Send Slack notification, if we have the necessary tokens.
443443
// No Slack tokens, we won't be able to escalate. Bail.
444+
// If the issue is already closed, do not send any Slack reminder.
444445
const slackToken = getInput( 'slack_token' );
445446
const channel = getInput( 'slack_quality_channel' );
446-
if ( ! slackToken || ! channel ) {
447+
if ( ! slackToken || ! channel || state === 'closed' ) {
447448
return false;
448449
}
449450

0 commit comments

Comments
 (0)