[Bug]: CodeSnippet suggests align value that isn't available yet #1212
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Contribution triage - ready to be worked | |
on: | |
issues: | |
types: [unlabeled] | |
permissions: | |
issues: write | |
jobs: | |
add-comment: | |
name: Add comment to issues with proposal accepted and community contribution | |
runs-on: ubuntu-latest | |
steps: | |
- name: Log github event | |
env: | |
$GITHUB_CONTEXT_LABELS: ${{ toJson(github.event.label) }} | |
run: echo "$GITHUB_CONTEXT_LABELS" | |
- name: Conditional Check and Add Comment | |
id: conditional-comment | |
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 | |
with: | |
script: | | |
comments = await github.rest.issues.listComments({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
}); | |
const commentsArray = comments.data.map(comment => comment.body) | |
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' | |
run: echo "Comment added successfully." |