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