GitHub · Capability
github-repos-api — Commits
github-repos-api — Commits. 8 operations. Lead operation: GitHub List Commits. Self-contained Naftiko capability covering one Github business surface.
What You Can Do
GET
Listcommits
— GitHub List Commits
/v1/repos/{owner}/{repo}/commits
GET
Listbranchesforheadcommit
— GitHub List Branches for Head Commit
/v1/repos/{owner}/{repo}/commits/{commit-sha}/branches-where-head
GET
Listpullrequestsassociatedwithcommit
— GitHub List Pull Requests Associated with Commit
/v1/repos/{owner}/{repo}/commits/{commit-sha}/pulls
GET
Getcommit
— GitHub Get Commit
/v1/repos/{owner}/{repo}/commits/{ref}
GET
Comparetwocommits
— GitHub Compare Two Commits
/v1/repos/{owner}/{repo}/compare/{basehead}
GET
Getdiffofthedependenciesbetweencommits
— GitHub Get Diff of the Dependencies Between Commits
/v1/repos/{owner}/{repo}/dependency-graph/compare/{basehead}
POST
Createcommit
— GitHub Create Commit
/v1/repos/{owner}/{repo}/git/commits
GET
Getcommitobject
— GitHub Get Commit Object
/v1/repos/{owner}/{repo}/git/commits/{commit-sha}
MCP Tools
github-list-commits
GitHub List Commits
read-only
idempotent
github-list-branches-head-commit
GitHub List Branches for Head Commit
read-only
idempotent
github-list-pull-requests-associated
GitHub List Pull Requests Associated with Commit
read-only
idempotent
github-get-commit
GitHub Get Commit
read-only
idempotent
github-compare-two-commits
GitHub Compare Two Commits
read-only
idempotent
github-get-diff-dependencies-between
GitHub Get Diff of the Dependencies Between Commits
read-only
idempotent
github-create-commit
GitHub Create Commit
github-get-commit-object
GitHub Get Commit Object
read-only
idempotent
Capability Spec
naftiko: 1.0.0-alpha2
info:
label: github-repos-api — Commits
description: 'github-repos-api — Commits. 8 operations. Lead operation: GitHub List Commits. Self-contained Naftiko capability
covering one Github business surface.'
tags:
- Github
- Commits
created: '2026-05-19'
modified: '2026-05-19'
binds:
- namespace: env
keys:
GITHUB_API_KEY: GITHUB_API_KEY
capability:
consumes:
- type: http
namespace: repos-commits
baseUri: http://localhost:8080/rest/github-repos-api/1.1.4
description: github-repos-api — Commits business capability. Self-contained, no shared references.
resources:
- name: repos-owner-repo-commits
path: /repos/{owner}/{repo}/commits
operations:
- name: listcommits
method: GET
description: GitHub List Commits
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: sha
in: query
type: string
description: 'SHA or branch to start listing commits from. Default: the repositorys default branch (usually `main`).'
- name: path
in: query
type: string
description: Only commits containing this file path will be returned.
- name: author
in: query
type: string
description: GitHub username or email address to use to filter by commit author.
- name: committer
in: query
type: string
description: GitHub username or email address to use to filter by commit committer.
- name: until
in: query
type: string
description: 'Only commits before this date will be returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
format: `YYYY-MM-DDTHH:MM:SSZ`.'
- name: Authorization
in: header
type: string
- name: X-GitHub-Api-Version
in: header
type: string
- name: Accept
in: header
type: string
- name: repos-owner-repo-commits-commit_sha-branches-where-head
path: /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head
operations:
- name: listbranchesforheadcommit
method: GET
description: GitHub List Branches for Head Commit
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: repos-owner-repo-commits-commit_sha-pulls
path: /repos/{owner}/{repo}/commits/{commit_sha}/pulls
operations:
- name: listpullrequestsassociatedwithcommit
method: GET
description: GitHub List Pull Requests Associated with Commit
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: repos-owner-repo-commits-ref
path: /repos/{owner}/{repo}/commits/{ref}
operations:
- name: getcommit
method: GET
description: GitHub Get Commit
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: repos-owner-repo-compare-basehead
path: /repos/{owner}/{repo}/compare/{basehead}
operations:
- name: comparetwocommits
method: GET
description: GitHub 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
- name: repos-owner-repo-dependency-graph-compare-basehead
path: /repos/{owner}/{repo}/dependency-graph/compare/{basehead}
operations:
- name: getdiffofthedependenciesbetweencommits
method: GET
description: GitHub Get Diff of the Dependencies Between Commits
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: basehead
in: path
type: string
description: The base and head Git revisions to compare. The Git revisions will be resolved to commit SHAs. Named
revisions will be resolved to their corresponding HEAD comm
required: true
- name: Authorization
in: header
type: string
- name: X-GitHub-Api-Version
in: header
type: string
- name: Accept
in: header
type: string
- name: repos-owner-repo-git-commits
path: /repos/{owner}/{repo}/git/commits
operations:
- name: createcommit
method: POST
description: GitHub Create Commit
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-git-commits-commit_sha
path: /repos/{owner}/{repo}/git/commits/{commit_sha}
operations:
- name: getcommitobject
method: GET
description: GitHub Get Commit Object
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
authentication:
type: bearer
token: '{{env.GITHUB_API_KEY}}'
exposes:
- type: rest
namespace: repos-commits-rest
port: 8080
description: REST adapter for github-repos-api — Commits. One Spectral-compliant resource per consumed operation, prefixed
with /v1.
resources:
- path: /v1/repos/{owner}/{repo}/commits
name: repos-owner-repo-commits
description: REST surface for repos-owner-repo-commits.
operations:
- method: GET
name: listcommits
description: GitHub List Commits
call: repos-commits.listcommits
with:
sha: rest.sha
path: rest.path
author: rest.author
committer: rest.committer
until: rest.until
Authorization: rest.Authorization
X-GitHub-Api-Version: rest.X-GitHub-Api-Version
Accept: rest.Accept
outputParameters:
- type: object
mapping: $.
- path: /v1/repos/{owner}/{repo}/commits/{commit-sha}/branches-where-head
name: repos-owner-repo-commits-commit-sha-branches-where-head
description: REST surface for repos-owner-repo-commits-commit_sha-branches-where-head.
operations:
- method: GET
name: listbranchesforheadcommit
description: GitHub List Branches for Head Commit
call: repos-commits.listbranchesforheadcommit
with:
Authorization: rest.Authorization
X-GitHub-Api-Version: rest.X-GitHub-Api-Version
Accept: rest.Accept
outputParameters:
- type: object
mapping: $.
- path: /v1/repos/{owner}/{repo}/commits/{commit-sha}/pulls
name: repos-owner-repo-commits-commit-sha-pulls
description: REST surface for repos-owner-repo-commits-commit_sha-pulls.
operations:
- method: GET
name: listpullrequestsassociatedwithcommit
description: GitHub List Pull Requests Associated with Commit
call: repos-commits.listpullrequestsassociatedwithcommit
with:
Authorization: rest.Authorization
X-GitHub-Api-Version: rest.X-GitHub-Api-Version
Accept: rest.Accept
outputParameters:
- type: object
mapping: $.
- path: /v1/repos/{owner}/{repo}/commits/{ref}
name: repos-owner-repo-commits-ref
description: REST surface for repos-owner-repo-commits-ref.
operations:
- method: GET
name: getcommit
description: GitHub Get Commit
call: repos-commits.getcommit
with:
Authorization: rest.Authorization
X-GitHub-Api-Version: rest.X-GitHub-Api-Version
Accept: rest.Accept
outputParameters:
- type: object
mapping: $.
- 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: GitHub Compare Two Commits
call: repos-commits.comparetwocommits
with:
basehead: rest.basehead
Authorization: rest.Authorization
X-GitHub-Api-Version: rest.X-GitHub-Api-Version
Accept: rest.Accept
outputParameters:
- type: object
mapping: $.
- path: /v1/repos/{owner}/{repo}/dependency-graph/compare/{basehead}
name: repos-owner-repo-dependency-graph-compare-basehead
description: REST surface for repos-owner-repo-dependency-graph-compare-basehead.
operations:
- method: GET
name: getdiffofthedependenciesbetweencommits
description: GitHub Get Diff of the Dependencies Between Commits
call: repos-commits.getdiffofthedependenciesbetweencommits
with:
basehead: rest.basehead
Authorization: rest.Authorization
X-GitHub-Api-Version: rest.X-GitHub-Api-Version
Accept: rest.Accept
outputParameters:
- type: object
mapping: $.
- path: /v1/repos/{owner}/{repo}/git/commits
name: repos-owner-repo-git-commits
description: REST surface for repos-owner-repo-git-commits.
operations:
- method: POST
name: createcommit
description: GitHub Create Commit
call: repos-commits.createcommit
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}/git/commits/{commit-sha}
name: repos-owner-repo-git-commits-commit-sha
description: REST surface for repos-owner-repo-git-commits-commit_sha.
operations:
- method: GET
name: getcommitobject
description: GitHub Get Commit Object
call: repos-commits.getcommitobject
with:
Authorization: rest.Authorization
X-GitHub-Api-Version: rest.X-GitHub-Api-Version
Accept: rest.Accept
outputParameters:
- type: object
mapping: $.
- type: mcp
namespace: repos-commits-mcp
port: 9090
transport: http
description: MCP adapter for github-repos-api — Commits. One tool per consumed operation, routed inline through this capability's
consumes block.
tools:
- name: github-list-commits
description: GitHub List Commits
hints:
readOnly: true
destructive: false
idempotent: true
call: repos-commits.listcommits
with:
sha: tools.sha
path: tools.path
author: tools.author
committer: tools.committer
until: tools.until
Authorization: tools.Authorization
X-GitHub-Api-Version: tools.X-GitHub-Api-Version
Accept: tools.Accept
outputParameters:
- type: object
mapping: $.
- name: github-list-branches-head-commit
description: GitHub List Branches for Head Commit
hints:
readOnly: true
destructive: false
idempotent: true
call: repos-commits.listbranchesforheadcommit
with:
Authorization: tools.Authorization
X-GitHub-Api-Version: tools.X-GitHub-Api-Version
Accept: tools.Accept
outputParameters:
- type: object
mapping: $.
- name: github-list-pull-requests-associated
description: GitHub List Pull Requests Associated with Commit
hints:
readOnly: true
destructive: false
idempotent: true
call: repos-commits.listpullrequestsassociatedwithcommit
with:
Authorization: tools.Authorization
X-GitHub-Api-Version: tools.X-GitHub-Api-Version
Accept: tools.Accept
outputParameters:
- type: object
mapping: $.
- name: github-get-commit
description: GitHub Get Commit
hints:
readOnly: true
destructive: false
idempotent: true
call: repos-commits.getcommit
with:
Authorization: tools.Authorization
X-GitHub-Api-Version: tools.X-GitHub-Api-Version
Accept: tools.Accept
outputParameters:
- type: object
mapping: $.
- name: github-compare-two-commits
description: GitHub Compare Two Commits
hints:
readOnly: true
destructive: false
idempotent: true
call: repos-commits.comparetwocommits
with:
basehead: tools.basehead
Authorization: tools.Authorization
X-GitHub-Api-Version: tools.X-GitHub-Api-Version
Accept: tools.Accept
outputParameters:
- type: object
mapping: $.
- name: github-get-diff-dependencies-between
description: GitHub Get Diff of the Dependencies Between Commits
hints:
readOnly: true
destructive: false
idempotent: true
call: repos-commits.getdiffofthedependenciesbetweencommits
with:
basehead: tools.basehead
Authorization: tools.Authorization
X-GitHub-Api-Version: tools.X-GitHub-Api-Version
Accept: tools.Accept
outputParameters:
- type: object
mapping: $.
- name: github-create-commit
description: GitHub Create Commit
hints:
readOnly: false
destructive: false
idempotent: false
call: repos-commits.createcommit
with:
Authorization: tools.Authorization
X-GitHub-Api-Version: tools.X-GitHub-Api-Version
Accept: tools.Accept
body: tools.body
outputParameters:
- type: object
mapping: $.
- name: github-get-commit-object
description: GitHub Get Commit Object
hints:
readOnly: true
destructive: false
idempotent: true
call: repos-commits.getcommitobject
with:
Authorization: tools.Authorization
X-GitHub-Api-Version: tools.X-GitHub-Api-Version
Accept: tools.Accept
outputParameters:
- type: object
mapping: $.