GitHub · Capability

GitHub Repos API — Merge

GitHub Repos API — Merge. 2 operations. Lead operation: Merge Branch. Self-contained Naftiko capability covering one Github business surface.

Run with Naftiko GithubMerge

What You Can Do

POST
Mergebranch — Merge Branch
/v1/repos/{owner}/{repo}/merges
PUT
Mergepullrequest — Merge Pull Request
/v1/repos/{owner}/{repo}/pulls/{pull-number}/merge

MCP Tools

merge-branch

Merge Branch

merge-pull-request

Merge Pull Request

idempotent

Capability Spec

temp-merge.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: GitHub Repos API — Merge
  description: 'GitHub Repos API — Merge. 2 operations. Lead operation: Merge Branch. Self-contained Naftiko capability covering
    one Github business surface.'
  tags:
  - Github
  - Merge
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    GITHUB_API_KEY: GITHUB_API_KEY
capability:
  consumes:
  - type: http
    namespace: temp-merge
    baseUri: ''
    description: GitHub Repos API — Merge business capability. Self-contained, no shared references.
    resources:
    - name: repos-owner-repo-merges
      path: /repos/{owner}/{repo}/merges
      operations:
      - name: mergebranch
        method: POST
        description: Merge Branch
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: Authorization
          in: header
          type: string
        - name: X-GitHub-Api-Version
          in: header
          type: string
        - name: Accept
          in: header
          type: string
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: repos-owner-repo-pulls-pull_number-merge
      path: /repos/{owner}/{repo}/pulls/{pull_number}/merge
      operations:
      - name: mergepullrequest
        method: PUT
        description: Merge Pull Request
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: Authorization
          in: header
          type: string
        - name: X-GitHub-Api-Version
          in: header
          type: string
        - name: Accept
          in: header
          type: string
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    authentication:
      type: bearer
      token: '{{env.GITHUB_API_KEY}}'
  exposes:
  - type: rest
    namespace: temp-merge-rest
    port: 8080
    description: REST adapter for GitHub Repos API — Merge. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/repos/{owner}/{repo}/merges
      name: repos-owner-repo-merges
      description: REST surface for repos-owner-repo-merges.
      operations:
      - method: POST
        name: mergebranch
        description: Merge Branch
        call: temp-merge.mergebranch
        with:
          Authorization: rest.Authorization
          X-GitHub-Api-Version: rest.X-GitHub-Api-Version
          Accept: rest.Accept
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/repos/{owner}/{repo}/pulls/{pull-number}/merge
      name: repos-owner-repo-pulls-pull-number-merge
      description: REST surface for repos-owner-repo-pulls-pull_number-merge.
      operations:
      - method: PUT
        name: mergepullrequest
        description: Merge Pull Request
        call: temp-merge.mergepullrequest
        with:
          Authorization: rest.Authorization
          X-GitHub-Api-Version: rest.X-GitHub-Api-Version
          Accept: rest.Accept
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: temp-merge-mcp
    port: 9090
    transport: http
    description: MCP adapter for GitHub Repos API — Merge. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: merge-branch
      description: Merge Branch
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: temp-merge.mergebranch
      with:
        Authorization: tools.Authorization
        X-GitHub-Api-Version: tools.X-GitHub-Api-Version
        Accept: tools.Accept
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: merge-pull-request
      description: Merge Pull Request
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: temp-merge.mergepullrequest
      with:
        Authorization: tools.Authorization
        X-GitHub-Api-Version: tools.X-GitHub-Api-Version
        Accept: tools.Accept
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.