Contribution triage - ready to be worked #123
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@d7906e4ad0b1822421a7e6a35d5ca353c962f410 #v6.4.1 | |
with: | |
script: | | |
response = await github.rest.issues.listLabelsOnIssue({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
}); | |
comments = await github.rest.issues.listComments({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
}); | |
console.log('response', response) | |
const labelArray = response.data.map((label) => console.log('label', label)) | |
console.log('label array', labelArray) | |
- name: Set Output | |
if: steps.conditional-comment.outcome == 'success' | |
run: echo "Comment added successfully." |