-
-
Notifications
You must be signed in to change notification settings - Fork 5.9k
feat: api endpoints for projects #28111
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
Draft
dineshsalunke
wants to merge
72
commits into
go-gitea:main
Choose a base branch
from
dineshsalunke:feat/api-projects
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 42 commits
Commits
Show all changes
72 commits
Select commit
Hold shift + click to select a range
4c0ec22
test: add 2 fixtures for project
dineshsalunke 6092b81
refactor: add structs for project
dineshsalunke b6f9d05
feat: api for projects
dineshsalunke b6d45c6
Merge branch 'main' into feat/api-projects
dineshsalunke 922cd13
Merge remote-tracking branch 'upstream/main' into feat/api-projects
dineshsalunke 0b8d198
Merge branch 'feat/api-projects' of https://github.com/dineshsalunke/…
dineshsalunke e0ae281
Merge branch 'main' into feat/api-projects
GiteaBot a0f8dbd
chore: remove unnecessary go lines formatting
dineshsalunke ac39273
Merge branch 'feat/api-projects' of https://github.com/dineshsalunke/…
dineshsalunke df22b6d
chore: remove the goline formatting
dineshsalunke 5bbbade
chore: remove unwanted indentation on the line
dineshsalunke c266568
Merge remote-tracking branch 'upstream/main' into feat/api-projects
dineshsalunke aa32ad7
refactor: update for db find method usage
dineshsalunke 81c3d0c
fix: add missing swagger tags
dineshsalunke 852c0df
chore: fix lint issues
dineshsalunke dbfecce
fix: return error when converting project to api project
dineshsalunke fec855e
chore: fix swagger documentation
dineshsalunke 6238b9e
fix: ignore errors when loading data for converting project to response
dineshsalunke 8819a0a
refactor: use the add token auth method for token in tests
dineshsalunke 3b2943a
test: use the add token auth method for token
dineshsalunke cf17f34
Merge remote-tracking branch 'upstream/main' into feat/api-projects
dineshsalunke 7eebc7c
Merge remote-tracking branch 'upstream/main' into feat/api-projects
dineshsalunke d2fd138
test: use the correct fields for the test case
dineshsalunke 34566ea
Merge branch 'main' into feat/api-projects
denyskon 897c67b
revert formatting changes
denyskon c7440bc
Merge branch 'main' into feat/api-projects
denyskon 065001c
more reverts
denyskon 24babd6
Merge branch 'feat/api-projects' of github.com:dineshsalunke/gitea in…
denyskon 58e56cd
more formatting fixes
denyskon 74043f7
fix project sort test
denyskon fac47d4
Merge remote-tracking branch 'upstream/main' into feat/api-projects
dineshsalunke 4475c4f
actually fix test!
denyskon e751d6c
Merge branch 'feat/api-projects' of github.com:dineshsalunke/gitea in…
denyskon 6a18cbe
Merge branch 'main' into feat/api-projects
denyskon 927da10
chore: swagger doc typo corrections
dineshsalunke 975d98d
chore: remove redundant comment
dineshsalunke d4ea5a5
fix: use the page field from parameters
dineshsalunke 24a302a
Merge branch 'feat/api-projects' of https://github.com/dineshsalunke/…
dineshsalunke c5c41e3
Merge remote-tracking branch 'upstream/main' into feat/api-projects
dineshsalunke 0a0837f
chore: update the swagger file
dineshsalunke 23d9697
Merge branch 'main' into feat/api-projects
denyskon a2a01df
Merge branch 'main' into feat/api-projects
denyskon b931054
Merge remote-tracking branch 'upstream/main' into feat/api-projects
a7aabc5
refactor: add the missing parameter bodies for project
7383e7b
refactor: rename BoardType to TemplateType
016aa72
refactor: add creator property to the project
d067b1d
refactor: add BoardType to TemplateType property
eeca89e
refactor: handle errors when converting to APIProject
20e9c58
Merge remote-tracking branch 'upstream/main' into feat/api-projects
dineshsalunke 185a594
refactor: update the context
dineshsalunke 30027ac
refactor: update the board type enums
dineshsalunke 68ea867
Merge branch 'main' of https://github.com/go-gitea/gitea into feat/ap…
dineshsalunke 596dcc0
refactor: return ApiError instead of Error from projects methods
dineshsalunke fbe7e8e
refactor: create projects method for usr, org and repo
dineshsalunke 20a697e
Fix formatting and swagger
denyskon d0f7900
Merge remote-tracking branch 'upstream/main' into feat/api-projects
denyskon d746668
Merge branch 'main' into feat/api-projects
lunny dd7edfb
refactor: add missing middleware
dineshsalunke 8358eef
refactor: add list projects get method
dineshsalunke ef3fdec
chore: merge upstream
dineshsalunke de2ab05
Merge branch 'main' of https://github.com/go-gitea/gitea into feat/ap…
dineshsalunke c29a6b7
Merge branch 'feat/api-projects' of https://github.com/dineshsalunke/…
dineshsalunke 9c4937f
some renames
lunny 1faa7e8
Merge branch 'feat/api-projects' of github.com:dineshsalunke/gitea in…
lunny 899efca
improvements
lunny 0df053f
add token scope
lunny 19ed830
Fix unit test
lunny 7235f0e
Fix unit test
lunny 5a6a10e
update swagger template
lunny fdf716c
Merge branch 'main' of https://github.com/go-gitea/gitea into feat/ap…
dineshsalunke dc41382
Merge branch 'feat/api-projects' of https://github.com/dineshsalunke/…
dineshsalunke c224fc9
refactor: include the read project scope
dineshsalunke 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
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,43 @@ | ||
// Copyright 2023 The Gitea Authors. All rights reserved. | ||
// SPDX-License-Identifier: MIT | ||
|
||
package structs | ||
|
||
import "time" | ||
|
||
// swagger:model | ||
type NewProjectPayload struct { | ||
// required:true | ||
Title string `json:"title" binding:"Required"` | ||
// required:true | ||
BoardType uint8 `json:"board_type"` | ||
// required:true | ||
CardType uint8 `json:"card_type"` | ||
Description string `json:"description"` | ||
} | ||
|
||
// swagger:model | ||
type UpdateProjectPayload struct { | ||
// required:true | ||
Title string `json:"title" binding:"Required"` | ||
Description string `json:"description"` | ||
} | ||
|
||
// swagger:model | ||
type Project struct { | ||
ID int64 `json:"id"` | ||
Title string `json:"title"` | ||
Description string `json:"description"` | ||
BoardType uint8 `json:"board_type"` | ||
IsClosed bool `json:"is_closed"` | ||
// swagger:strfmt date-time | ||
Created time.Time `json:"created_at"` | ||
// swagger:strfmt date-time | ||
Updated time.Time `json:"updated_at"` | ||
// swagger:strfmt date-time | ||
Closed time.Time `json:"closed_at"` | ||
|
||
Repo *RepositoryMeta `json:"repository"` | ||
Creator *User `json:"creator"` | ||
Owner *User `json:"owner"` | ||
} |
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.