Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
git-merge

GitHub Action

Pull request automerge action

v1.1.0

Pull request automerge action

git-merge

Pull request automerge action

GitHub Action to automatically merge pull requests when some conditions are met

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Pull request automerge action

uses: DavideViolante/[email protected]

Learn more about this action in DavideViolante/pr-automerge-action

Choose a version

Pull Request auto merge action

Maintainability Donate

GitHub Action to automatically merge pull requests when some conditions are met.

Inputs

merge-method

Pull request merge method: "merge", "squash", "rebase". Default is "squash".

min-approvals

Minimum number of approvals needed on a pull request to be merged. Default is 2.

base-ref

Base ref branch to filter pull requests. Default is "dev".

Example usage

name: PRs auto merge

on:
  schedule:
    # Every friday every hour between 12 and 15 UTC
    - cron: "0 12-15 * * 5"

jobs:
  pr-automerge:
    runs-on: ubuntu-latest
    steps:
    - uses: davideviolante/[email protected]
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      with:
        merge-method: 'squash' # Default 'squash'
        min-approvals: 2 # Default 2
        base-ref: 'dev' # Default 'dev'

Bug or feedback?

Please open an issue.

Author