Commit Graph

205 Commits (2cf80f4b1884e3d52ed9c7b83818b42e22e1d7ec)

Author SHA1 Message Date
Ethan Koenig a5f28a4544 gofmt ()
Antoine GIRARD 3edb0c5894 Generate swagger json ()
- Generate swagger.json into public/
- Add swagger-ui auto-installation
- Add footer link to local swagger-ui
- Add /swagger url for using app url.
- Fix Swagger-UI version via git tag
Lunny Xiao 0308d44a16 fix and improve integration test ()
Lunny Xiao 61b08b5c01 bug fixed for API to get user's repos ()
* bug fixed for API to get user's repos

* add tests and fix another place

* test user2 since user1 has no repos
Kim "BKC" Carlbäcker 4bea219128 Status-API ()
Jonas f995bcc87a Add repo mirror sync API endpoint ()
* API: Add repo mirror sync

* Correct error message

* Change http status to 200
Antoine GIRARD cf91cfb993 Migrate WatchInfo struct to api ()
* Remove WatchInfo and link to api struct

* Add vendor temporary update

* Return to gitea vendor source
Lunny Xiao cf6699fb4f fix gpg API panic when no verification ()
* fix gpg API panic when no verification

* fix if condition
Antoine GIRARD 14fe9010ae GPG commit validation ()
* GPG commit validation

* Add translation

+ some little fix

* Move hash calc after retrieving of potential key + missing translation

* Add some little test
Antoine GIRARD ca1c3f1926 Implement GPG api ()
* Implement GPG API

* Better handle error

* Apply review recommendation + simplify database operations

* Remove useless comments
Ethan Koenig ec0ae5d50c Refactor and fix incorrect comment ()
Mura Li 848293671b Add basic integration test infrastructure (and new endpoint `/api/v1/version` for testing it) ()
* Implement '/api/v1/version'

* Cleanup and various fixes

* Enhance run.sh

* Add install_test.go

* Add parameter utils.Config for testing handlers

* Re-organize TestVersion.go

* Rename functions

* handling process cleanup properly

* Fix missing function renaming

* Cleanup the 'retry' logic

* Cleanup

* Remove unneeded logging code

* Logging messages tweaking

* Logging message tweaking

* Fix logging messages

* Use 'const' instead of hardwired numbers

* We don't really need retries anymore

* Move constant ServerHttpPort to install_test.go

* Restore mistakenly removed constant

* Add required comments to make the linter happy.

* Fix comments and naming to address linter's complaints

* Detect Gitea executale version automatically

* Remove tests/run.sh, `go test` suffices.

* Make `make build` a prerequisite of `make test`

* Do not sleep before trying

* Speedup the server pinging loop

* Use defined const instead of hardwired numbers

* Remove redundant error handling

* Use a dedicated target for running code.gitea.io/tests

* Do not make 'test' depend on 'build' target

* Rectify the excluded package list

* Remove redundant 'exit 1'

* Change the API to allow passing test.T to test handlers

* Make testing.T an embedded field

* Use assert.Equal to comparing results

* Add copyright info

* Parametrized logging output

* Use tmpdir instead

* Eliminate redundant casting

* Remove unneeded variable

* Fix last commit

* Add missing copyright info

* Replace fmt.Fprintf with fmt.Fprint

* rename the xtest to integration-test

* Use Symlink instead of hard-link for cross-device linking

* Turn debugging logs on

* Follow the existing framework for APIs

* Output logs only if test.v is true

* Re-order import statements

* Enhance the error message

* Fix comment which breaks the linter's rule

* Rename 'integration-test' to 'e2e-test' for saving keystrokes

* Add comment to avoid possible confusion

* Rename tests -> integration-tests

Also change back the Makefile to use `make integration-test`.

* Use tests/integration for now

* tests/integration -> integrations

Slightly flattened directory hierarchy is better.

* Update Makefile accordingly

* Fix a missing change in Makefile

* govendor update code.gitea.io/sdk/gitea

* Fix comment of struct fields

* Fix conditional nonsense

* Fix missing updates regarding version string changes

* Make variable naming more consistent

* Check http status code

* Rectify error messages
Lunny Xiao c1d5983d3e fix panic when get user repos from api ()
awwalker c0f99e8229 API: support /users/:username/repos
clean up

fix arguments

remove repeated token

give admins listing rights
Lunny Xiao a5ac4c64fc refactor api issues load attributes for better performance ()
Ethan Koenig 831ff41754 Fix go vet faults ()
Andrew Boyarshin 0602a44b27 Fix URL handling in the whole markdown module, improve test coverage ()
Amended with string to bool change in API SDK.

Signed-off-by: Andrew Boyarshin <andrew.boyarshin@gmail.com>
Andrew Boyarshin dc8248f8a4 Markdown rendering overhaul ()
* Markdown rendering overhaul

Cleaned up and squashed commits into single one.

Signed-off-by: Andrew Boyarshin <boyarshinand@gmail.com>

* Fix markdown API, add markdown module and API tests, improve code coverage

Signed-off-by: Andrew Boyarshin <boyarshinand@gmail.com>
Bo-Yi Wu 3576e1ee73 fix: trim the whitespaces for the search keyword ()
Ethan Koenig 2f13d31ff0 Fix bug in repos search ()
Ethan Koenig 027591a3a5 Redirects for renamed repos ()
* Redirects for renamed repos

* Remove unused phrase from locales
Lunny Xiao 8a421b1fd7 Add units concept for modulable functions of a repository ()
* Add units concept for modulable functions of a repository

* remove unused comment codes & fix lints and tests

* remove unused comment codes

* use struct config instead of map

* fix lint

* rm wrong files

* fix tests
Bo-Yi Wu a90a215662 feat: Add search bar on user profile page. ()
Ethan Koenig 73d05a51e3 Remove unneeded database loads ()
Remove unnecessary calls to repo.GetOwner() in context handlers
Lunny Xiao 081485ecfd add milestone changed traker on issue view ()
Ethan Koenig 10644d6dd7 Bug fixes and unit tests for models/issue_label ()
Lunny Xiao f94869d2d1 Track labels changed on issue view & resolved ()
* track labels changed on issue view & resolved 

* add missing head comment & sort & fix refresh
Ethan Koenig d1b5498cc0 Use handlers for API authorization ()
Ethan Koenig 833f8b94c2 Search bar for issues/pulls ()
Bwko 7e401b9e39 Fix crash caused by ()
Ethan Koenig 74bbec3bf9 Fix permission bugs in team API ()
Ethan Koenig fcf02e4961 API Endpoints for organization members ()
Philip Couling 64375d875b Attach to release ()
* Moved attachaments POST url from /issues/attachments to /attachments

* Implemented attachment upload on release page

* Implemented downloading attachments on the release page

* Added zip and gzip files to default allowed attachments

* Implemented uploading attachments on edit release

* Renamed UploadIssueAttachment to UploadAttachment
Ethan Koenig 27fcf8d30a Bug fixes for webhook API ()
Ethan Koenig 8422ab542c API endpoint for subscribers ()
Ethan Koenig 1a7fc53c98 API endpoint for stargazers ()
Lunny Xiao 51021585a7 build failed by deleting release by API ()
Ethan Koenig 0c301f7b5c Release API endpoints
Ethan Koenig b75450ad36 API endpoints for forks ()
Ethan Koenig 6f4ba6884c Repo permission bug fixes ()
Ethan Koenig 35d9378e4e Permissions bug fix for webhooks
Ethan Koenig f686a32eac API endpoints for organization teams ()
Ethan Koenig 9fae9f0dc2 Remove redundant query in collaborator API ()
Ethan Koenig 2342df183b API Endpoints for collaborators ()
Ethan Koenig 9847b38518 Organization webhook API endpoints
Bwko a345a03d99 Added sorting to the labels & milestones page ()
Ethan Koenig 8a4161c723 API Endpoint for watching ()
Kim "BKC" Carlbäcker df7fa4e995 issue comment api fix ()
* ListAllInRepo & Delete Issue-Comments

* Moar data in issue-comments
Denis Denisov 380e32e129 Fix random string generator ()
* Remove unused custom-alphabet feature of random string generator

Fix random string generator

Random string generator should return error if it fails to read random data via crypto/rand

* Fixes variable (un)initialization mixed assign
Update test GetRandomString
Lunny Xiao b4c794058a fixed vulnerabilities ()