actionsGetWorkflow
Get a workflow
Details
- Method:
GET - Path:
/repos/{owner}/{repo}/actions/workflows/{workflow_id} - Operation ID:
actions/get-workflow
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"
},
"workflow_id": {
"description": "The ID of the workflow. You can also pass the workflow file name as a string.",
"required": true,
"location": "path",
"type": "string"
}
}Response Schema
{
"title": "Workflow",
"description": "A GitHub Actions workflow",
"type": "object",
"properties": {
"id": {
"type": "integer",
"example": 5
},
"node_id": {
"type": "string",
"example": "MDg6V29ya2Zsb3cxMg=="
},
"name": {
"type": "string",
"example": "CI"
},
"path": {
"type": "string",
"example": "ruby.yaml"
},
"state": {
"type": "string",
"example": "active",
"enum": [
"active",
"deleted",
"disabled_fork",
"disabled_inactivity",
"disabled_manually"
]
},
"created_at": {
"type": "string",
"format": "date-time",
"example": "2019-12-06T14:20:20.000Z"
},
"updated_at": {
"type": "string",
"format": "date-time",
"example": "2019-12-06T14:20:20.000Z"
},
"url": {
"type": "string",
"example": "https://api.github.com/repos/actions/setup-ruby/workflows/5"
},
"html_url": {
"type": "string",
"example": "https://github.com/actions/setup-ruby/blob/master/.github/workflows/ruby.yaml"
},
"badge_url": {
"type": "string",
"example": "https://github.com/actions/setup-ruby/workflows/CI/badge.svg"
},
"deleted_at": {
"type": "string",
"format": "date-time",
"example": "2019-12-06T14:20:20.000Z"
}
},
"required": [
"id",
"node_id",
"name",
"path",
"state",
"url",
"html_url",
"badge_url",
"created_at",
"updated_at"
]
}Usage
from ocp_agent import OCPAgent
agent = OCPAgent()
await agent.register_api('github')
# Call this tool
result = await agent.call_tool('actionsGetWorkflow', {
# Add required parameters here
})