codespacesCreateOrUpdateRepoSecret
Create or update a repository secret
Details
- Method:
PUT - Path:
/repos/{owner}/{repo}/codespaces/secrets/{secret_name} - Operation ID:
codespaces/create-or-update-repo-secret
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"
},
"secret_name": {
"description": "The name of the secret.",
"required": true,
"location": "path",
"type": "string"
},
"encrypted_value": {
"description": "Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/codespaces/repository-secrets#get-a-repository-public-key) endpoint.",
"required": false,
"location": "body",
"type": "string"
},
"key_id": {
"description": "ID of the key you used to encrypt the secret.",
"required": false,
"location": "body",
"type": "string"
}
}Response Schema
{
"title": "Empty Object",
"description": "An object without any properties.",
"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('codespacesCreateOrUpdateRepoSecret', {
# Add required parameters here
})