@@ -134,100 +134,6 @@ jobs:
134
134
- name : " Run friendsofphp/php-cs-fixer"
135
135
run : " tools/php-cs-fixer fix --config=.php_cs --diff --diff-format=udiff --dry-run --verbose"
136
136
137
- merge :
138
- name : " Merge"
139
-
140
- runs-on : " ubuntu-latest"
141
-
142
- needs :
143
- - " backward-compatibility"
144
- - " code-coverage"
145
- - " coding-standards"
146
- - " static-code-analysis"
147
- - " tests"
148
-
149
- if : >
150
- github.event_name == 'pull_request' &&
151
- github.event.pull_request.draft == false && (
152
- github.event.action == 'opened' ||
153
- github.event.action == 'reopened' ||
154
- github.event.action == 'synchronize'
155
- ) && (
156
- (github.actor == 'dependabot[bot]' && startsWith(github.event.pull_request.title, 'composer(deps-dev)')) ||
157
- (github.actor == 'dependabot[bot]' && startsWith(github.event.pull_request.title, 'github-actions(deps)')) ||
158
- (github.actor == 'localheinz' && contains(github.event.pull_request.labels.*.name, 'merge'))
159
- )
160
-
161
- steps :
162
- - name : " Request review from @ergebnis-bot"
163
- uses : " actions/github-script@v2"
164
- with :
165
- github-token : " ${{ secrets.ERGEBNIS_BOT_TOKEN }}"
166
- script : |
167
- const pullRequest = context.payload.pull_request
168
- const repository = context.repo
169
-
170
- const reviewers = [
171
- "ergebnis-bot",
172
- ]
173
-
174
- await github.pulls.createReviewRequest({
175
- owner: repository.owner,
176
- pull_number: pullRequest.number,
177
- repo: repository.repo,
178
- reviewers: reviewers,
179
- })
180
-
181
- - name : " Assign @ergebnis-bot"
182
- uses : " actions/github-script@v2"
183
- with :
184
- github-token : " ${{ secrets.ERGEBNIS_BOT_TOKEN }}"
185
- script : |
186
- const pullRequest = context.payload.pull_request
187
- const repository = context.repo
188
-
189
- const reviewers = [
190
- "ergebnis-bot",
191
- ]
192
-
193
- await github.issues.addAssignees({
194
- assignees: reviewers,
195
- issue_number: pullRequest.number,
196
- owner: repository.owner,
197
- repo: repository.repo,
198
- })
199
-
200
- - name : " Approve pull request"
201
- uses : " actions/github-script@v2"
202
- if : " github.actor != 'ergebnis-bot'"
203
- with :
204
- github-token : " ${{ secrets.ERGEBNIS_BOT_TOKEN }}"
205
- script : |
206
- const pullRequest = context.payload.pull_request
207
- const repository = context.repo
208
-
209
- await github.pulls.createReview({
210
- event: "APPROVE",
211
- owner: repository.owner,
212
- pull_number: pullRequest.number,
213
- repo: repository.repo,
214
- })
215
-
216
- - name : " Merge pull request"
217
- uses : " actions/github-script@v2"
218
- with :
219
- github-token : " ${{ secrets.ERGEBNIS_BOT_TOKEN }}"
220
- script : |
221
- const pullRequest = context.payload.pull_request
222
- const repository = context.repo
223
-
224
- await github.pulls.merge({
225
- merge_method: "merge",
226
- owner: repository.owner,
227
- pull_number: pullRequest.number,
228
- repo: repository.repo,
229
- })
230
-
231
137
static-code-analysis :
232
138
name : " Static Code Analysis"
233
139
0 commit comments