Skip to content

Commit 7b9fb60

Browse files
authored
workflow to review probot PRs (#149)
1 parent 822397e commit 7b9fb60

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Review Probot PRs
2+
on:
3+
pull_request:
4+
types: [opened, reopened]
5+
jobs:
6+
bot:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Post review
10+
if: startsWith(github.event.pull_request.title, 'Bump probot') || startsWith(github.event.pull_request.title, 'Bump @probot')
11+
uses: actions/[email protected]
12+
with:
13+
script: |
14+
const pull_number = context.payload.pull_request.number;
15+
const owner = context.repo.owner;
16+
const repo = context.repo.repo;
17+
18+
await github.request(`POST /repos/${owner}/${repo}/pulls/${pull_number}/reviews`, {
19+
owner: owner,
20+
repo: repo,
21+
pull_number: pull_number,
22+
body: '👋🏻🤖 The latest probot uses a newer octokit, which is not compatible with nock.\n\n' +
23+
'The latest version of octokit uses [undici http client](https://github.com/nodejs/undici). Nock does not support undici. More details [here](https://github.com/nock/nock/issues/2183).',
24+
event: 'REQUEST_CHANGES'
25+
});

0 commit comments

Comments
 (0)