Summary
Create a new repository in Git for storing projects
Description
Create a new repository in Git for storing projects
Route
POST /git/:gitType/repos/:repoPath
Roles
Parameters
DetailsExampleSchema
Name |
Type |
Required |
Description |
gitType |
string |
yes |
The name of the Git provider that is used |
repoPath |
string |
yes |
The path in Git to the repository |
repoName |
string |
yes |
The name of the Git repository to create |
Copied to Clipboard
{
"repoName": "RepositoryName"
}
Copied to Clipboard
{
"type": "object",
"properties": {
"repoName": {
"title": "repoName",
"type": "string",
"examples": [
"RepositoryName"
]
}
},
"required": [
"repoName"
],
"additionalProperties": false
}
Return
DetailsExampleSchema
Name |
Type |
Description |
result |
object |
The result of creating a repository in Git |
Copied to Clipboard
{
"message": "`Successfully created repository: ExampleRepo",
"data": {
"path": "group1/group2/ExampleRepo",
"default_branch": "main",
"visibility": "private"
}
}
Copied to Clipboard
{
"title": "result",
"type": "object",
"properties": {
"message": {
"type": "string",
"examples": [
"`Successfully created repository: ExampleRepo"
]
},
"data": {
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "The full path to the repository in Git",
"examples": [
"group1/group2/ExampleRepo",
"exampleOrg/ExampleRepo"
]
},
"default_branch": {
"type": "string",
"description": "The default branch created for the repository",
"examples": [
"main"
]
},
"visibility": {
"type": "string",
"description": "The visibility of the repository",
"examples": [
"private"
]
}
}
}
}
}