aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api
Commit message (Collapse)AuthorAgeFilesLines
* fix api route (#7346) (#7347)release/v1.8Lunny Xiao2019-07-031-4/+4
|
* SearchRepositoryByName improvements and unification (#6897) (#7002)Lauris BH2019-05-211-36/+13
| | | | | | | | | | | | | | | | | | * SearchRepositoryByName improvements and unification (#6897) * Update tests Co-Authored-By: zeripath <art27@cantab.net> * Update tests Co-Authored-By: zeripath <art27@cantab.net> * Update tests Co-Authored-By: zeripath <art27@cantab.net> * Fix tests
* Fixes #6881 - API users search fix (#6882) (#6885)Richard Mahn2019-05-092-2/+2
|
* Fix 404 when send pull request some situation (#6871) (#6873)Lunny Xiao2019-05-081-3/+22
|
* Fix team edit API panic (#6785)ngourdon2019-04-281-1/+1
| | | | | | * fix team edit API panic * Change user to a member of the owner team
* Fix org visibility bug when git cloning (#6743) (#6762)Lunny Xiao2019-04-261-0/+1
| | | | | | | | | | | | | * fix org visibility bug * fix permission check * add integration tests * fix tests * change test user name for easier maintainance and fix test * fix test git repo name
* Fix team members API (#6714) (#6729)Lunny Xiao2019-04-241-1/+38
|
* [API] Load issue attributes when editing an issue (#6723) (#6725)John Olheiser2019-04-231-0/+6
|
* backport #6674 - API OTP Context (#6676)techknowlogick2019-04-191-3/+8
|
* Return a UserList from /api/v1/admin/users (#6629) (#6642)zeripath2019-04-153-13/+27
|
* Change summary to full message (#6591) (#6592)John Olheiser2019-04-121-1/+1
| | | Signed-off-by: jolheiser <john.olheiser@gmail.com>
* fix bug user search API pagesize didn't obey ExplorePagingNum (#6579) (#6586)Lunny Xiao2019-04-111-3/+0
|
* Fix Hook & HookList in Swagger (#6432) (#6440)Segev Finer2019-03-271-2/+2
| | | Backport from #6432
* make sure units of a team are returned (#6379) (#6381)Lanre Adelowo2019-03-191-0/+5
|
* Return 409 when creating repo if it already exists. (#6330)Bogdan Petrea2019-03-151-2/+3
|
* Copyedit docs (#6275)Aidan Fitzgerald2019-03-092-2/+2
|
* add isAdmin to user model (#6231)Lanre Adelowo2019-03-031-0/+1
| | | | | update vendor and add tests fix swagger
* Adds MustChangePassword to user create/edit API, defaults to true (#6193)John Olheiser2019-02-271-6/+14
| | | Signed-off-by: jolheiser <john.olheiser@gmail.com>
* fix bug when migrate repository 500 when repo is existed (#6188)Lunny Xiao2019-02-261-0/+5
| | | | | | | | * fix bug when migrate repository 500 when repo is existed * use 409 but not 422 for error status code when not exist * translation fix
* Make repo creation for API similar to UI (#6142)John Olheiser2019-02-211-0/+3
|
* Admins can now do unlimited page size user search (listAllUsers & ↵John Olheiser2019-02-211-1/+1
| | | | | listAllOrgs) (#6143) Non-admins will default to 10 page size
* refactor issue indexer, add some testing and fix a bug (#6131)Lunny Xiao2019-02-211-1/+2
| | | | | | | | * refactor issue indexer, add some testing and fix a bug * fix error copyright year on comment header * issues indexer package import keep consistent
* Load Issue attributes for API call (#6122)John Olheiser2019-02-191-1/+1
| | | Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Refactor issue indexer (#5363)Lunny Xiao2019-02-191-2/+1
|
* Implement "conversation lock" for issue comments (#5073)Lanre Adelowo2019-02-181-0/+6
|
* Allow to set organization visibility (public, internal, private) (#1763)Rémy Boulanouar2019-02-182-0/+9
|
* make sure labels are actually returned (#6053)Lanre Adelowo2019-02-131-0/+5
|
* Fix #5799 - swagger for mergePullRequest (#5996)Thomas Loubiou2019-02-082-0/+6
|
* Add API to list tags (#5850)Lunny Xiao2019-02-074-0/+73
| | | | | | | | | | | | | | * Add API to list tags * update dependency gitea sdk vendor * fix swagger generation * fix swagger * add tests * update code.gitea.io/git vendor
* Expose issue stopwatch toggling via API (#5970)Lanre Adelowo2019-02-062-0/+142
|
* Feature - Pagination for git tree API (#5838)Richard Mahn2019-02-062-18/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Feature - Pagination for git tree API * Handles case when page is negative * Does a for loop over the start and end rather than all entries * Removed redundent logic * Adds per_page as a query parameter * Adds DEFAULT_GIT_TREES_PER_PAGE for settings, ran make fmt * Fix typo in cheat-sheet en * Makes page start at 1, generated swagger * Use updates to SDK * Updates to use latest sdk * Updates swagger for tree api * Adds test for GetTreeBySHA * Updates per PR reviews * Updates per PR reviews * Remove file * Formatting * Fix to swagger file * Fix to swagger * Update v1_json.tmpl * Fix to swagger file
* Fix serving of raw wiki files other than .md (#5814)Gabriel Silva Simões2019-02-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix serving of raw wiki files other than .md Closes #4690. Closes #4395. Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com> * Simplify code at routers/repo/wiki.go Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com> * Add more files to user2/repo1.wiki for testing Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com> * Update macaron to v1.3.2 Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com> * Add tests for WikiRaw Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com> * Fix NewResponseWriter usage due to macaron update Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com> * Add raw to reserved wiki names Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com>
* Add label names as filter in issue search api (#5946)Lanre Adelowo2019-02-041-1/+15
|
* Issue 5924 fix compare button (#5929)zeripath2019-02-031-2/+2
| | | | | | | | | | | | * Revert #5877 This unfortunately was not the solution. Signed-off-by: Andrew Thornton <art27@cantab.net> * Change permission check to create pull requests to CanReadIssuesOrPulls Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix ssh deploy and user key constraints (#1357) (#5939)zeripath2019-02-031-0/+2
| | | | | | | | | | | | | | | | 1. A key can either be an ssh user key or a deploy key. It cannot be both. 2. If a key is a user key - it can only be associated with one user. 3. If a key is a deploy key - it can be used in multiple repositories and the permissions it has on those repositories can be different. 4. If a repository is deleted, its deploy keys must be deleted too. We currently don't enforce any of this and multiple repositories access with different permissions doesn't work at all. This PR enforces the following constraints: - [x] You should not be able to add the same user key as another user - [x] You should not be able to add a ssh user key which is being used as a deploy key - [x] You should not be able to add a ssh deploy key which is being used as a user key - [x] If you add an ssh deploy key to another repository you should be able to use it in different modes without losing the ability to use it in the other mode. - [x] If you delete a repository you must delete all its deploy keys. Fix #1357
* Add single commit API support (#5843)Lunny Xiao2019-02-023-0/+129
| | | | * add single commit API support
* don't allow pull requests to be created on an archived repository (#5883)Lanre Adelowo2019-01-301-6/+13
| | | | | | * don't allow pull requests to be created on an archived repository Also disable the "PR" button if the repo is archived * Refuse creating an issue/PR via API calls too
* Fix new release creation API to allow empty target (#5870)Lauris BH2019-01-301-0/+4
| | | | | | | | * Fix new release creation API to allow empty target * Add more test cases * Update swagger
* API: Fix null pointer in attempt to Sudo if not logged in (#5872)zeripath2019-01-281-1/+1
| | | Signed-off-by: Andrew Thornton <art27@cantab.net>
* update swagger for release API pagination (#5841)Lunny Xiao2019-01-251-0/+8
|
* improve the releases api paging (#5831)Lunny Xiao2019-01-241-1/+17
| | | | | | * improve the releases api paging * add max limit on API paging
* Added docs for the tree api (#5834)kolaente2019-01-242-0/+31
| | | | | | | | * Added docs for the tree api * Added missing response definition * Fixed swagger docs
* New API routes added (#5594)Shashvat Kedia2019-01-233-0/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * New API routes added * Comments added * Build fix * swagger_v1_json.tmpl without new line character * Typo fix * Code review changes * Code review changes * Add copyright * Add copyright * Add copyright * Update per @lafriks feedback * Update org.go * Update user.go * Update user.go * make fmt
* Refactor repo.isBare to repo.isEmpty #5629 (#5714)zeripath2019-01-171-1/+1
| | | | | | | | * Refactor repo.isBare to repo.isEmpty #5629 Signed-off-by: Andrew Thornton <art27@cantab.net> * Remove Sync call
* Refactor notification for indexer (#5111)Lunny Xiao2019-01-171-0/+6
| | | | | | * notification for indexer * use NullNotifier as parent struct
* api: Add missing GET teams endpoints (#5382)Harshit Bansal2019-01-162-0/+68
| | | | | | | | | | | | | | | | | | | | * api: Add an endpoint to list a particular member of team. * models: Rename `GetUserTeams()` to `GetUserOrgTeams()` in `org_team` model. `GetUserTeams()` sounds a bit misnomer since it actually returns the teams that user belongs to in a given organization rather than all the teams across all the organization that the user has joined. * models: Add `GetUserTeams()`. Returns all the teams that a user belongs to. * api: Add an endpoint for GET '/user/teams'. A GET request to this endpoint lists all the teams that a user belongs to.
* Issue is not overdue when it is on the same date #5566 (#5568)Rodrigo Villablanca Vásquez2019-01-011-5/+9
| | | | | | | | | | * Due date time of issues and milestones is set to 23:59:59 * Add docs * make gen swagger * fix swagger gen
* Delete organization endpoint added (#5601)Shashvat Kedia2018-12-272-1/+25
| | | | | | | | | | * Delete organization endpoint added * Parameters added in comment * Typo fix * Newline character removed
* Fix route in swagger (#5598)Shashvat Kedia2018-12-261-1/+1
|
* Improve performance of dashboard (#4977)Lunny Xiao2018-12-133-5/+16
|