Skip to content

Commit

Permalink
added github action to enable auto-merge in PRs
Browse files Browse the repository at this point in the history
Added two GitHub actions to enable auto-merge in the repository.

This resolves polkadot-fellows#41

## [Auto-Merge-Bot](https://github.com/paritytech/auto-merge-bot)

This bot allows _public_ members of the organization and the author of the PR to enable/disable auto-merge in a PR. It also has a field for a list of users who are also allowed to trigger the bot. For that we have the second action.
  • Loading branch information
Bullrich committed Oct 3, 2023
1 parent c86afcc commit b431786
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Auto Merge Bot

on:
# GitHub considers PRs as issues
issue_comment:
types: [created]

jobs:
set-auto-merge:
runs-on: ubuntu-latest
# 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: Set auto merge
uses: paritytech/[email protected]
with:
GITHUB_TOKEN: '${{ github.token }}'
MERGE_METHOD: "SQUASH"

0 comments on commit b431786

Please sign in to comment.