6543
31beca458f
Fix GetContents(): Dont't ignore Executables ( #11192 )
* Refactor: dont expose help functions
* repofiles GetContents: dont ignore executables
* CI.restart()
6 years ago
6543
087cd9b9bb
make branch parameter optional for /api/v1/repos/{owner}/{repo}/contents/{filepath} ( #11067 )
6 years ago
zeripath
3e3598fa2a
Contents API should return 404 on not exist ( #10323 )
* Return 404 on not exist
* swagger update and use git.IsErrNotExist
* Handle delete too
* Handle delete too x2
* Fix pr 10323 (#3 )
* fix TESTS
* leafe a note for fututre
* placate golangci-lint
Signed-off-by: Andrew Thornton <art27@cantab.net>
* Update integrations/api_repo_file_delete_test.go
Co-Authored-By: 6543 <6543@obermui.de>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
6 years ago
6543
d22db72b53
[API] Extend contents with dates ( #9464 )
* extend CommitTree func
* make sure Date NOT nil
* spell corection
Co-Authored-By: zeripath <art27@cantab.net>
* add TEST
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
6 years ago
6543
0fe99507c3
Swagger info corrections ( #9441 )
* use numbers and not http.Status___ enum
* fix test
* add many missing swagger responses
* code format
* Deletion Sould return 204 ...
* error handling improvements
* if special error type ... then add it to swagger too
* one smal nit
* invalidTopicsError is []string
* valid swagger specification 2.0
- if you add responses swagger can tell you if you do it right 👍
* use ctx.InternalServerError
* Revert "use numbers and not http.Status___ enum"
This reverts commit b1ff386e24 .
* use http.Status* enum everywhere
6 years ago
zeripath
7934fe5925
Add Close() method to gogitRepository ( #8901 )
In investigating #7947 it has become clear that the storage component of go-git repositories needs closing.
This PR adds this Close function and adds the Close functions as necessary.
In TransferOwnership the ctx.Repo.GitRepo is closed if it is open to help prevent the risk of multiple open files.
Fixes #7947
6 years ago
Antoine GIRARD
0cfac4ae99
don't ignore error message ( #8550 )
6 years ago
Colin Arnott
a046a60c1e
upgrade gopkg.in/editorconfig/editorconfig-core-go.v1 ( #8501 )
editorconfig-core-go made breaking api changes and has recently released
v2.1.1. This change consumes the new api and fixes up any breaking
references.
6 years ago
Richard Mahn
c35a88f83a
Fixes #7292 - API File Contents bug ( #7301 )
6 years ago
Richard Mahn
ea3fda55d7
Fixes #7152 - Allow create/update/delete message to be empty, use default message ( #7324 )
* Fixes #7152 - Allow create/update/delete message to be empty, use default message
* Linting fix
* Fix to delete integration tests
6 years ago
Richard Mahn
8b2f7f7d67
Fixes #7023 - API Org Visibility ( #7028 )
7 years ago
Lunny Xiao
45d0e05e14
Move sdk structs to modules/structs ( #6905 )
* move sdk structs to moduels/structs
* fix tests
* fix fmt
* fix swagger
* fix vendor
7 years ago
Richard Mahn
0f5cb632d2
Fixes 4762 - Content API for Creating, Updating, Deleting Files ( #6314 )
7 years ago
Lunny Xiao
f47714c501
move code.gitea.io/git to code.gitea.io/gitea/modules/git ( #6364 )
* move code.gitea.io/git to code.gitea.io/gitea/modules/git
* fix imports
* fix fmt
* fix misspell
* remove wrong tests data
* fix unit tests
* fix tests
* fix tests
* fix tests
* fix tests
* fix tests
* enable Debug to trace the failure tests
* fix tests
* fix tests
* fix tests
* fix tests
* fix tests
* comment commit count tests since git clone depth is 50
* fix tests
* update from code.gitea.io/git
* revert change to makefile
7 years ago
John Olheiser
355c701c7f
Updates to API 404 responses ( #6077 )
7 years ago
zeripath
add9b0c141
Refactor repo.isBare to repo.isEmpty #5629 ( #5714 )
* Refactor repo.isBare to repo.isEmpty #5629
Signed-off-by: Andrew Thornton <art27@cantab.net>
* Remove Sync call
7 years ago
Lunny Xiao
1c80f31f40
Restrict permission check on repositories and fix some problems ( #5314 )
* fix units permission problems
* fix some bugs and merge LoadUnits to repoAssignment
* refactor permission struct and add some copyright heads
* remove unused codes
* fix routes units check
* improve permission check
* add unit tests for permission
* fix typo
* fix tests
* fix some routes
* fix api permission check
* improve permission check
* fix some permission check
* fix tests
* fix tests
* improve some permission check
* fix some permission check
* refactor AccessLevel
* fix bug
* fix tests
* fix tests
* fix tests
* fix AccessLevel
* rename CanAccess
* fix tests
* fix comment
* fix bug
* add missing unit for test repos
* fix bug
* rename some functions
* fix routes check
7 years ago
Antoine GIRARD
00ff25393c
Fix swagger errors ( #4220 )
Fix all the resting errors to have a valid swagger file.
They are still some warnings but nothing blocking.
Doing so I found that some request still misses son parameters for some POST/PUT/PATCH request. This means the a client generated from the swagger file will not work completely.
Fix #4088 by activating validation in drone
Should fix #4010 .
7 years ago
stevegt
8949d0a210
add simple descriptions for file API responses ( #4089 )
* Partial fix for #4010
Swagger needs a description field in each swagger:operation response. Adding
minimal text for now on the way to getting swagger validate to pass. Many
standard swagger client libraries will not work with gitea until validate
passes, so prioritizing that over better descriptions for now.
Signed-off-by: Steve Traugott <stevegt@t7a.org>
8 years ago
Bo-Yi Wu
3bed594722
refactor: import order. ( #3736 )
8 years ago
Ethan Koenig
1df45ea8b0
Update swagger documentation ( #2899 )
* Update swagger documentation
Add docs for missing endpoints
Add documentation for request parameters
Make parameter naming consistent
Fix response documentation
* Restore delete comments
8 years ago
Dennis Keitzel
34d2b1c5e9
Gracefully handle bare repositories on API operations. ( #1932 )
Signed-off-by: Dennis Keitzel <github@pinshot.net>
8 years ago
Lunny Xiao
e134836804
golint fixed for routers ( #208 )
9 years ago
Sandro Santilli
cb1b3cc148
Update import paths from github.com/go-gitea to code.gitea.io ( #135 )
- Update import paths from github.com/go-gitea to code.gitea.io
- Fix import path for travis
See https://docs.travis-ci.com/user/languages/go#Go-Import-Path
9 years ago
Sandro Santilli
3c9693defb
Replace gogits/git-module dependency with go-gitea/git ( #94 )
* Replace gogits/git-module dependency with go-gitea/git
Fixes #92
* Remove git alias for git module import (not needed)
9 years ago
Rémy Boulanouar
9712d5ee89
Change import reference to match gitea instead of gogs ( #37 )
9 years ago
Andrey Nering
9cb849359e
Support Editorconfig on web editor
9 years ago
Unknwon
11540e5abe
Web editor: improve code quality
9 years ago
Unknwon
da092dd05b
Convert all API handers to use *context.APIContext
10 years ago
Unknwon
574a4d69e8
Rename module: middleware -> context
10 years ago
Unknwon
8ac9d9b4c7
rename import path
10 years ago
Unknwon
7c3baef786
move out git module and #1573 send push hook
10 years ago
Unknwon
c6f6031bd5
refactor API routes and some work for #976
10 years ago