mirror of
https://github.com/appwrite/appwrite
synced 2026-05-22 08:28:42 +00:00
Merge pull request #10190 from hmacr/1we24-auto-suggest-default-branch
Add defaultBranch in getRepository response
This commit is contained in:
commit
d0b04cd61b
6 changed files with 91 additions and 0 deletions
|
|
@ -4489,6 +4489,30 @@
|
|||
}
|
||||
],
|
||||
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console."
|
||||
},
|
||||
{
|
||||
"name": "createDocuments",
|
||||
"auth": {
|
||||
"Admin": [],
|
||||
"Key": []
|
||||
},
|
||||
"parameters": [
|
||||
"databaseId",
|
||||
"collectionId",
|
||||
"documents"
|
||||
],
|
||||
"required": [
|
||||
"databaseId",
|
||||
"collectionId",
|
||||
"documents"
|
||||
],
|
||||
"responses": [
|
||||
{
|
||||
"code": 201,
|
||||
"model": "#\/components\/schemas\/documentList"
|
||||
}
|
||||
],
|
||||
"description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console."
|
||||
}
|
||||
],
|
||||
"auth": {
|
||||
|
|
|
|||
|
|
@ -39698,6 +39698,11 @@
|
|||
"description": "Is VCS (Version Control System) repository private?",
|
||||
"x-example": true
|
||||
},
|
||||
"defaultBranch": {
|
||||
"type": "string",
|
||||
"description": "VCS (Version Control System) repository's default branch name.",
|
||||
"x-example": "main"
|
||||
},
|
||||
"pushedAt": {
|
||||
"type": "string",
|
||||
"description": "Last commit date in ISO 8601 format.",
|
||||
|
|
@ -39710,6 +39715,7 @@
|
|||
"organization",
|
||||
"provider",
|
||||
"private",
|
||||
"defaultBranch",
|
||||
"pushedAt"
|
||||
]
|
||||
},
|
||||
|
|
@ -39742,6 +39748,11 @@
|
|||
"description": "Is VCS (Version Control System) repository private?",
|
||||
"x-example": true
|
||||
},
|
||||
"defaultBranch": {
|
||||
"type": "string",
|
||||
"description": "VCS (Version Control System) repository's default branch name.",
|
||||
"x-example": "main"
|
||||
},
|
||||
"pushedAt": {
|
||||
"type": "string",
|
||||
"description": "Last commit date in ISO 8601 format.",
|
||||
|
|
@ -39759,6 +39770,7 @@
|
|||
"organization",
|
||||
"provider",
|
||||
"private",
|
||||
"defaultBranch",
|
||||
"pushedAt",
|
||||
"framework"
|
||||
]
|
||||
|
|
@ -39792,6 +39804,11 @@
|
|||
"description": "Is VCS (Version Control System) repository private?",
|
||||
"x-example": true
|
||||
},
|
||||
"defaultBranch": {
|
||||
"type": "string",
|
||||
"description": "VCS (Version Control System) repository's default branch name.",
|
||||
"x-example": "main"
|
||||
},
|
||||
"pushedAt": {
|
||||
"type": "string",
|
||||
"description": "Last commit date in ISO 8601 format.",
|
||||
|
|
@ -39809,6 +39826,7 @@
|
|||
"organization",
|
||||
"provider",
|
||||
"private",
|
||||
"defaultBranch",
|
||||
"pushedAt",
|
||||
"runtime"
|
||||
]
|
||||
|
|
|
|||
|
|
@ -4626,6 +4626,30 @@
|
|||
}
|
||||
],
|
||||
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console."
|
||||
},
|
||||
{
|
||||
"name": "createDocuments",
|
||||
"auth": {
|
||||
"Admin": [],
|
||||
"Key": []
|
||||
},
|
||||
"parameters": [
|
||||
"databaseId",
|
||||
"collectionId",
|
||||
"documents"
|
||||
],
|
||||
"required": [
|
||||
"databaseId",
|
||||
"collectionId",
|
||||
"documents"
|
||||
],
|
||||
"responses": [
|
||||
{
|
||||
"code": 201,
|
||||
"model": "#\/definitions\/documentList"
|
||||
}
|
||||
],
|
||||
"description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console."
|
||||
}
|
||||
],
|
||||
"auth": {
|
||||
|
|
|
|||
|
|
@ -39874,6 +39874,11 @@
|
|||
"description": "Is VCS (Version Control System) repository private?",
|
||||
"x-example": true
|
||||
},
|
||||
"defaultBranch": {
|
||||
"type": "string",
|
||||
"description": "VCS (Version Control System) repository's default branch name.",
|
||||
"x-example": "main"
|
||||
},
|
||||
"pushedAt": {
|
||||
"type": "string",
|
||||
"description": "Last commit date in ISO 8601 format.",
|
||||
|
|
@ -39886,6 +39891,7 @@
|
|||
"organization",
|
||||
"provider",
|
||||
"private",
|
||||
"defaultBranch",
|
||||
"pushedAt"
|
||||
]
|
||||
},
|
||||
|
|
@ -39918,6 +39924,11 @@
|
|||
"description": "Is VCS (Version Control System) repository private?",
|
||||
"x-example": true
|
||||
},
|
||||
"defaultBranch": {
|
||||
"type": "string",
|
||||
"description": "VCS (Version Control System) repository's default branch name.",
|
||||
"x-example": "main"
|
||||
},
|
||||
"pushedAt": {
|
||||
"type": "string",
|
||||
"description": "Last commit date in ISO 8601 format.",
|
||||
|
|
@ -39935,6 +39946,7 @@
|
|||
"organization",
|
||||
"provider",
|
||||
"private",
|
||||
"defaultBranch",
|
||||
"pushedAt",
|
||||
"framework"
|
||||
]
|
||||
|
|
@ -39968,6 +39980,11 @@
|
|||
"description": "Is VCS (Version Control System) repository private?",
|
||||
"x-example": true
|
||||
},
|
||||
"defaultBranch": {
|
||||
"type": "string",
|
||||
"description": "VCS (Version Control System) repository's default branch name.",
|
||||
"x-example": "main"
|
||||
},
|
||||
"pushedAt": {
|
||||
"type": "string",
|
||||
"description": "Last commit date in ISO 8601 format.",
|
||||
|
|
@ -39985,6 +40002,7 @@
|
|||
"organization",
|
||||
"provider",
|
||||
"private",
|
||||
"defaultBranch",
|
||||
"pushedAt",
|
||||
"runtime"
|
||||
]
|
||||
|
|
|
|||
|
|
@ -1137,6 +1137,7 @@ App::get('/v1/vcs/github/installations/:installationId/providerRepositories/:pro
|
|||
$repository['pushedAt'] = $repository['pushed_at'] ?? '';
|
||||
$repository['organization'] = $installation->getAttribute('organization', '');
|
||||
$repository['provider'] = $installation->getAttribute('provider', '');
|
||||
$repository['defaultBranch'] = $repository['default_branch'] ?? '';
|
||||
|
||||
$response->dynamic(new Document($repository), Response::MODEL_PROVIDER_REPOSITORY);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -41,6 +41,12 @@ class ProviderRepository extends Model
|
|||
'default' => false,
|
||||
'example' => true,
|
||||
])
|
||||
->addRule('defaultBranch', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => "VCS (Version Control System) repository's default branch name.",
|
||||
'default' => '',
|
||||
'example' => 'main',
|
||||
])
|
||||
->addRule('pushedAt', [
|
||||
'type' => self::TYPE_DATETIME,
|
||||
'description' => 'Last commit date in ISO 8601 format.',
|
||||
|
|
|
|||
Loading…
Reference in a new issue