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

secretScanningCreatePushProtectionBypass

Create a push protection bypass

Details

  • Method: POST
  • Path: /repos/{owner}/{repo}/secret-scanning/push-protection-bypasses
  • Operation ID: secret-scanning/create-push-protection-bypass

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"
  },
  "reason": {
    "description": "The reason for bypassing push protection.",
    "required": true,
    "location": "body",
    "type": "string",
    "enum": [
      "false_positive",
      "used_in_tests",
      "will_fix_later"
    ]
  },
  "placeholder_id": {
    "description": "The ID of the push protection bypass placeholder. This value is returned on any push protected routes.",
    "required": true,
    "location": "body",
    "type": "string"
  }
}

Response Schema

{
  "type": "object",
  "properties": {
    "reason": {
      "description": "The reason for bypassing push protection.",
      "type": "string",
      "enum": [
        "false_positive",
        "used_in_tests",
        "will_fix_later"
      ]
    },
    "expire_at": {
      "type": "string",
      "format": "date-time",
      "description": "The time that the bypass will expire in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.",
      "nullable": true
    },
    "token_type": {
      "type": "string",
      "description": "The token type this bypass is for."
    }
  }
}

Usage

from ocp_agent import OCPAgent

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

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