naftiko: 1.0.0-alpha2 info: label: github-repos-api — Branches description: 'github-repos-api — Branches. 11 operations. Lead operation: GitHub Get Branch. Self-contained Naftiko capability covering one Github business surface.' tags: - Github - Branches 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-branches baseUri: '' description: github-repos-api — Branches business capability. Self-contained, no shared references. resources: - name: repos-owner-repo-branches-branch path: /repos/{owner}/{repo}/branches/{branch} operations: - name: getbranch method: GET description: GitHub Get Branch 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 path: /repos/{owner}/{repo}/branches/{branch}/protection operations: - name: getbranchprotection method: GET description: GitHub Get 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: updatebranchprotection method: PUT description: GitHub Update 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: body in: body type: object description: Request body (JSON). required: true - name: deletebranchprotection method: DELETE description: GitHub Delete 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-enforce_admins path: /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins operations: - name: getadminbranchprotection method: GET description: GitHub Get 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: 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: deleteadminbranchprotection method: DELETE description: GitHub Delete 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-restrictions-apps path: /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps operations: - name: getappswithaccesstotheprotectedbranch method: GET description: GitHub Get Apps with Access to the Protected Branch 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-restrictions-teams path: /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams operations: - name: getteamswithaccesstotheprotectedbranch method: GET description: GitHub Get Teams with Access to the Protected Branch 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-restrictions-users path: /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users operations: - name: getuserswithaccesstotheprotectedbranch method: GET description: GitHub Get Users with Access to the Protected Branch 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-rename path: /repos/{owner}/{repo}/branches/{branch}/rename operations: - name: renamebranch method: POST description: GitHub Rename Branch 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 authentication: type: bearer token: '{{env.GITHUB_API_KEY}}' exposes: - type: rest namespace: repo-branches-branches-rest port: 8080 description: REST adapter for github-repos-api — Branches. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/repos/{owner}/{repo}/branches/{branch} name: repos-owner-repo-branches-branch description: REST surface for repos-owner-repo-branches-branch. operations: - method: GET name: getbranch description: GitHub Get Branch call: repo-branches-branches.getbranch 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 name: repos-owner-repo-branches-branch-protection description: REST surface for repos-owner-repo-branches-branch-protection. operations: - method: GET name: getbranchprotection description: GitHub Get Branch Protection call: repo-branches-branches.getbranchprotection with: Authorization: rest.Authorization X-GitHub-Api-Version: rest.X-GitHub-Api-Version Accept: rest.Accept outputParameters: - type: object mapping: $. - method: PUT name: updatebranchprotection description: GitHub Update Branch Protection call: repo-branches-branches.updatebranchprotection 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: deletebranchprotection description: GitHub Delete Branch Protection call: repo-branches-branches.deletebranchprotection 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/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: GET name: getadminbranchprotection description: GitHub Get Admin Branch Protection call: repo-branches-branches.getadminbranchprotection with: Authorization: rest.Authorization X-GitHub-Api-Version: rest.X-GitHub-Api-Version Accept: rest.Accept outputParameters: - type: object mapping: $. - method: POST name: setadminbranchprotection description: GitHub Set Admin Branch Protection call: repo-branches-branches.setadminbranchprotection with: Authorization: rest.Authorization X-GitHub-Api-Version: rest.X-GitHub-Api-Version Accept: rest.Accept outputParameters: - type: object mapping: $. - method: DELETE name: deleteadminbranchprotection description: GitHub Delete Admin Branch Protection call: repo-branches-branches.deleteadminbranchprotection 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/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: GET name: getappswithaccesstotheprotectedbranch description: GitHub Get Apps with Access to the Protected Branch call: repo-branches-branches.getappswithaccesstotheprotectedbranch 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/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: GET name: getteamswithaccesstotheprotectedbranch description: GitHub Get Teams with Access to the Protected Branch call: repo-branches-branches.getteamswithaccesstotheprotectedbranch 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/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: GET name: getuserswithaccesstotheprotectedbranch description: GitHub Get Users with Access to the Protected Branch call: repo-branches-branches.getuserswithaccesstotheprotectedbranch 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}/rename name: repos-owner-repo-branches-branch-rename description: REST surface for repos-owner-repo-branches-branch-rename. operations: - method: POST name: renamebranch description: GitHub Rename Branch call: repo-branches-branches.renamebranch 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-branches-mcp port: 9090 transport: http description: MCP adapter for github-repos-api — Branches. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: github-get-branch description: GitHub Get Branch hints: readOnly: true destructive: false idempotent: true call: repo-branches-branches.getbranch with: Authorization: tools.Authorization X-GitHub-Api-Version: tools.X-GitHub-Api-Version Accept: tools.Accept outputParameters: - type: object mapping: $. - name: github-get-branch-protection description: GitHub Get Branch Protection hints: readOnly: true destructive: false idempotent: true call: repo-branches-branches.getbranchprotection with: Authorization: tools.Authorization X-GitHub-Api-Version: tools.X-GitHub-Api-Version Accept: tools.Accept outputParameters: - type: object mapping: $. - name: github-update-branch-protection description: GitHub Update Branch Protection hints: readOnly: false destructive: false idempotent: true call: repo-branches-branches.updatebranchprotection 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-branch-protection description: GitHub Delete Branch Protection hints: readOnly: false destructive: true idempotent: true call: repo-branches-branches.deletebranchprotection with: Authorization: tools.Authorization X-GitHub-Api-Version: tools.X-GitHub-Api-Version Accept: tools.Accept outputParameters: - type: object mapping: $. - name: github-get-admin-branch-protection description: GitHub Get Admin Branch Protection hints: readOnly: true destructive: false idempotent: true call: repo-branches-branches.getadminbranchprotection with: Authorization: tools.Authorization X-GitHub-Api-Version: tools.X-GitHub-Api-Version Accept: tools.Accept outputParameters: - type: object mapping: $. - name: github-set-admin-branch-protection description: GitHub Set Admin Branch Protection hints: readOnly: false destructive: false idempotent: false call: repo-branches-branches.setadminbranchprotection with: Authorization: tools.Authorization X-GitHub-Api-Version: tools.X-GitHub-Api-Version Accept: tools.Accept outputParameters: - type: object mapping: $. - name: github-delete-admin-branch-protection description: GitHub Delete Admin Branch Protection hints: readOnly: false destructive: true idempotent: true call: repo-branches-branches.deleteadminbranchprotection with: Authorization: tools.Authorization X-GitHub-Api-Version: tools.X-GitHub-Api-Version Accept: tools.Accept outputParameters: - type: object mapping: $. - name: github-get-apps-access-protected description: GitHub Get Apps with Access to the Protected Branch hints: readOnly: true destructive: false idempotent: true call: repo-branches-branches.getappswithaccesstotheprotectedbranch with: Authorization: tools.Authorization X-GitHub-Api-Version: tools.X-GitHub-Api-Version Accept: tools.Accept outputParameters: - type: object mapping: $. - name: github-get-teams-access-protected description: GitHub Get Teams with Access to the Protected Branch hints: readOnly: true destructive: false idempotent: true call: repo-branches-branches.getteamswithaccesstotheprotectedbranch with: Authorization: tools.Authorization X-GitHub-Api-Version: tools.X-GitHub-Api-Version Accept: tools.Accept outputParameters: - type: object mapping: $. - name: github-get-users-access-protected description: GitHub Get Users with Access to the Protected Branch hints: readOnly: true destructive: false idempotent: true call: repo-branches-branches.getuserswithaccesstotheprotectedbranch with: Authorization: tools.Authorization X-GitHub-Api-Version: tools.X-GitHub-Api-Version Accept: tools.Accept outputParameters: - type: object mapping: $. - name: github-rename-branch description: GitHub Rename Branch hints: readOnly: false destructive: false idempotent: false call: repo-branches-branches.renamebranch with: Authorization: tools.Authorization X-GitHub-Api-Version: tools.X-GitHub-Api-Version Accept: tools.Accept body: tools.body outputParameters: - type: object mapping: $.