GitHub · Arazzo Workflow

GitHub Open and Auto-Merge a Pull Request

Version 1.0.0

Open a pull request from an existing branch and immediately merge it.

1 workflow 1 source API 1 provider
View Spec View on GitHub CodePipelinesPlatformSoftware DevelopmentSource ControlT1ArazzoWorkflows

Provider

github

Workflows

open-and-merge-pull-request
Open a pull request then merge it using the returned number.
Creates a pull request from an existing head branch and chains the returned pull request number into the merge call.
2 steps inputs: base, body, githubToken, head, mergeMethod, owner, repo, title outputs: merged, pullNumber, pullUrl
1
openPullRequest
Open a pull request from the head branch to the base branch.
2
mergePull
Merge the freshly opened pull request using the number returned by the create step.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: GitHub Open and Auto-Merge a Pull Request
  summary: Open a pull request from an existing branch and immediately merge it.
  description: >-
    A fast-forward integration pattern for trusted, already-pushed branches. The
    workflow opens a pull request from a head branch to a base branch and then
    merges that pull request using the number returned by the create step. Every
    step spells out its request inline so the flow can be read and executed
    without opening the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: pullsApi
  url: ../openapi/github-pulls-api-openapi.yml
  type: openapi
workflows:
- workflowId: open-and-merge-pull-request
  summary: Open a pull request then merge it using the returned number.
  description: >-
    Creates a pull request from an existing head branch and chains the returned
    pull request number into the merge call.
  inputs:
    type: object
    required:
    - githubToken
    - owner
    - repo
    - head
    - base
    - title
    properties:
      githubToken:
        type: string
        description: A GitHub token with repo scope, passed as a Bearer credential.
      owner:
        type: string
        description: The account owner of the repository.
      repo:
        type: string
        description: The name of the repository.
      head:
        type: string
        description: The name of the branch where the changes are implemented.
      base:
        type: string
        description: The name of the branch to merge the changes into.
      title:
        type: string
        description: The title of the pull request.
      body:
        type: string
        description: The body of the pull request.
      mergeMethod:
        type: string
        description: The merge method to use (merge, squash, or rebase).
  steps:
  - stepId: openPullRequest
    description: Open a pull request from the head branch to the base branch.
    operationId: pulls/create
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.githubToken
    - name: owner
      in: path
      value: $inputs.owner
    - name: repo
      in: path
      value: $inputs.repo
    requestBody:
      contentType: application/json
      payload:
        title: $inputs.title
        body: $inputs.body
        head: $inputs.head
        base: $inputs.base
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      pullNumber: $response.body#/number
      pullUrl: $response.body#/html_url
  - stepId: mergePull
    description: >-
      Merge the freshly opened pull request using the number returned by the
      create step.
    operationId: pulls/merge
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.githubToken
    - name: owner
      in: path
      value: $inputs.owner
    - name: repo
      in: path
      value: $inputs.repo
    - name: pull_number
      in: path
      value: $steps.openPullRequest.outputs.pullNumber
    requestBody:
      contentType: application/json
      payload:
        merge_method: $inputs.mergeMethod
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      merged: $response.body#/merged
      mergeSha: $response.body#/sha
  outputs:
    pullNumber: $steps.openPullRequest.outputs.pullNumber
    pullUrl: $steps.openPullRequest.outputs.pullUrl
    merged: $steps.mergePull.outputs.merged

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/github-open-and-merge-pull-request-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.