docs: add GCP Deployment guide in documentation #1093
This file contains hidden or 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: Add Help Wanted or Good First Issue Labels | |
| on: | |
| issue_comment: | |
| types: [created] | |
| permissions: | |
| issues: write | |
| jobs: | |
| label-on-comment: | |
| if: github.event.comment.body == '/help-wanted' || github.event.comment.body == '/good-first-issue' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Add label based on comment | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const comment = context.payload.comment.body.trim().toLowerCase(); | |
| const issue_number = context.payload.issue.number; | |
| const owner = context.repo.owner; | |
| const repo = context.repo.repo; | |
| let label = null; | |
| if (comment === '/help-wanted') { | |
| label = 'help wanted'; | |
| } else if (comment === '/good-first-issue') { | |
| label = 'good first issue'; | |
| } | |
| if (label) { | |
| await github.rest.issues.addLabels({ | |
| owner, | |
| repo, | |
| issue_number, | |
| labels: [label], | |
| }); | |
| console.log(`Added label: ${label}`); | |
| } else { | |
| console.log('No matching label to apply.'); | |
| } |