From d39b05261833b2bd6592b9ed60545978b8a4304f Mon Sep 17 00:00:00 2001 From: Javier Bullrich Date: Mon, 18 Mar 2024 22:27:12 +0100 Subject: [PATCH] updated auto-merge-bot to 1.0.1 (#220) 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. ### Other upgrades #### `get-fellows-action` has been upgraded to `1.1.0` This new version contains: - paritytech/get-fellows-action#15 - Fixed a bug where candidates (`rank 0`) counted as fellows. - Now we filter anyone whose rank is below 1. - paritytech/get-fellows-action#16 - Fixes a problem where a fellow using a superidentity wouldn't appear. - This is a particular case that I discovered with @joepetrowski not appearing as a fellow. - This error was also encountered in review bot and fixed in paritytech/review-bot#107 - paritytech/get-fellows-action#11 - We upgraded the system to work with `papi` and with `smoldot`. - We are **bleeding edge** now! #### replaced token generation script for github's We replaced the action used to generate a token from a github app, originally `tibdex/github-app-token` for `actions/create-github-app-token` It is more safe to use an action that has been developed by github themselves than by an external party. --- - [x] Does not require a CHANGELOG entry --------- Co-authored-by: fellowship-merge-bot[bot] <151052383+fellowship-merge-bot[bot]@users.noreply.github.com> --- .github/workflows/auto-merge.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/auto-merge.yml b/.github/workflows/auto-merge.yml index 32cb12fb49..6b023ff699 100644 --- a/.github/workflows/auto-merge.yml +++ b/.github/workflows/auto-merge.yml @@ -9,20 +9,21 @@ 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 + - 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.0 + uses: paritytech/auto-merge-bot@v1.0.1 with: GITHUB_TOKEN: ${{ steps.merge_token.outputs.token }} MERGE_METHOD: "SQUASH"