actionsAddCustomLabelsToSelfHostedRunnerForRepo
Add custom labels to a self-hosted runner for a repository
Details
- Method:
POST - Path:
/repos/{owner}/{repo}/actions/runners/{runner_id}/labels - Operation ID:
actions/add-custom-labels-to-self-hosted-runner-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"
},
"runner_id": {
"description": "Unique identifier of the self-hosted runner.",
"required": true,
"location": "path",
"type": "integer"
},
"labels": {
"description": "The names of the custom labels to add to the runner.",
"required": true,
"location": "body",
"type": "array"
}
}Response Schema
{
"type": "object",
"required": [
"total_count",
"labels"
],
"properties": {
"total_count": {
"type": "integer"
},
"labels": {
"type": "array",
"items": {
"title": "Self hosted runner label",
"description": "A label for a self hosted runner",
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the label."
},
"name": {
"type": "string",
"description": "Name of the label."
},
"type": {
"type": "string",
"description": "The type of label. Read-only labels are applied automatically when the runner is configured.",
"enum": [
"read-only",
"custom"
]
}
},
"required": [
"name"
]
}
}
}
}Usage
from ocp_agent import OCPAgent
agent = OCPAgent()
await agent.register_api('github')
# Call this tool
result = await agent.call_tool('actionsAddCustomLabelsToSelfHostedRunnerForRepo', {
# Add required parameters here
})