interactionsGetRestrictionsForRepo
Get interaction restrictions for a repository
Details
- Method:
GET - Path:
/repos/{owner}/{repo}/interaction-limits - Operation ID:
interactions/get-restrictions-for-repo
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
{
"anyOf": [
{
"title": "Interaction Limits",
"description": "Interaction limit settings.",
"type": "object",
"properties": {
"limit": {
"type": "string",
"description": "The type of GitHub user that can comment, open issues, or create pull requests while the interaction limit is in effect.",
"example": "collaborators_only",
"enum": [
"existing_users",
"contributors_only",
"collaborators_only"
]
},
"origin": {
"type": "string",
"example": "repository"
},
"expires_at": {
"type": "string",
"format": "date-time",
"example": "2018-08-17T04:18:39Z"
}
},
"required": [
"limit",
"origin",
"expires_at"
]
},
{
"type": "object",
"properties": {},
"additionalProperties": false
}
]
}Usage
from ocp_agent import OCPAgent
agent = OCPAgent()
await agent.register_api('github')
# Call this tool
result = await agent.call_tool('interactionsGetRestrictionsForRepo', {
# Add required parameters here
})