pullsUpdateBranch
Update a pull request branch
Details
- Method:
PUT - Path:
/repos/{owner}/{repo}/pulls/{pull_number}/update-branch - Operation ID:
pulls/update-branch
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"
},
"pull_number": {
"description": "The number that identifies the pull request.",
"required": true,
"location": "path",
"type": "integer"
},
"expected_head_sha": {
"description": "The expected SHA of the pull request's HEAD ref. This is the most recent commit on the pull request's branch. If the expected SHA does not match the pull request's HEAD, you will receive a `422 Unprocessable Entity` status. You can use the \"[List commits](https://docs.github.com/rest/commits/commits#list-commits)\" endpoint to find the most recent commit SHA. Default: SHA of the pull request's current HEAD ref.",
"required": false,
"location": "body",
"type": "string"
}
}Response Schema
{
"type": "object",
"properties": {
"message": {
"type": "string"
},
"url": {
"type": "string"
}
}
}Usage
from ocp_agent import OCPAgent
agent = OCPAgent()
await agent.register_api('github')
# Call this tool
result = await agent.call_tool('pullsUpdateBranch', {
# Add required parameters here
})