gitCreateTag
Create a tag object
Details
- Method:
POST - Path:
/repos/{owner}/{repo}/git/tags - Operation ID:
git/create-tag
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"
},
"tag": {
"description": "The tag's name. This is typically a version (e.g., \"v0.0.1\").",
"required": true,
"location": "body",
"type": "string"
},
"message": {
"description": "The tag message.",
"required": true,
"location": "body",
"type": "string"
},
"object": {
"description": "The SHA of the git object this is tagging.",
"required": true,
"location": "body",
"type": "string"
},
"type": {
"description": "The type of the object we're tagging. Normally this is a `commit` but it can also be a `tree` or a `blob`.",
"required": true,
"location": "body",
"type": "string",
"enum": [
"commit",
"tree",
"blob"
]
},
"tagger": {
"description": "An object with information about the individual creating the tag.",
"required": false,
"location": "body",
"type": "object"
}
}Response Schema
{
"title": "Git Tag",
"description": "Metadata for a Git tag",
"type": "object",
"properties": {
"node_id": {
"type": "string",
"example": "MDM6VGFnOTQwYmQzMzYyNDhlZmFlMGY5ZWU1YmM3YjJkNWM5ODU4ODdiMTZhYw=="
},
"tag": {
"description": "Name of the tag",
"example": "v0.0.1",
"type": "string"
},
"sha": {
"type": "string",
"example": "940bd336248efae0f9ee5bc7b2d5c985887b16ac"
},
"url": {
"description": "URL for the tag",
"example": "https://api.github.com/repositories/42/git/tags/940bd336248efae0f9ee5bc7b2d5c985887b16ac",
"type": "string",
"format": "uri"
},
"message": {
"description": "Message describing the purpose of the tag",
"example": "Initial public release",
"type": "string"
},
"tagger": {
"type": "object",
"properties": {
"date": {
"type": "string"
},
"email": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"date",
"email",
"name"
]
},
"object": {
"type": "object",
"properties": {
"sha": {
"type": "string"
},
"type": {
"type": "string"
},
"url": {
"type": "string",
"format": "uri"
}
},
"required": [
"sha",
"type",
"url"
]
},
"verification": {
"title": "Verification",
"type": "object",
"properties": {
"verified": {
"type": "boolean"
},
"reason": {
"type": "string"
},
"payload": {
"type": "string",
"nullable": true
},
"signature": {
"type": "string",
"nullable": true
},
"verified_at": {
"type": "string",
"nullable": true
}
},
"required": [
"verified",
"reason",
"payload",
"signature",
"verified_at"
]
}
},
"required": [
"sha",
"url",
"node_id",
"tagger",
"object",
"tag",
"message"
]
}Usage
from ocp_agent import OCPAgent
agent = OCPAgent()
await agent.register_api('github')
# Call this tool
result = await agent.call_tool('gitCreateTag', {
# Add required parameters here
})