GitHub · Capability

GitHub Repos API — Activity

GitHub Repos API — Activity. 3 operations. Lead operation: Get The Weekly Commit Activity. Self-contained Naftiko capability covering one Github business surface.

Run with Naftiko GithubActivity

What You Can Do

GET
Gettheweeklycommitactivity — Get The Weekly Commit Activity
/v1/repos/{owner}/{repo}/stats/code-frequency
GET
Getthelastyearofcommitactivity — Get The Last Year Of Commit Activity
/v1/repos/{owner}/{repo}/stats/commit-activity
GET
Getallcontributorcommitactivity — Get All Contributor Commit Activity
/v1/repos/{owner}/{repo}/stats/contributors

MCP Tools

get-weekly-commit-activity

Get The Weekly Commit Activity

read-only idempotent
get-last-year-commit-activity

Get The Last Year Of Commit Activity

read-only idempotent
get-all-contributor-commit-activity

Get All Contributor Commit Activity

read-only idempotent

Capability Spec

temp-activity.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: GitHub Repos API — Activity
  description: 'GitHub Repos API — Activity. 3 operations. Lead operation: Get The Weekly Commit Activity. Self-contained
    Naftiko capability covering one Github business surface.'
  tags:
  - Github
  - Activity
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    GITHUB_API_KEY: GITHUB_API_KEY
capability:
  consumes:
  - type: http
    namespace: temp-activity
    baseUri: ''
    description: GitHub Repos API — Activity business capability. Self-contained, no shared references.
    resources:
    - name: repos-owner-repo-stats-code_frequency
      path: /repos/{owner}/{repo}/stats/code_frequency
      operations:
      - name: gettheweeklycommitactivity
        method: GET
        description: Get The Weekly Commit Activity
        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-stats-commit_activity
      path: /repos/{owner}/{repo}/stats/commit_activity
      operations:
      - name: getthelastyearofcommitactivity
        method: GET
        description: Get The Last Year Of Commit Activity
        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-stats-contributors
      path: /repos/{owner}/{repo}/stats/contributors
      operations:
      - name: getallcontributorcommitactivity
        method: GET
        description: Get All Contributor Commit Activity
        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: temp-activity-rest
    port: 8080
    description: REST adapter for GitHub Repos API — Activity. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/repos/{owner}/{repo}/stats/code-frequency
      name: repos-owner-repo-stats-code-frequency
      description: REST surface for repos-owner-repo-stats-code_frequency.
      operations:
      - method: GET
        name: gettheweeklycommitactivity
        description: Get The Weekly Commit Activity
        call: temp-activity.gettheweeklycommitactivity
        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}/stats/commit-activity
      name: repos-owner-repo-stats-commit-activity
      description: REST surface for repos-owner-repo-stats-commit_activity.
      operations:
      - method: GET
        name: getthelastyearofcommitactivity
        description: Get The Last Year Of Commit Activity
        call: temp-activity.getthelastyearofcommitactivity
        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}/stats/contributors
      name: repos-owner-repo-stats-contributors
      description: REST surface for repos-owner-repo-stats-contributors.
      operations:
      - method: GET
        name: getallcontributorcommitactivity
        description: Get All Contributor Commit Activity
        call: temp-activity.getallcontributorcommitactivity
        with:
          Authorization: rest.Authorization
          X-GitHub-Api-Version: rest.X-GitHub-Api-Version
          Accept: rest.Accept
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: temp-activity-mcp
    port: 9090
    transport: http
    description: MCP adapter for GitHub Repos API — Activity. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: get-weekly-commit-activity
      description: Get The Weekly Commit Activity
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: temp-activity.gettheweeklycommitactivity
      with:
        Authorization: tools.Authorization
        X-GitHub-Api-Version: tools.X-GitHub-Api-Version
        Accept: tools.Accept
      outputParameters:
      - type: object
        mapping: $.
    - name: get-last-year-commit-activity
      description: Get The Last Year Of Commit Activity
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: temp-activity.getthelastyearofcommitactivity
      with:
        Authorization: tools.Authorization
        X-GitHub-Api-Version: tools.X-GitHub-Api-Version
        Accept: tools.Accept
      outputParameters:
      - type: object
        mapping: $.
    - name: get-all-contributor-commit-activity
      description: Get All Contributor Commit Activity
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: temp-activity.getallcontributorcommitactivity
      with:
        Authorization: tools.Authorization
        X-GitHub-Api-Version: tools.X-GitHub-Api-Version
        Accept: tools.Accept
      outputParameters:
      - type: object
        mapping: $.