Skip to content

GitHub Action to automatically merge pull requests when approved by N reviewers.

License

Notifications You must be signed in to change notification settings

DavideViolante/pr-automerge-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Pull Request auto merge action

Coverage Status 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/pr-automerge-action@v1.4.0
      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

About

GitHub Action to automatically merge pull requests when approved by N reviewers.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •