|
4 | 4 | pull_request_target: |
5 | 5 | types: |
6 | 6 | - labeled |
| 7 | + - opened |
| 8 | + - reopened |
| 9 | + - closed |
7 | 10 |
|
8 | 11 | jobs: |
9 | 12 | comment: |
|
13 | 16 | env: |
14 | 17 | GITHUB_CONTEXT: ${{ toJson(github) }} |
15 | 18 | run: echo "$GITHUB_CONTEXT" |
| 19 | + |
16 | 20 | - name: Dump job context |
17 | 21 | env: |
18 | 22 | JOB_CONTEXT: ${{ toJson(job) }} |
|
30 | 34 | ref: master |
31 | 35 | - name: Dependabot Commenter |
32 | 36 | if: | |
33 | | - (github.event.label.name == ':shipit: merge') && (github.event.pull_request.user.login == 'dependabot[bot]' || github.event.pull_request.user.login == 'dependabot-preview[bot]') |
34 | | - uses: peaceiris/actions-label-commenter@v1.9.1 |
| 37 | + ( |
| 38 | + ( |
| 39 | + github.event.action == 'labeled' |
| 40 | + && ( |
| 41 | + contains(github.event.label.name, ':shipit: merge') |
| 42 | + || contains(github.event.label.name, 'javascript') |
| 43 | + || contains(github.event.label.name, 'github-actions') |
| 44 | + ) |
| 45 | + ) |
| 46 | + || |
| 47 | + ( |
| 48 | + contains(github.event.action, 'opened') && |
| 49 | + ( |
| 50 | + ( |
| 51 | + contains(github.event.pull_request.labels.*.name, ':shipit: merge') |
| 52 | + || contains(github.event.pull_request.labels.*.name, 'javascript') |
| 53 | + || contains(github.event.pull_request.labels.*.name, 'github-actions') |
| 54 | + ) |
| 55 | + || startsWith(github.event.pull_request.title, 'Bump JetBrains.ReSharper.CommandLineTools') |
| 56 | + || startsWith(github.event.pull_request.title, 'Bump ReportGenerator') |
| 57 | + || startsWith(github.event.pull_request.title, 'Bump Nuke.Common') |
| 58 | + || startsWith(github.event.pull_request.title, 'Bump GitVersion.Tool') |
| 59 | + || startsWith(github.event.pull_request.title, 'Bump Bogus') |
| 60 | + || startsWith(github.event.pull_request.title, 'Bump coverlet') |
| 61 | + || startsWith(github.event.pull_request.title, 'Bump FakeItEasy') |
| 62 | + || startsWith(github.event.pull_request.title, 'Bump FluentAssertions') |
| 63 | + || startsWith(github.event.pull_request.title, 'Bump xunit') |
| 64 | + || startsWith(github.event.pull_request.title, 'Bump Microsoft.NET.Test.Sdk') |
| 65 | + ) |
| 66 | + ) |
| 67 | + ) && ( |
| 68 | + github.event.pull_request.user.login == 'dependabot[bot]' |
| 69 | + || github.event.pull_request.user.login == 'dependabot-preview[bot]' |
| 70 | + ) |
| 71 | + uses: peaceiris/actions-label-commenter@v1.10.0 |
35 | 72 | with: |
36 | 73 | github_token: ${{ secrets.RSG_BOT_TOKEN }} |
37 | 74 | config_file: .github/label-commenter-dependabot.yml |
| 75 | + |
| 76 | + - name: GitHub Automerge |
| 77 | + if: | |
| 78 | + ( |
| 79 | + github.event.label.name == ':shipit: merge' |
| 80 | + && github.event.pull_request.user.login != 'dependabot[bot]' |
| 81 | + && github.event.pull_request.user.login != 'dependabot-preview[bot]' |
| 82 | + ) |
| 83 | + uses: alexwilson/enable-github-automerge-action@1.0.0 |
| 84 | + with: |
| 85 | + github-token: "${{ secrets.GITHUB_TOKEN }}" |
| 86 | + merge-method: "SQUASH" |
| 87 | + |
| 88 | + - name: GitHub Remove Labels |
| 89 | + if: | |
| 90 | + github.event.action == 'closed' |
| 91 | + uses: actions-ecosystem/action-remove-labels@v1 |
| 92 | + with: |
| 93 | + labels: | |
| 94 | + :shipit: merge |
| 95 | + github-actions |
| 96 | + javascript |
| 97 | + .NET |
0 commit comments