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

actionsSetWorkflowAccessToRepository

Set the level of access for workflows outside of the repository

Details

  • Method: PUT
  • Path: /repos/{owner}/{repo}/actions/permissions/access
  • Operation ID: actions/set-workflow-access-to-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"
  },
  "access_level": {
    "description": "Defines the level of access that workflows outside of the repository have to actions and reusable workflows within the\nrepository.\n\n`none` means the access is only possible from workflows in this repository. `user` level access allows sharing across user owned private repositories only. `organization` level access allows sharing across the organization.",
    "required": true,
    "location": "body",
    "type": "string",
    "enum": [
      "none",
      "user",
      "organization"
    ]
  }
}

Usage

from ocp_agent import OCPAgent

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

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