GitHub · Capability

github-repos-api — Sets

github-repos-api — Sets. 5 operations. Lead operation: GitHub Set Admin Branch Protection. Self-contained Naftiko capability covering one Github business surface.

Run with Naftiko GithubSets

What You Can Do

POST
Setadminbranchprotection — GitHub Set Admin Branch Protection
/v1/repos/{owner}/{repo}/branches/{branch}/protection/enforce-admins
PUT
Setstatuscheckcontexts — GitHub Set Status Check Contexts
/v1/repos/{owner}/{repo}/branches/{branch}/protection/required-status-checks/contexts
PUT
Setappaccessrestrictions — GitHub Set App Access Restrictions
/v1/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps
PUT
Setteamaccessrestrictions — GitHub Set Team Access Restrictions
/v1/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams
PUT
Setuseraccessrestrictions — GitHub Set User Access Restrictions
/v1/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users

MCP Tools

github-set-admin-branch-protection

GitHub Set Admin Branch Protection

github-set-status-check-contexts

GitHub Set Status Check Contexts

idempotent
github-set-app-access-restrictions

GitHub Set App Access Restrictions

idempotent
github-set-team-access-restrictions

GitHub Set Team Access Restrictions

idempotent
github-set-user-access-restrictions

GitHub Set User Access Restrictions

idempotent

Capability Spec

repo-branches-sets.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: github-repos-api — Sets
  description: 'github-repos-api — Sets. 5 operations. Lead operation: GitHub Set Admin Branch Protection. Self-contained
    Naftiko capability covering one Github business surface.'
  tags:
  - Github
  - Sets
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    GITHUB_API_KEY: GITHUB_API_KEY
capability:
  consumes:
  - type: http
    namespace: repo-branches-sets
    baseUri: ''
    description: github-repos-api — Sets business capability. Self-contained, no shared references.
    resources:
    - name: repos-owner-repo-branches-branch-protection-enforce_admins
      path: /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins
      operations:
      - name: setadminbranchprotection
        method: POST
        description: GitHub Set Admin Branch Protection
        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-branches-branch-protection-required_status_checks-contexts
      path: /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts
      operations:
      - name: setstatuscheckcontexts
        method: PUT
        description: GitHub Set Status Check Contexts
        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
    - name: repos-owner-repo-branches-branch-protection-restrictions-apps
      path: /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps
      operations:
      - name: setappaccessrestrictions
        method: PUT
        description: GitHub Set App Access Restrictions
        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
    - name: repos-owner-repo-branches-branch-protection-restrictions-teams
      path: /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams
      operations:
      - name: setteamaccessrestrictions
        method: PUT
        description: GitHub Set Team Access Restrictions
        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
    - name: repos-owner-repo-branches-branch-protection-restrictions-users
      path: /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users
      operations:
      - name: setuseraccessrestrictions
        method: PUT
        description: GitHub Set User Access Restrictions
        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: repo-branches-sets-rest
    port: 8080
    description: REST adapter for github-repos-api — Sets. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/repos/{owner}/{repo}/branches/{branch}/protection/enforce-admins
      name: repos-owner-repo-branches-branch-protection-enforce-admins
      description: REST surface for repos-owner-repo-branches-branch-protection-enforce_admins.
      operations:
      - method: POST
        name: setadminbranchprotection
        description: GitHub Set Admin Branch Protection
        call: repo-branches-sets.setadminbranchprotection
        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}/branches/{branch}/protection/required-status-checks/contexts
      name: repos-owner-repo-branches-branch-protection-required-status-checks-contexts
      description: REST surface for repos-owner-repo-branches-branch-protection-required_status_checks-contexts.
      operations:
      - method: PUT
        name: setstatuscheckcontexts
        description: GitHub Set Status Check Contexts
        call: repo-branches-sets.setstatuscheckcontexts
        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}/branches/{branch}/protection/restrictions/apps
      name: repos-owner-repo-branches-branch-protection-restrictions-apps
      description: REST surface for repos-owner-repo-branches-branch-protection-restrictions-apps.
      operations:
      - method: PUT
        name: setappaccessrestrictions
        description: GitHub Set App Access Restrictions
        call: repo-branches-sets.setappaccessrestrictions
        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}/branches/{branch}/protection/restrictions/teams
      name: repos-owner-repo-branches-branch-protection-restrictions-teams
      description: REST surface for repos-owner-repo-branches-branch-protection-restrictions-teams.
      operations:
      - method: PUT
        name: setteamaccessrestrictions
        description: GitHub Set Team Access Restrictions
        call: repo-branches-sets.setteamaccessrestrictions
        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}/branches/{branch}/protection/restrictions/users
      name: repos-owner-repo-branches-branch-protection-restrictions-users
      description: REST surface for repos-owner-repo-branches-branch-protection-restrictions-users.
      operations:
      - method: PUT
        name: setuseraccessrestrictions
        description: GitHub Set User Access Restrictions
        call: repo-branches-sets.setuseraccessrestrictions
        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: repo-branches-sets-mcp
    port: 9090
    transport: http
    description: MCP adapter for github-repos-api — Sets. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: github-set-admin-branch-protection
      description: GitHub Set Admin Branch Protection
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: repo-branches-sets.setadminbranchprotection
      with:
        Authorization: tools.Authorization
        X-GitHub-Api-Version: tools.X-GitHub-Api-Version
        Accept: tools.Accept
      outputParameters:
      - type: object
        mapping: $.
    - name: github-set-status-check-contexts
      description: GitHub Set Status Check Contexts
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: repo-branches-sets.setstatuscheckcontexts
      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-set-app-access-restrictions
      description: GitHub Set App Access Restrictions
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: repo-branches-sets.setappaccessrestrictions
      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-set-team-access-restrictions
      description: GitHub Set Team Access Restrictions
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: repo-branches-sets.setteamaccessrestrictions
      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-set-user-access-restrictions
      description: GitHub Set User Access Restrictions
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: repo-branches-sets.setuseraccessrestrictions
      with:
        Authorization: tools.Authorization
        X-GitHub-Api-Version: tools.X-GitHub-Api-Version
        Accept: tools.Accept
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.