Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add git token api #475

Merged
merged 2 commits into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,8 @@
$ref: './resources/OrganizationApiTokenRef.yaml'
/organization/{organizationId}/availableRole:
$ref: './resources/OrganizationAvailableRole.yaml'
/organization/{organizationId}/gitToken:
$ref: './resources/GitToken.yaml'
/organization/{organizationId}/member:
$ref: './resources/OrganizationMember.yaml'
/organization/{organizationId}/inviteMember:
Expand Down Expand Up @@ -754,11 +756,11 @@
#/organization/{organizationId}/job/deploy:
components:
parameters:
$ref: './parameters/_index.yaml'

Check warning on line 759 in src/openapi.yaml

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

oas3-unused-component

Potentially unused component has been detected.
schemas:
$ref: './schemas/_index.yaml'

Check warning on line 761 in src/openapi.yaml

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

oas3-unused-component

Potentially unused component has been detected.
responses:
$ref: './responses/_index.yaml'

Check warning on line 763 in src/openapi.yaml

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

oas3-unused-component

Potentially unused component has been detected.
securitySchemes:
bearerAuth:
type: http
Expand Down
21 changes: 21 additions & 0 deletions src/resources/GitToken.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
get:
summary: 'List organization git tokens'
description: 'List organization git tokens'
operationId: listOrganizationGitTokens
parameters:
- $ref: '../parameters/path/organizationId.yaml'
tags:
- Organization Main Calls
responses:
'200':
description: 'List organization git tokens'
content:
application/json:
schema:
$ref: '../schemas/GitTokenResponseList.yaml'
'401':
$ref: '../responses/NotAuthorized.yaml'
'403':
$ref: '../responses/Forbidden.yaml'
'404':
$ref: '../responses/NotFound.yaml'
6 changes: 6 additions & 0 deletions src/resources/OrganizationAccountGitRepositoryBitbucket.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
get:

Check warning on line 1 in src/resources/OrganizationAccountGitRepositoryBitbucket.yaml

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

operation-description

Operation "description" must be present and non-empty string.
summary: 'Get bitbucket repositories of the connected user'
operationId: getOrganizationBitbucketRepositories
parameters:
- $ref: '../parameters/path/organizationId.yaml'
- in: query
name: gitTokenId
schema:
type: string
format: uuid
description: The git token id that must be used for the application
tags:
- Organization Account Git Repositories
responses:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
get:

Check warning on line 1 in src/resources/OrganizationAccountGitRepositoryBitbucketBranch.yaml

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

operation-description

Operation "description" must be present and non-empty string.
summary: 'Get bitbucket branches of the specified repository'
operationId: getOrganizationBitbucketRepositoryBranches
tags:
- Organization Account Git Repositories
parameters:
- $ref: '../parameters/path/organizationId.yaml'
- in: query
name: gitTokenId
schema:
type: string
format: uuid
description: The git token id that must be used for the application
- in: query
name: name
schema:
Expand Down
6 changes: 6 additions & 0 deletions src/resources/OrganizationAccountGitRepositoryGithub.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
get:

Check warning on line 1 in src/resources/OrganizationAccountGitRepositoryGithub.yaml

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

operation-description

Operation "description" must be present and non-empty string.
summary: 'Get github repositories of the connected user'
operationId: getOrganizationGithubRepositories
parameters:
- $ref: '../parameters/path/organizationId.yaml'
- in: query
name: gitTokenId
schema:
type: string
format: uuid
description: The git token id that must be used for the application
tags:
- Organization Account Git Repositories
responses:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
get:

Check warning on line 1 in src/resources/OrganizationAccountGitRepositoryGithubBranch.yaml

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

operation-description

Operation "description" must be present and non-empty string.
summary: 'Get github branches of the specified repository'
operationId: getOrganizationGithubRepositoryBranches
tags:
- Organization Account Git Repositories
parameters:
- $ref: '../parameters/path/organizationId.yaml'
- in: query
name: gitTokenId
schema:
type: string
format: uuid
description: The git token id that must be used for the application
- in: query
name: name
schema:
Expand Down
6 changes: 6 additions & 0 deletions src/resources/OrganizationAccountGitRepositoryGitlab.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
get:

Check warning on line 1 in src/resources/OrganizationAccountGitRepositoryGitlab.yaml

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

operation-description

Operation "description" must be present and non-empty string.
summary: 'Get gitlab repositories of the connected user'
operationId: getOrganizationGitlabRepositories
parameters:
- $ref: '../parameters/path/organizationId.yaml'
- in: query
name: gitTokenId
schema:
type: string
format: uuid
description: The git token id that must be used for the application
tags:
- Organization Account Git Repositories
responses:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
get:

Check warning on line 1 in src/resources/OrganizationAccountGitRepositoryGitlabBranch.yaml

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

operation-description

Operation "description" must be present and non-empty string.
summary: 'Get gitlab branches of the specified repository'
operationId: getOrganizationGitlabRepositoryBranches
tags:
- Organization Account Git Repositories
parameters:
- $ref: '../parameters/path/organizationId.yaml'
- in: query
name: gitTokenId
schema:
type: string
format: uuid
description: The git token id that must be used for the application
- in: query
name: name
schema:
Expand Down
5 changes: 5 additions & 0 deletions src/schemas/ApplicationGitRepositoryRequest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,8 @@ properties:
type: string
default: /
description: indicates the root path of the application.
git_token_id:
type: string
format: uuid
description: The git token id on Qovery side
nullable: true
13 changes: 13 additions & 0 deletions src/schemas/GitTokenResponse.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
allOf:
- $ref: './BaseResponse.yaml'
- type: object
required:
- name
- type
properties:
name:
type: string
description:
type: string
type:
$ref: './enums/GitProvider.yaml'
6 changes: 6 additions & 0 deletions src/schemas/GitTokenResponseList.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
type: object
properties:
results:
type: array
items:
$ref: './GitTokenResponse.yaml'
2 changes: 2 additions & 0 deletions src/schemas/_index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,8 @@ GitRepositoryBranchResponseList:
$ref: ./GitRepositoryBranchResponseList.yaml
GitRepositoryResponseList:
$ref: ./GitRepositoryResponseList.yaml
GitTokenResponse:
$ref: ./GitTokenResponse.yaml
Healthcheck:
$ref: ./Healthcheck.yaml
Instance:
Expand Down
Loading