|
9 | 9 | runs-on: ubuntu-latest
|
10 | 10 |
|
11 | 11 | steps:
|
12 |
| - - name: Check if comment contains specific text |
13 |
| - if: contains(github.event.comment.body, 'I do not have a login for this website so contributions are welcome. :)') |
14 |
| - run: | |
15 |
| - echo "Comment contains the specified text." |
| 12 | + - name: Check if comment contains specific text |
| 13 | + if: contains(github.event.comment.body, 'I do not have a login for this website so contributions are welcome. :)') |
| 14 | + run: | |
| 15 | + echo "Comment contains the specified text." |
16 | 16 |
|
17 |
| - # Add labels to the issue |
18 |
| - curl -s -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ |
19 |
| - -H "Accept: application/vnd.github.v3+json" \ |
20 |
| - https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/labels \ |
21 |
| - -d '{"labels":["help wanted", "no account"]}' |
| 17 | + # Add labels to the issue |
| 18 | + curl -s -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ |
| 19 | + -H "Accept: application/vnd.github.v3+json" \ |
| 20 | + https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/labels \ |
| 21 | + -d '{"labels":["help wanted", "no account"]}' |
22 | 22 |
|
23 |
| - # Unassign the current user from the issue |
24 |
| - curl -s -X DELETE -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ |
25 |
| - -H "Accept: application/vnd.github.v3+json" \ |
26 |
| - https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/assignees \ |
27 |
| - -d '{"assignees":["${{ github.actor }}"]}' |
| 23 | + # Unassign the current user from the issue |
| 24 | + curl -s -X DELETE -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ |
| 25 | + -H "Accept: application/vnd.github.v3+json" \ |
| 26 | + https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/assignees \ |
| 27 | + -d '{"assignees":["${{ github.actor }}"]}' |
28 | 28 |
|
29 |
| - # Assign the issue creator to the issue |
30 |
| - curl -s -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ |
31 |
| - -H "Accept: application/vnd.github.v3+json" \ |
32 |
| - https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/assignees \ |
33 |
| - -d '{"assignees":["${{ github.event.issue.user.login }}"]}' |
| 29 | + # Assign the issue creator to the issue |
| 30 | + curl -s -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ |
| 31 | + -H "Accept: application/vnd.github.v3+json" \ |
| 32 | + https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/assignees \ |
| 33 | + -d '{"assignees":["${{ github.event.issue.user.login }}"]}' |
34 | 34 |
|
35 |
| - - name: Add issue to "Need help" status and "No login" priority in project |
36 |
| - env: |
37 |
| - PROJECT_ID: "USER_PROJECT_ID" # Replace with your project's ID |
38 |
| - TOKEN: ${{ secrets.GITHUB_TOKEN }} |
39 |
| - run: | |
40 |
| - # Add issue to project |
41 |
| - curl -X POST -H "Authorization: Bearer $TOKEN" \ |
42 |
| - -H "Accept: application/vnd.github.v3+json" \ |
43 |
| - https://api.github.com/projects/${PROJECT_ID}/columns/COLUMN_ID/cards \ |
44 |
| - -d '{"content_id": "${{ github.event.issue.id }}", "content_type": "Issue"}' |
| 35 | + - name: Add issue to "Need help" status and "No login" priority in project |
| 36 | + env: |
| 37 | + PROJECT_ID: "USER_PROJECT_ID" # Replace with your project's ID |
| 38 | + TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 39 | + run: | |
| 40 | + # Add issue to project |
| 41 | + curl -X POST -H "Authorization: Bearer $TOKEN" \ |
| 42 | + -H "Accept: application/vnd.github.v3+json" \ |
| 43 | + https://api.github.com/projects/${PROJECT_ID}/columns/COLUMN_ID/cards \ |
| 44 | + -d '{"content_id": "${{ github.event.issue.id }}", "content_type": "Issue"}' |
0 commit comments