From c6ed37ab4791d676c549295eef40689e63e32b9c Mon Sep 17 00:00:00 2001 From: Koen Kanters Date: Fri, 14 Aug 2020 11:27:18 +0200 Subject: [PATCH 1/2] Switch to autosquash --- .github/workflows/autosquash.yml | 40 ++++++++++++++++++++++++++++++++ .github/workflows/rebase.yml | 18 -------------- 2 files changed, 40 insertions(+), 18 deletions(-) create mode 100644 .github/workflows/autosquash.yml delete mode 100644 .github/workflows/rebase.yml diff --git a/.github/workflows/autosquash.yml b/.github/workflows/autosquash.yml new file mode 100644 index 000000000..ee0be2961 --- /dev/null +++ b/.github/workflows/autosquash.yml @@ -0,0 +1,40 @@ + +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: + # We can't use the built-in secrets.GITHUB_TOKEN yet 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 }} \ No newline at end of file diff --git a/.github/workflows/rebase.yml b/.github/workflows/rebase.yml deleted file mode 100644 index a86ab6686..000000000 --- a/.github/workflows/rebase.yml +++ /dev/null @@ -1,18 +0,0 @@ -on: - issue_comment: - types: [created] -name: Automatic Rebase -jobs: - rebase: - name: Rebase - if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase') - runs-on: ubuntu-latest - steps: - - name: Checkout the latest code - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Automatic Rebase - uses: cirrus-actions/rebase@1.3.1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From 1213fd6ea6f7fb2126a8e0d19db86b4a6ef41883 Mon Sep 17 00:00:00 2001 From: Koen Kanters Date: Fri, 14 Aug 2020 11:43:35 +0200 Subject: [PATCH 2/2] Remove autosquash and add branch-cleanup --- .github/workflows/autosquash.yml | 40 ---------------------------- .github/workflows/branch-cleanup.yml | 11 ++++++++ 2 files changed, 11 insertions(+), 40 deletions(-) delete mode 100644 .github/workflows/autosquash.yml create mode 100644 .github/workflows/branch-cleanup.yml diff --git a/.github/workflows/autosquash.yml b/.github/workflows/autosquash.yml deleted file mode 100644 index ee0be2961..000000000 --- a/.github/workflows/autosquash.yml +++ /dev/null @@ -1,40 +0,0 @@ - -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: - # We can't use the built-in secrets.GITHUB_TOKEN yet 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 }} \ No newline at end of file diff --git a/.github/workflows/branch-cleanup.yml b/.github/workflows/branch-cleanup.yml new file mode 100644 index 000000000..0238630dc --- /dev/null +++ b/.github/workflows/branch-cleanup.yml @@ -0,0 +1,11 @@ +name: branch-cleanup +on: + pull_request: + branches: + - dev +jobs: + cleanup-branch: + name: on pull request merge, delete the branch + runs-on: ubuntu-latest + steps: + - uses: jessfraz/branch-cleanup-action@master \ No newline at end of file