-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Add API for Variables
#29520
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
Merged
techknowlogick
merged 25 commits into
go-gitea:main
from
sillyguodong:feat/api_for_variables
Mar 28, 2024
Merged
Add API for Variables
#29520
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
d20280e
feat: create and update user scope variable
sillyguodong 7fb32af
chore: lint and typo
sillyguodong eacaba1
feat: delete and get user-level var
sillyguodong c0ccc4b
Merge branch 'main' into feat/api_for_variables
sillyguodong a4a0102
chore: generate swagger
sillyguodong ca218ad
feat: org-level var api
sillyguodong b23a836
feat: repo-level var api
sillyguodong e931674
revert Makefile
sillyguodong 6e1548c
lint swagger
sillyguodong a4c633e
chore: add new line at end of swgger file
sillyguodong 512d062
feat: list variables
sillyguodong 73f483c
chore: tab to space
sillyguodong 0dd5c00
Merge branch 'main' into feat/api_for_variables
sillyguodong 473cff7
Merge branch 'main' into feat/api_for_variables
sillyguodong 77624df
Merge branch 'main' into feat/api_for_variables
silverwind 1806ad7
fix: no check null for owner_id and repo_id
sillyguodong ef5f9f5
Merge branch 'main' into feat/api_for_variables
sillyguodong bf807a6
chore: add integration test
sillyguodong da18636
chore: add comment for opts
sillyguodong 6e21046
fix: misspelling
sillyguodong 75d96f1
fix: test case
sillyguodong 48f23c9
chore: mv func to util pkg
sillyguodong dec6da3
chore: re-run actions
sillyguodong a869bcc
Merge branch 'main' into feat/api_for_variables
techknowlogick 1e3224b
Merge branch 'main' into feat/api_for_variables
GiteaBot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// Copyright 2024 The Gitea Authors. All rights reserved. | ||
// SPDX-License-Identifier: MIT | ||
|
||
package structs | ||
|
||
// CreateVariableOption the option when creating variable | ||
// swagger:model | ||
type CreateVariableOption struct { | ||
// Value of the variable to create | ||
// | ||
// required: true | ||
Value string `json:"value" binding:"Required"` | ||
} | ||
|
||
// UpdateVariableOption the option when updating variable | ||
// swagger:model | ||
type UpdateVariableOption struct { | ||
// New name for the variable. If the field is empty, the variable name won't be updated. | ||
Name string `json:"name"` | ||
// Value of the variable to update | ||
// | ||
// required: true | ||
Value string `json:"value" binding:"Required"` | ||
} | ||
|
||
// ActionVariable return value of the query API | ||
// swagger:model | ||
type ActionVariable struct { | ||
// the owner to which the variable belongs | ||
OwnerID int64 `json:"owner_id"` | ||
// the repository to which the variable belongs | ||
RepoID int64 `json:"repo_id"` | ||
// the name of the variable | ||
Name string `json:"name"` | ||
// the value of the variable | ||
Data string `json:"data"` | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.