From 96d854d75d6bcc7cb4d01eb9f4d8e626f86be9e6 Mon Sep 17 00:00:00 2001 From: "Andrea N. Cardona" Date: Fri, 20 Oct 2023 12:05:37 -0500 Subject: [PATCH] Update contribution-ready-to-be-worked.yml --- .../workflows/contribution-ready-to-be-worked.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/contribution-ready-to-be-worked.yml b/.github/workflows/contribution-ready-to-be-worked.yml index 9cf888cd2ebb..9a4b9327a1af 100644 --- a/.github/workflows/contribution-ready-to-be-worked.yml +++ b/.github/workflows/contribution-ready-to-be-worked.yml @@ -32,7 +32,18 @@ jobs: repo: context.repo.repo, }); - console.log('context', context.payload.label.name) + const commentText = "This issue is ready to be worked on. Volunteers, please feel free to join any of the [relevant meetups](https://carbondesignsystem.com/whats-happening/meetups/) to get guidance and feedback. We encourage you to bring any work in progress, no matter its state of completion. You can also ask any questions on Slack. For design questions, the best channels are: [#carbon-design-system](https://ibm-studios.slack.com/archives/C0M053VPT) and [#figma-guild](https://ibm-studios.slack.com/archives/C023WKW6J5U). For developer questions, the best channels are: [#carbon-react](https://ibm-studios.slack.com/archives/C2K6RFJ1G), [#carbon-web-components](https://ibm-studios.slack.com/archives/CL83LMKSA)." + + if ((context.payload.label.name === 'needs: code contribution') || (context.payload.label.name === 'needs: design contribution') && !commentsArray.includes(commentText)) { + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: commentText + }); + } else { + console.log('No comment added because the conditions are not met.'); + } - name: Set Output if: steps.conditional-comment.outcome == 'success'