Skip to content

Commit 0915bed

Browse files
committed
Add autosquash workflow
1 parent 17f4dd2 commit 0915bed

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/autosquash.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Autosquash
2+
on:
3+
check_run:
4+
types:
5+
# Check runs completing successfully can unblock the
6+
# corresponding pull requests and make them mergeable.
7+
- completed
8+
pull_request:
9+
types:
10+
# A closed pull request makes the checks on the other
11+
# pull request on the same base outdated.
12+
- closed
13+
# Adding the autosquash label to a pull request can
14+
# trigger an update or a merge.
15+
- labeled
16+
pull_request_review:
17+
types:
18+
# Review approvals can unblock the pull request and
19+
# make it mergeable.
20+
- submitted
21+
# Success statuses can unblock the corresponding
22+
# pull requests and make them mergeable.
23+
status: {}
24+
25+
jobs:
26+
autosquash:
27+
name: Autosquash
28+
runs-on: ubuntu-18.04
29+
steps:
30+
- uses: tibdex/autosquash@v2
31+
with:
32+
# We can't use the built-in secrets.GITHUB_TOKEN yet because of this limitation:
33+
# https://github.community/t5/GitHub-Actions/Triggering-a-new-workflow-from-another-workflow/td-p/31676
34+
# In the meantime, use a token granting write access on the repo:
35+
# - a GitHub App token
36+
# See https://github.com/marketplace/actions/github-app-token.
37+
# - a personal access token
38+
# See https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line.
39+
github_token: ${{ secrets.AUTOSQUASH_TOKEN }}

0 commit comments

Comments
 (0)