Open Context Protocol is live! 🚀 Read the launch post
actionsGetGithubActionsDefaultWorkflowPermissionsRepository

actionsGetGithubActionsDefaultWorkflowPermissionsRepository

Get default workflow permissions for a repository

Details

  • Method: GET
  • Path: /repos/{owner}/{repo}/actions/permissions/workflow
  • Operation ID: actions/get-github-actions-default-workflow-permissions-repository

Parameters

{
  "owner": {
    "description": "The account owner of the repository. The name is not case sensitive.",
    "required": true,
    "location": "path",
    "type": "string"
  },
  "repo": {
    "description": "The name of the repository without the `.git` extension. The name is not case sensitive.",
    "required": true,
    "location": "path",
    "type": "string"
  }
}

Response Schema

{
  "type": "object",
  "properties": {
    "default_workflow_permissions": {
      "type": "string",
      "description": "The default workflow permissions granted to the GITHUB_TOKEN when running workflows.",
      "enum": [
        "read",
        "write"
      ]
    },
    "can_approve_pull_request_reviews": {
      "type": "boolean",
      "description": "Whether GitHub Actions can approve pull requests. Enabling this can be a security risk."
    }
  },
  "required": [
    "default_workflow_permissions",
    "can_approve_pull_request_reviews"
  ]
}

Usage

from ocp_agent import OCPAgent

agent = OCPAgent()
await agent.register_api('github')

# Call this tool
result = await agent.call_tool('actionsGetGithubActionsDefaultWorkflowPermissionsRepository', {
    # Add required parameters here
})