capabilities.work

Check Mergeability and Merge a Pull Request

A 2-step recipe with GitHub. We can help you get access.

Recipe · 2 steps

Check Mergeability and Merge a Pull Request

with GitHub · Software Construction Management

Get a pull request, branch on its mergeable flag, and merge when ready.

  1. Fetch the pull request to read its mergeable flag before attempting a merge.
  2. Merge the pull request using the supplied merge method now that it has been confirmed mergeable.
What you'll need to have ready
  • githubToken: A GitHub token with repo scope, passed as a Bearer credential.
  • owner: The account owner of the repository.
  • repo: The name of the repository.
  • pullNumber: The number that identifies the pull request.
  • mergeMethod: The merge method to use (merge, squash, or rebase).
For your developer

Arazzo workflow github:review-and-merge-pull-request, 2 operations: pulls/get → pulls/merge. Specs on APIs.io.