GitHub · Capability

github-repos-api — Policies

github-repos-api — Policies. 5 operations. Lead operation: GitHub List Deployment Branch Policies. Self-contained Naftiko capability covering one Github business surface.

Run with Naftiko GithubPolicies

What You Can Do

GET
Listdeploymentbranchpolicies — GitHub List Deployment Branch Policies
/v1/repos/{owner}/{repo}/environments/{environment-name}/deployment-branch-policies
POST
Createdeploymentbranchpolicy — GitHub Create Deployment Branch Policy
/v1/repos/{owner}/{repo}/environments/{environment-name}/deployment-branch-policies
GET
Getdeploymentbranchpolicy — GitHub Get Deployment Branch Policy
/v1/repos/{owner}/{repo}/environments/{environment-name}/deployment-branch-policies/{branch-policy-id}
PUT
Updatedeploymentbranchpolicy — GitHub Update Deployment Branch Policy
/v1/repos/{owner}/{repo}/environments/{environment-name}/deployment-branch-policies/{branch-policy-id}
DELETE
Deletedeploymentbranchpolicy — GitHub Delete Deployment Branch Policy
/v1/repos/{owner}/{repo}/environments/{environment-name}/deployment-branch-policies/{branch-policy-id}

MCP Tools

github-list-deployment-branch-policies

GitHub List Deployment Branch Policies

read-only idempotent
github-create-deployment-branch-policy

GitHub Create Deployment Branch Policy

github-get-deployment-branch-policy

GitHub Get Deployment Branch Policy

read-only idempotent
github-update-deployment-branch-policy

GitHub Update Deployment Branch Policy

idempotent
github-delete-deployment-branch-policy

GitHub Delete Deployment Branch Policy

idempotent

Capability Spec

repo-tags-policies.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: github-repos-api — Policies
  description: 'github-repos-api — Policies. 5 operations. Lead operation: GitHub List Deployment Branch Policies. Self-contained
    Naftiko capability covering one Github business surface.'
  tags:
  - Github
  - Policies
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    GITHUB_API_KEY: GITHUB_API_KEY
capability:
  consumes:
  - type: http
    namespace: repo-tags-policies
    baseUri: ''
    description: github-repos-api — Policies business capability. Self-contained, no shared references.
    resources:
    - name: repos-owner-repo-environments-environment_name-deployment-branch-policies
      path: /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies
      operations:
      - name: listdeploymentbranchpolicies
        method: GET
        description: GitHub List Deployment Branch Policies
        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: createdeploymentbranchpolicy
        method: POST
        description: GitHub Create Deployment Branch Policy
        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-environments-environment_name-deployment-branch-policies-branch
      path: /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}
      operations:
      - name: getdeploymentbranchpolicy
        method: GET
        description: GitHub Get Deployment Branch Policy
        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: updatedeploymentbranchpolicy
        method: PUT
        description: GitHub Update Deployment Branch Policy
        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: deletedeploymentbranchpolicy
        method: DELETE
        description: GitHub Delete Deployment Branch Policy
        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: repo-tags-policies-rest
    port: 8080
    description: REST adapter for github-repos-api — Policies. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/repos/{owner}/{repo}/environments/{environment-name}/deployment-branch-policies
      name: repos-owner-repo-environments-environment-name-deployment-branch-policies
      description: REST surface for repos-owner-repo-environments-environment_name-deployment-branch-policies.
      operations:
      - method: GET
        name: listdeploymentbranchpolicies
        description: GitHub List Deployment Branch Policies
        call: repo-tags-policies.listdeploymentbranchpolicies
        with:
          Authorization: rest.Authorization
          X-GitHub-Api-Version: rest.X-GitHub-Api-Version
          Accept: rest.Accept
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createdeploymentbranchpolicy
        description: GitHub Create Deployment Branch Policy
        call: repo-tags-policies.createdeploymentbranchpolicy
        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}/environments/{environment-name}/deployment-branch-policies/{branch-policy-id}
      name: repos-owner-repo-environments-environment-name-deployment-branch-policies-branch
      description: REST surface for repos-owner-repo-environments-environment_name-deployment-branch-policies-branch.
      operations:
      - method: GET
        name: getdeploymentbranchpolicy
        description: GitHub Get Deployment Branch Policy
        call: repo-tags-policies.getdeploymentbranchpolicy
        with:
          Authorization: rest.Authorization
          X-GitHub-Api-Version: rest.X-GitHub-Api-Version
          Accept: rest.Accept
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: updatedeploymentbranchpolicy
        description: GitHub Update Deployment Branch Policy
        call: repo-tags-policies.updatedeploymentbranchpolicy
        with:
          Authorization: rest.Authorization
          X-GitHub-Api-Version: rest.X-GitHub-Api-Version
          Accept: rest.Accept
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deletedeploymentbranchpolicy
        description: GitHub Delete Deployment Branch Policy
        call: repo-tags-policies.deletedeploymentbranchpolicy
        with:
          Authorization: rest.Authorization
          X-GitHub-Api-Version: rest.X-GitHub-Api-Version
          Accept: rest.Accept
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: repo-tags-policies-mcp
    port: 9090
    transport: http
    description: MCP adapter for github-repos-api — Policies. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: github-list-deployment-branch-policies
      description: GitHub List Deployment Branch Policies
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: repo-tags-policies.listdeploymentbranchpolicies
      with:
        Authorization: tools.Authorization
        X-GitHub-Api-Version: tools.X-GitHub-Api-Version
        Accept: tools.Accept
      outputParameters:
      - type: object
        mapping: $.
    - name: github-create-deployment-branch-policy
      description: GitHub Create Deployment Branch Policy
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: repo-tags-policies.createdeploymentbranchpolicy
      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-deployment-branch-policy
      description: GitHub Get Deployment Branch Policy
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: repo-tags-policies.getdeploymentbranchpolicy
      with:
        Authorization: tools.Authorization
        X-GitHub-Api-Version: tools.X-GitHub-Api-Version
        Accept: tools.Accept
      outputParameters:
      - type: object
        mapping: $.
    - name: github-update-deployment-branch-policy
      description: GitHub Update Deployment Branch Policy
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: repo-tags-policies.updatedeploymentbranchpolicy
      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-delete-deployment-branch-policy
      description: GitHub Delete Deployment Branch Policy
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: repo-tags-policies.deletedeploymentbranchpolicy
      with:
        Authorization: tools.Authorization
        X-GitHub-Api-Version: tools.X-GitHub-Api-Version
        Accept: tools.Accept
      outputParameters:
      - type: object
        mapping: $.