Skip to content
git-pull-request

GitHub Action

pull-request merge

v1.2.0 Latest version

pull-request merge

git-pull-request

pull-request merge

merge a pull-request when an event triggers the action

Installation

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

              

- name: pull-request merge

uses: sudo-bot/[email protected]

Learn more about this action in sudo-bot/action-pull-request-merge

Choose a version

merge a pull-request

This action merges a pull-request

Marketplace: https://github.com/marketplace/actions/pull-request-merge

Example usages

steps:
  - name: merge a pull request
    uses: sudo-bot/[email protected]
    with:
        github-token: ${{ secrets.GITHUB_TOKEN }}
        number: ${{ github.event.pull_request.number }}
        allowed-usernames-regex: ^williamdes$
        filter-label: merge-it

  - name: merge a pull request without any need of a label (automatic merge)
    uses: sudo-bot/[email protected]
    with:
        github-token: ${{ secrets.GITHUB_TOKEN }}
        number: ${{ github.event.pull_request.number }}
        allowed-usernames-regex: ^williamdes$

  - name: merge a pull request with message and body (optional)
    uses: sudo-bot/[email protected]
    with:
        github-token: ${{ secrets.GITHUB_TOKEN }}
        number: ${{ github.event.pull_request.number }}
        merge-method: merge
        allowed-usernames-regex: ^williamdes$
        filter-label: merge-it
        merge-title: "Merge #${{ github.event.pull_request.number }}"
        merge-message: "Merge #${{ github.event.pull_request.number }}"

  - name: merge a pull request using fast-forward
    uses: sudo-bot/[email protected]
    with:
        github-token: ${{ secrets.GITHUB_TOKEN }}
        number: ${{ github.event.pull_request.number }}
        merge-method: fast-forward
        allowed-usernames-regex: ^williamdes$
        filter-label: merge-it