194 Commits (7ed00b6e8d571ab8efc99aa69d545cce609dd900)

Author SHA1 Message Date
Mura Li 848293671b Add basic integration test infrastructure (and new endpoint `/api/v1/version` for testing it) (#741)
* 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
7 years ago
Lunny Xiao c1d5983d3e fix panic when get user repos from api (#1110) 7 years ago
awwalker c0f99e8229 API: support /users/:username/repos
clean up

fix arguments

remove repeated token

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

Signed-off-by: Andrew Boyarshin <andrew.boyarshin@gmail.com>
7 years ago
Andrew Boyarshin dc8248f8a4 Markdown rendering overhaul (#186)
* 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>
7 years ago
Bo-Yi Wu 3576e1ee73 fix: trim the whitespaces for the search keyword (#893) 7 years ago
Ethan Koenig 2f13d31ff0 Fix bug in repos search (#884) 7 years ago
Ethan Koenig 027591a3a5 Redirects for renamed repos (#807)
* Redirects for renamed repos

* Remove unused phrase from locales
8 years ago
Lunny Xiao 8a421b1fd7 Add units concept for modulable functions of a repository (#742)
* 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
8 years ago
Bo-Yi Wu a90a215662 feat: Add search bar on user profile page. (#787) 8 years ago
Ethan Koenig 73d05a51e3 Remove unneeded database loads (#814)
Remove unnecessary calls to repo.GetOwner() in context handlers
8 years ago
Lunny Xiao 081485ecfd add milestone changed traker on issue view (#804) 8 years ago
Ethan Koenig 10644d6dd7 Bug fixes and unit tests for models/issue_label (#802) 8 years ago
Lunny Xiao f94869d2d1 Track labels changed on issue view & resolved #542 (#788)
* track labels changed on issue view & resolved #542

* add missing head comment & sort & fix refresh
8 years ago
Ethan Koenig d1b5498cc0 Use handlers for API authorization (#723) 8 years ago
Ethan Koenig 833f8b94c2 Search bar for issues/pulls (#530) 8 years ago
Bwko 7e401b9e39 Fix crash caused by #647 (#708) 8 years ago
Ethan Koenig 74bbec3bf9 Fix permission bugs in team API (#647) 8 years ago
Ethan Koenig fcf02e4961 API Endpoints for organization members (#645) 8 years ago
Philip Couling 64375d875b Attach to release (#673)
* 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
8 years ago
Ethan Koenig 27fcf8d30a Bug fixes for webhook API (#650) 8 years ago
Ethan Koenig 8422ab542c API endpoint for subscribers (#598) 8 years ago
Ethan Koenig 1a7fc53c98 API endpoint for stargazers (#597) 8 years ago
Lunny Xiao 51021585a7 build failed by deleting release by API (#562) 8 years ago
Ethan Koenig 0c301f7b5c Release API endpoints 8 years ago
Ethan Koenig b75450ad36 API endpoints for forks (#509) 8 years ago
Ethan Koenig 6f4ba6884c Repo permission bug fixes (#513) 8 years ago
Ethan Koenig 35d9378e4e Permissions bug fix for webhooks 8 years ago
Ethan Koenig f686a32eac API endpoints for organization teams (#370) 8 years ago
Ethan Koenig 9fae9f0dc2 Remove redundant query in collaborator API (#516) 8 years ago
Ethan Koenig 2342df183b API Endpoints for collaborators (#375) 8 years ago
Ethan Koenig 9847b38518 Organization webhook API endpoints 8 years ago
Bwko a345a03d99 Added sorting to the labels & milestones page (#199) 8 years ago
Ethan Koenig 8a4161c723 API Endpoint for watching (#191) 8 years ago
Kim "BKC" Carlbäcker df7fa4e995 issue comment api fix (#449)
* ListAllInRepo & Delete Issue-Comments

* Moar data in issue-comments
8 years ago
Denis Denisov 380e32e129 Fix random string generator (#384)
* 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
8 years ago
Lunny Xiao b4c794058a fixed vulnerabilities (#392) 8 years ago
Ethan Koenig 7b5b5178e1 Bug fix for edit-hook API endpoint 8 years ago
Ethan Koenig 04b9a7e7a2 Bug fixes for repo permissions in API
Also move duplicated code into repo.APIFormat(..)
8 years ago
Kim "BKC" Carlbäcker 0f05470cb8 [API] Pull Requests (#248) 8 years ago
Kim "BKC" Carlbäcker e8e0539b45 Linting 8 years ago
Kim "BKC" Carlbäcker e6cfccdd40 GitHub API Compliance (& linting) 8 years ago
Kim "BKC" Carlbäcker 71bb6df75a Add undocumented endpoint for /repositories/:id 8 years ago
Kim "BKC" Carlbäcker 42ec5ce740 Fix breakage from vendor-update 8 years ago
Lunny Xiao ec87a75c00 golint fixed for modules/auth 8 years ago
Lunny Xiao 94da472717 Golint fixed for modules/setting (#262)
* golint fixed for modules/setting

* typo fixed and renamed UNIXSOCKET to UnixSocket
8 years ago
Lunny Xiao faabc76fd6 Golint fixed for modules/context 8 years ago
Lunny Xiao 3917ed45de golint fixed for routers (#208) 8 years ago