The Merge Pull Request action merges a pull request into the target branch of the GitHub repository.

Overview

The Merge Pull Request action merges a pull request into the target branch of a GitHub repository using the pull request number. You can specify the merge type, commit title and commit message for the merge commit. The action requires an active GitHub session to authenticate the request.

Settings

The Merge Pull Request action contains the following settings:

Note: All the input fields support string variables. You can create a string variable to hold the appropriate text string and select it in the applicable settings.
Session name

Specifies the GitHub session name that the Connect action creates. Use one of the following options to specify the session name:

  • Session name: Enter the session name as text directly or select the string variable that holds the session name text. Automation 360 sets Default as the default session name.
  • Variable: Select the GitHub session variable that the Connect action creates.
Owner name
Specifies the name of the GitHub repository owner. The owner can be an organization or a user account. You can either enter the name directly as text or select the applicable string variable.
Repository name
Specifies the name of the GitHub repository in which the action merges the pull request. You can either enter the repository name directly as text or select the applicable string variable.
Pull request number
Specifies the pull request number to merge. You can either enter the pull request number directly as text or select the applicable string variable.
Merge Type
Specifies the merge method for the pull request. Select one of the following options:
  • Merge: Select to merge all commits from the source branch into the target branch and create a merge commit.
  • Squash: Select to combine all commits from the source branch into a single commit before merging into the target branch.
  • Rebase: Select to commit each pull request individually from the source branch onto the target branch without creating a merge commit.
Commit title (optional)
Specifies the title of the commit. You can either enter the commit title directly as text or select the applicable string variable.
Commit message (optional)
Specifies the body text of the commit. You can either enter the commit message directly as text or select the applicable string variable.
Assign output to variable
Specifies the boolean variable in which the action stores the status of the merge request. The action returns the status true for successful merge and false if the merge fails.