|
| 1 | +name: thank-new-issue |
| 2 | +on: |
| 3 | + issues: |
| 4 | + types: [opened, labeled] |
| 5 | + |
| 6 | +permissions: |
| 7 | + # allow createComment |
| 8 | + issues: write |
| 9 | + |
| 10 | +jobs: |
| 11 | + greet: |
| 12 | + # Run only when: |
| 13 | + # 1. Issue has zero comments (to avoid duplicate replies) |
| 14 | + # 2. Action matches opened/labeled with desired labels |
| 15 | + if: > |
| 16 | + github.event.issue.comments == 0 && |
| 17 | + ( |
| 18 | + (github.event.action == 'opened' && |
| 19 | + (contains( |
| 20 | + github.event.issue.labels.*.name, |
| 21 | + 'App Update' |
| 22 | + ) || |
| 23 | + contains( |
| 24 | + github.event.issue.labels.*.name, |
| 25 | + 'New App Request' |
| 26 | + ))) || |
| 27 | + (github.event.action == 'labeled' && |
| 28 | + (github.event.label.name == 'App Update' || |
| 29 | + github.event.label.name == 'New App Request')) |
| 30 | + ) |
| 31 | + runs-on: ubuntu-latest |
| 32 | + # Needs Read+Write permissions to createComment |
| 33 | + # https://github.com/ThatGuySam/doesitarm/settings/actions |
| 34 | + steps: |
| 35 | + - uses: actions/github-script@v7 |
| 36 | + with: |
| 37 | + script: | |
| 38 | + github.rest.issues.createComment({ |
| 39 | + owner: context.repo.owner, |
| 40 | + repo: context.repo.repo, |
| 41 | + issue_number: context.issue.number, |
| 42 | + body: | |
| 43 | + **Thanks for the App Request!!** |
| 44 | +
|
| 45 | + The next step is to collect any missing info. |
| 46 | +
|
| 47 | + I'm currently working on getting to all the requests, |
| 48 | + however, if you'd like help push things along feel free |
| 49 | + to add what's missing as you find it. |
| 50 | +
|
| 51 | + You can reference what all it needs here: |
| 52 | + [App Request Template](https://github.com/ThatGuySam/doesitarm/blob/master/.github/ISSUE_TEMPLATE/app-request-template.md) |
| 53 | + }) |
0 commit comments