forked from aio-libs/aiohttp
39 lines (38 loc) · 1.17 KB
/
autosquash.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
name: Autosquash
on:
check_run:
types:
# Check runs completing successfully can unblock the
# corresponding pull requests and make them mergeable.
- completed
pull_request:
types:
# A closed pull request makes the checks on the other
# pull request on the same base outdated.
- closed
# Adding the autosquash label to a pull request can
# trigger an update or a merge.
- labeled
pull_request_review:
types:
# Review approvals can unblock the pull request and
# make it mergeable.
- submitted
# Success statuses can unblock the corresponding
# pull requests and make them mergeable.
status: {}
jobs:
autosquash:
name: Autosquash
runs-on: ubuntu-latest
# not awailable for forks, skip the workflow
if: ${{ github.event.pull_request.head.repo.full_name == 'aio-libs/aiohttp' }}
steps:
- id: generate_token
uses: tibdex/github-app-token@v1
with:
app_id: ${{ secrets.BOT_APP_ID }}
private_key: ${{ secrets.BOT_PRIVATE_KEY }}
- uses: tibdex/autosquash@v2
with:
github_token: ${{ steps.generate_token.outputs.token }}