From 7836dfe7450216922d601557d608e5c358b2bf00 Mon Sep 17 00:00:00 2001 From: Javier Bullrich Date: Wed, 6 Mar 2024 16:02:15 +0100 Subject: [PATCH 1/3] updated auto-merge-bot to 1.0.1 This upgrade contains the change in paritytech/auto-merge-bot#25 which fixes the problem with unstable branches. ## The problem When the `/merge` command is triggered on a PR that still can't be merge, the bot enables auto-merge. **But**, when the command is run when the PR is ready to merge, the action will fail to enable auto-merge (this is expected). We evaluate the error message, and if it says that the PR is clean, it simply merges the PR. But, we did not handle `unstable` PRs. An unstable PR is a PR that _can be merged, but a **non required status check is failing**._ So, if a user invoked the `/merge` command on a PR that was ready to merge, but a not-required status check was failing, it would crash. This upgrade fixes this problem. --- .github/workflows/auto-merge.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/auto-merge.yml b/.github/workflows/auto-merge.yml index 32cb12fb49..9329c6a210 100644 --- a/.github/workflows/auto-merge.yml +++ b/.github/workflows/auto-merge.yml @@ -22,7 +22,7 @@ jobs: app_id: ${{ secrets.MERGE_APP_ID }} private_key: ${{ secrets.MERGE_APP_KEY }} - name: Set auto merge - uses: paritytech/auto-merge-bot@v1.0.0 + uses: paritytech/auto-merge-bot@v1.0.1 with: GITHUB_TOKEN: ${{ steps.merge_token.outputs.token }} MERGE_METHOD: "SQUASH" From 9e8f05a0720459de127517d773aaea542c80b7ce Mon Sep 17 00:00:00 2001 From: Javier Bullrich Date: Mon, 18 Mar 2024 15:43:16 +0100 Subject: [PATCH 2/3] updated get-fellows-action to version 1.1.0 This new version contains: - paritytech/get-fellow-action#15 - Fixed a bug where candidates (`rank 0`) counted as fellows. - Now we filter anyone whose rank is below 1. - paritytech/get-fellow-action#16 - Fixes a problem where a fellow using a superidentity wouldn't appear. - paritytech/get-fellow-action#17 - We upgraded the system to work with `papi` and with `smoldot`. - We are **bleeding edge** now! --- .github/workflows/auto-merge.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/auto-merge.yml b/.github/workflows/auto-merge.yml index 9329c6a210..18a94530c8 100644 --- a/.github/workflows/auto-merge.yml +++ b/.github/workflows/auto-merge.yml @@ -9,11 +9,12 @@ jobs: set-auto-merge: runs-on: ubuntu-latest environment: master + timeout-minutes: 10 # Important! This forces the job to run only on comments on Pull Requests that starts with '/merge' if: ${{ github.event.issue.pull_request && startsWith(github.event.comment.body, '/merge') }} steps: - name: Get the GitHub handle of the fellows - uses: paritytech/get-fellows-action@v1.0.0 + uses: paritytech/get-fellows-action@v1.1.0 id: fellows - name: Generate token id: merge_token From 175de3d6509488050bfbbf10b02a069ea88b8cfc Mon Sep 17 00:00:00 2001 From: Javier Bullrich Date: Mon, 18 Mar 2024 15:44:17 +0100 Subject: [PATCH 3/3] replaced token generation script for github's It is more safe to use an action that has been developed by github themselves than by an external party. --- .github/workflows/auto-merge.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/auto-merge.yml b/.github/workflows/auto-merge.yml index 18a94530c8..6b023ff699 100644 --- a/.github/workflows/auto-merge.yml +++ b/.github/workflows/auto-merge.yml @@ -16,12 +16,12 @@ jobs: - name: Get the GitHub handle of the fellows uses: paritytech/get-fellows-action@v1.1.0 id: fellows - - name: Generate token + - name: Generate a token id: merge_token - uses: tibdex/github-app-token@v1 + uses: actions/create-github-app-token@v1.8.1 with: - app_id: ${{ secrets.MERGE_APP_ID }} - private_key: ${{ secrets.MERGE_APP_KEY }} + app-id: ${{ secrets.MERGE_APP_ID }} + private-key: ${{ secrets.MERGE_APP_KEY }} - name: Set auto merge uses: paritytech/auto-merge-bot@v1.0.1 with: