|
1 | 1 | name: "Automatically mark PRs to sync" |
2 | 2 |
|
3 | 3 | on: |
4 | | - pull_request: |
5 | | - types: |
6 | | - - opened |
| 4 | + pull_request: |
| 5 | + types: |
| 6 | + - opened |
7 | 7 |
|
8 | 8 | jobs: |
9 | | - labeler: |
10 | | - if: github.event.pull_request.user.type != 'Bot' |
11 | | - permissions: |
12 | | - pull-requests: write |
| 9 | + labeler: |
| 10 | + if: github.event.pull_request.user.type != 'Bot' |
| 11 | + permissions: |
| 12 | + pull-requests: write |
13 | 13 |
|
14 | | - runs-on: ubuntu-latest |
15 | | - steps: |
16 | | - - name: Add "sync" label to PR |
17 | | - run: gh pr edit "$PR_URL" --add-label sync --repo "$PR_REPO" |
18 | | - env: |
19 | | - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
20 | | - PR_URL: ${{ github.event.pull_request.html_url }} |
21 | | - PR_REPO: ${{ github.repository }} |
| 14 | + runs-on: ubuntu-latest |
| 15 | + steps: |
| 16 | + - name: Add "sync" label to PR |
| 17 | + run: gh pr edit "$PR_URL" --add-label sync --repo "$PR_REPO" |
| 18 | + env: |
| 19 | + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 20 | + PR_URL: ${{ github.event.pull_request.html_url }} |
| 21 | + PR_REPO: ${{ github.repository }} |
22 | 22 |
|
23 | | - - name: Comment on PR to explain sync label |
24 | | - run: gh pr comment "$PR_URL" --body "This pull request has been marked to **automatically sync** to its base branch. You can **disable** this behavior by removing the `sync` label." --repo "$PR_REPO" |
25 | | - env: |
26 | | - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
27 | | - PR_URL: ${{ github.event.pull_request.html_url }} |
28 | | - PR_REPO: ${{ github.repository }} |
| 23 | + - name: Comment on PR to explain sync label |
| 24 | + run: gh pr comment "$PR_URL" --body "This pull request has been marked to **automatically |
| 25 | + sync** to its base branch. You can **disable** this behavior by removing the `sync` |
| 26 | + label." --repo "$PR_REPO" |
| 27 | + env: |
| 28 | + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 29 | + PR_URL: ${{ github.event.pull_request.html_url }} |
| 30 | + PR_REPO: ${{ github.repository }} |
0 commit comments