Introduce Austen Test #5
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: Welcome new intro issues | |
| # Runs every time someone opens an issue. Posts a friendly comment. | |
| # This is the "automation just replied to me" moment in the tutorial. | |
| on: | |
| issues: | |
| types: [opened] | |
| jobs: | |
| welcome: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| issues: write | |
| steps: | |
| - uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const user = context.payload.issue.user.login; | |
| await github.rest.issues.createComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: context.issue.number, | |
| body: [ | |
| `Welcome aboard, @${user}!`, | |
| ``, | |
| `A GitHub Action posted this comment automatically the moment you`, | |
| `opened your issue. Work through your checklist above. See you on the other side of a merge`, | |
| `conflict.` | |
| ].join('\n') | |
| }); |