|
@@ -0,0 +1,34 @@
|
|
|
|
|
+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-18.04
|
|
|
|
|
+ steps:
|
|
|
|
|
+ - uses: tibdex/autosquash@v2
|
|
|
|
|
+ with:
|
|
|
|
|
+ # The built-in secrets.GITHUB_TOKEN cannot yet be used because of this limitation:
|
|
|
|
|
+ # https://github.community/t5/GitHub-Actions/Triggering-a-new-workflow-from-another-workflow/td-p/31676
|
|
|
|
|
+ # In the meantime, use a token granting write access on the repo:
|
|
|
|
|
+ # - a GitHub App token
|
|
|
|
|
+ # See https://github.com/marketplace/actions/github-app-token.
|
|
|
|
|
+ # - a personal access token
|
|
|
|
|
+ # See https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line.
|
|
|
|
|
+ github_token: ${{ secrets.AUTOSQUASH_TOKEN }}
|