autosquash.yml 1.4 KB

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