Commit graph

196 commits

Author SHA1 Message Date
Antoine GIRARD
ca1c3f1926 Implement GPG api (#710)
* Implement GPG API

* Better handle error

* Apply review recommendation + simplify database operations

* Remove useless comments
2017-03-16 09:27:35 +08:00
Ethan Koenig
ec0ae5d50c Refactor and fix incorrect comment (#1247) 2017-03-15 08:51:46 +08:00
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
2017-03-06 22:13:17 +08:00
Lunny Xiao
c1d5983d3e fix panic when get user repos from api (#1110) 2017-03-03 19:10:46 +08:00
awwalker
c0f99e8229 API: support /users/:username/repos
clean up

fix arguments

remove repeated token

give admins listing rights
2017-02-27 07:46:01 +01:00
Lunny Xiao
a5ac4c64fc refactor api issues load attributes for better performance (#1066) 2017-02-27 08:36:42 +08:00
Ethan Koenig
831ff41754 Fix go vet faults (#1060) 2017-02-26 13:25:35 +08:00
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>
2017-02-24 22:59:56 +08:00
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>
2017-02-14 09:13:59 +08:00
Bo-Yi Wu
3576e1ee73 fix: trim the whitespaces for the search keyword (#893) 2017-02-11 12:00:01 +08:00
Ethan Koenig
2f13d31ff0 Fix bug in repos search (#884) 2017-02-10 09:30:26 +08:00
Ethan Koenig
027591a3a5 Redirects for renamed repos (#807)
* Redirects for renamed repos

* Remove unused phrase from locales
2017-02-05 22:35:03 +08:00
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
2017-02-04 23:53:46 +08:00
Bo-Yi Wu
a90a215662 feat: Add search bar on user profile page. (#787) 2017-02-04 20:20:20 +08:00
Ethan Koenig
73d05a51e3 Remove unneeded database loads (#814)
Remove unnecessary calls to repo.GetOwner() in context handlers
2017-02-02 20:33:56 +08:00
Lunny Xiao
081485ecfd add milestone changed traker on issue view (#804) 2017-02-01 10:36:08 +08:00
Ethan Koenig
10644d6dd7 Bug fixes and unit tests for models/issue_label (#802) 2017-02-01 09:31:35 +08:00
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
2017-01-30 20:46:45 +08:00
Ethan Koenig
d1b5498cc0 Use handlers for API authorization (#723) 2017-01-26 19:54:04 +08:00
Ethan Koenig
833f8b94c2 Search bar for issues/pulls (#530) 2017-01-25 10:43:02 +08:00
Bwko
7e401b9e39 Fix crash caused by #647 (#708) 2017-01-20 21:47:09 +08:00
Ethan Koenig
74bbec3bf9 Fix permission bugs in team API (#647) 2017-01-20 13:16:10 +08:00
Ethan Koenig
fcf02e4961 API Endpoints for organization members (#645) 2017-01-20 10:31:46 +08:00
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
2017-01-15 22:57:00 +08:00
Ethan Koenig
27fcf8d30a Bug fixes for webhook API (#650) 2017-01-14 10:14:48 +08:00
Ethan Koenig
8422ab542c API endpoint for subscribers (#598) 2017-01-07 11:13:02 +08:00
Ethan Koenig
1a7fc53c98 API endpoint for stargazers (#597) 2017-01-06 15:05:09 +08:00
Lunny Xiao
51021585a7 build failed by deleting release by API (#562) 2017-01-03 11:45:56 +08:00
Ethan Koenig
0c301f7b5c Release API endpoints 2017-01-02 00:10:52 +01:00
Ethan Koenig
b75450ad36 API endpoints for forks (#509) 2016-12-31 09:15:45 +08:00
Ethan Koenig
6f4ba6884c Repo permission bug fixes (#513) 2016-12-29 21:17:32 +08:00
Ethan Koenig
35d9378e4e Permissions bug fix for webhooks 2016-12-28 20:12:23 +01:00
Ethan Koenig
f686a32eac API endpoints for organization teams (#370) 2016-12-28 09:36:04 +08:00
Ethan Koenig
9fae9f0dc2 Remove redundant query in collaborator API (#516) 2016-12-28 09:09:54 +08:00
Ethan Koenig
2342df183b API Endpoints for collaborators (#375) 2016-12-26 15:37:01 +08:00
Ethan Koenig
9847b38518 Organization webhook API endpoints 2016-12-25 14:51:57 +01:00
Bwko
a345a03d99 Added sorting to the labels & milestones page (#199) 2016-12-24 22:41:09 +08:00
Ethan Koenig
8a4161c723 API Endpoint for watching (#191) 2016-12-24 09:53:11 +08:00
Kim "BKC" Carlbäcker
df7fa4e995 issue comment api fix (#449)
* ListAllInRepo & Delete Issue-Comments

* Moar data in issue-comments
2016-12-22 16:29:26 +08:00
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
2016-12-20 13:32:02 +01:00
Lunny Xiao
b4c794058a fixed vulnerabilities (#392) 2016-12-15 16:49:06 +08:00
Ethan Koenig
7b5b5178e1 Bug fix for edit-hook API endpoint 2016-12-09 20:11:56 +01:00
Ethan Koenig
04b9a7e7a2 Bug fixes for repo permissions in API
Also move duplicated code into repo.APIFormat(..)
2016-12-07 12:55:24 +01:00
Kim "BKC" Carlbäcker
0f05470cb8 [API] Pull Requests (#248) 2016-12-02 12:10:39 +01:00
Kim "BKC" Carlbäcker
e8e0539b45 Linting 2016-12-02 09:31:44 +01:00
Kim "BKC" Carlbäcker
e6cfccdd40 GitHub API Compliance (& linting) 2016-12-02 09:18:15 +01:00
Kim "BKC" Carlbäcker
71bb6df75a Add undocumented endpoint for /repositories/:id 2016-12-02 09:18:15 +01:00
Kim "BKC" Carlbäcker
42ec5ce740 Fix breakage from vendor-update 2016-11-29 11:50:22 +01:00
Lunny Xiao
ec87a75c00 golint fixed for modules/auth 2016-11-27 21:39:06 +08:00
Lunny Xiao
94da472717 Golint fixed for modules/setting (#262)
* golint fixed for modules/setting

* typo fixed and renamed UNIXSOCKET to UnixSocket
2016-11-27 18:14:25 +08:00