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

reposListCustomDeploymentRuleIntegrations

List custom deployment rule integrations available for an environment

Details

  • Method: GET
  • Path: /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps
  • Operation ID: repos/list-custom-deployment-rule-integrations

Parameters

{
  "environment_name": {
    "description": "The name of the environment. The name must be URL encoded. For example, any slashes in the name must be replaced with `%2F`.",
    "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"
  },
  "owner": {
    "description": "The account owner of the repository. The name is not case sensitive.",
    "required": true,
    "location": "path",
    "type": "string"
  },
  "page": {
    "description": "The page number of the results to fetch. For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"",
    "required": false,
    "location": "query",
    "type": "integer"
  },
  "per_page": {
    "description": "The number of results per page (max 100). For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"",
    "required": false,
    "location": "query",
    "type": "integer"
  }
}

Response Schema

{
  "type": "object",
  "properties": {
    "total_count": {
      "description": "The total number of custom deployment protection rule integrations available for this environment.",
      "type": "integer",
      "example": 35
    },
    "available_custom_deployment_protection_rule_integrations": {
      "type": "array",
      "items": {
        "title": "Custom deployment protection rule app",
        "description": "A GitHub App that is providing a custom deployment protection rule.",
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 3515,
            "description": "The unique identifier of the deployment protection rule integration."
          },
          "slug": {
            "type": "string",
            "example": "my-custom-app",
            "description": "The slugified name of the deployment protection rule integration."
          },
          "integration_url": {
            "type": "string",
            "example": "https://api.github.com/apps/custom-app-slug",
            "description": "The URL for the endpoint to get details about the app."
          },
          "node_id": {
            "type": "string",
            "example": "MDQ6R2F0ZTM1MTU=",
            "description": "The node ID for the deployment protection rule integration."
          }
        },
        "required": [
          "id",
          "slug",
          "integration_url",
          "node_id"
        ]
      }
    }
  }
}

Usage

from ocp_agent import OCPAgent

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

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