Skip to content

Commit

Permalink
updated auto-merge-bot to 1.0.1 (#220)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Bullrich and fellowship-merge-bot[bot] committed Mar 18, 2024
1 parent 49c6d6d commit d39b052
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/auto-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected].0
uses: paritytech/[email protected].1
with:
GITHUB_TOKEN: ${{ steps.merge_token.outputs.token }}
MERGE_METHOD: "SQUASH"
Expand Down

0 comments on commit d39b052

Please sign in to comment.