GitHub · Capability

GitHub Repos API — Compare

GitHub Repos API — Compare. 1 operations. Lead operation: Compare Two Commits. Self-contained Naftiko capability covering one Github business surface.

Run with Naftiko GithubCompare

What You Can Do

GET
Comparetwocommits — Compare Two Commits
/v1/repos/{owner}/{repo}/compare/{basehead}

MCP Tools

compare-two-commits

Compare Two Commits

read-only idempotent

Capability Spec

temp-compare.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: GitHub Repos API — Compare
  description: 'GitHub Repos API — Compare. 1 operations. Lead operation: Compare Two Commits. Self-contained Naftiko capability
    covering one Github business surface.'
  tags:
  - Github
  - Compare
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    GITHUB_API_KEY: GITHUB_API_KEY
capability:
  consumes:
  - type: http
    namespace: temp-compare
    baseUri: ''
    description: GitHub Repos API — Compare business capability. Self-contained, no shared references.
    resources:
    - name: repos-owner-repo-compare-basehead
      path: /repos/{owner}/{repo}/compare/{basehead}
      operations:
      - name: comparetwocommits
        method: GET
        description: Compare Two Commits
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: basehead
          in: path
          type: string
          description: 'The base branch and head branch to compare. This parameter expects the format `BASE...HEAD`. Both
            must be branch names in `repo`. To compare with a branch that '
          required: true
        - name: Authorization
          in: header
          type: string
        - name: X-GitHub-Api-Version
          in: header
          type: string
        - name: Accept
          in: header
          type: string
    authentication:
      type: bearer
      token: '{{env.GITHUB_API_KEY}}'
  exposes:
  - type: rest
    namespace: temp-compare-rest
    port: 8080
    description: REST adapter for GitHub Repos API — Compare. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/repos/{owner}/{repo}/compare/{basehead}
      name: repos-owner-repo-compare-basehead
      description: REST surface for repos-owner-repo-compare-basehead.
      operations:
      - method: GET
        name: comparetwocommits
        description: Compare Two Commits
        call: temp-compare.comparetwocommits
        with:
          basehead: rest.basehead
          Authorization: rest.Authorization
          X-GitHub-Api-Version: rest.X-GitHub-Api-Version
          Accept: rest.Accept
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: temp-compare-mcp
    port: 9090
    transport: http
    description: MCP adapter for GitHub Repos API — Compare. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: compare-two-commits
      description: Compare Two Commits
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: temp-compare.comparetwocommits
      with:
        basehead: tools.basehead
        Authorization: tools.Authorization
        X-GitHub-Api-Version: tools.X-GitHub-Api-Version
        Accept: tools.Accept
      outputParameters:
      - type: object
        mapping: $.