|
8 | 8 | comment: |
9 | 9 | runs-on: ubuntu-latest |
10 | 10 | steps: |
11 | | - - uses: actions/github-script@0.8.0 |
12 | | - with: |
13 | | - github-token: ${{secrets.GITHUB_TOKEN}} |
14 | | - script: | |
15 | | - github.issues.createComment({ |
16 | | - issue_number: context.issue.number, |
17 | | - owner: context.repo.owner, |
18 | | - repo: context.repo.repo, |
19 | | - body: "🎉 You've created this issue comment using GitHub Script!!!" |
20 | | - }) |
| 11 | + - name: Checkout repo |
| 12 | + uses: actions/checkout@v2 |
| 13 | + |
| 14 | + - name: Comment on new issue |
| 15 | + uses: actions/github-script@0.8.0 |
| 16 | + with: |
| 17 | + github-token: ${{secrets.GITHUB_TOKEN}} |
| 18 | + script: | |
| 19 | + const fs = require('fs') |
| 20 | + const issueBody = fs.readFileSync(".github/ISSUE_RESPONSES/comment.md", "utf8") |
| 21 | + github.issues.createComment({ |
| 22 | + issue_number: context.issue.number, |
| 23 | + owner: context.repo.owner, |
| 24 | + repo: context.repo.repo, |
| 25 | + body: issueBody |
| 26 | + }) |
| 27 | +
|
| 28 | + - name: Add issue to project board |
| 29 | + if: contains(github.event.issue.labels.*.name, 'bug') |
| 30 | + uses: actions/github-script@0.8.0 |
| 31 | + with: |
| 32 | + github-token: ${{secrets.GITHUB_TOKEN}} |
| 33 | + script: | |
21 | 34 | github.projects.createCard({ |
22 | 35 | column_id: 12270352, |
23 | 36 | content_id: context.payload.issue.id, |
|
0 commit comments