summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/api.go
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix ignored errors when checking if organization, team member (#3177)Ethan Koenig2017-12-211-2/+8
|
* Delete a user's public key via admin api (closes #3014) (#3059)Vlad Temian2017-12-061-1/+4
| | | | | | | | | | | | | | | | * Delete a user's public key via admin api * Test admin ssh endpoint for creating a new ssh key * Adapt public ssh key test to also test the delete operation * Test that deleting a missing key will result in a 404 * Test that a normal user can't delete another user's ssh key * Make DeletePublicKey return err * Update swagger doc
* Fix comment API paths (#2813)Ethan Koenig2017-11-201-3/+4
|
* Update swagger documentation (#2899)Ethan Koenig2017-11-131-14/+9
| | | | | | | | | | | * Update swagger documentation Add docs for missing endpoints Add documentation for request parameters Make parameter naming consistent Fix response documentation * Restore delete comments
* Fix API raw requests for commits and tags (#2841)Lauris BH2017-11-041-1/+1
|
* Make URL scheme unambiguous (#2408)Ethan Koenig2017-10-301-1/+1
| | | | | | | | | | * Make URL scheme unambiguous Redirect old routes to new routes * Fix redirects to new URL scheme, and update template * Fix branches/_new endpoints, and update integration test
* Move swagger-ui under /api/v1 (#2746)Antoine GIRARD2017-10-211-0/+3
| | | | | | | | | | | | * Move swagger interface under /api/v1 * Update swagger-ui * Add /api/swagger and prepare for multiple api version * Update test links * Fix footer link
* Feature: Timetracking (#2211)Jonas Franz2017-09-121-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Improve swagger doc (#2274)Antoine GIRARD2017-08-211-0/+22
| | | | | | | | | | | | | | | | | | | | * Add swagger comment for adminCreateOrg * Add swagger comment for admin route * add hook swagger doc * Add tags * Add auth * Fix name of responses * Edit name method * Update vendor * make generate-swagger
* EnableUnit() -> UnitEnabled() (#2242)Ethan Koenig2017-08-021-1/+1
|
* fix some bugLunny Xiao2017-07-281-5/+5
|
* API: support '/orgs/:org/repos' (#2047)Aaron Walker2017-07-131-0/+1
| | | * API: support '/orgs/:org/repos'
* Fix repo API bug (#2133)Ethan Koenig2017-07-121-33/+43
| | | Don't require token when not necessary
* Improve org error handling (#2117)Antoine GIRARD2017-07-061-3/+3
| | | | | | | | | | * Improve ErrOrgNotExist type Return new error type Use good error check Use new method to check error Update tests * Fix unchanged method name report
* Fix API for branches with slashes (#2096)Ethan Koenig2017-07-021-1/+1
|
* Separate generate swagger + fix sed os specific (#1791)Antoine GIRARD2017-06-151-4/+0
| | | | | | | | | | | | | | | | | * Separate generate-swagger * Remove go generate rules * Add missing definition replacement + remove use of -i sed flag for compatibility with mac os default sed version. This is a little hacky a better solution could be use. * Use custom SED_INPLACE depending of platform detection * Use SED_INPLACE for swagger-ui also
* Merge pull request #1905 from ethantkoenig/fix/org_api_authAndrey Nering2017-06-071-7/+7
|\ | | | | Require token before checking membership/ownership
| * Require token before checking membership/ownershipEthan Koenig2017-06-071-7/+7
| |
* | A missing / to provide a correct endpointcamlafit2017-06-071-1/+1
|/ | | solve #1899
* Fix change introduce by update of go-swagger. (#1727)Antoine GIRARD2017-06-011-0/+1
|
* Fix 500 for GET /teams/:id endpoints (#1811)Ethan Koenig2017-05-261-1/+1
| | | | | | | | * Fix 500 for GET /teams/:id endpoints * Integration test for GET /team/:id * Clean up integration test
* Generate swagger json (#1402)Antoine GIRARD2017-05-021-0/+25
| | | | | | | - 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
* Status-API (#1332)Kim "BKC" Carlbäcker2017-04-211-0/+7
|
* Add repo mirror sync API endpoint (#1508)Jonas2017-04-191-0/+1
| | | | | | | | * API: Add repo mirror sync * Correct error message * Change http status to 200
* Implement GPG api (#710)Antoine GIRARD2017-03-161-0/+8
| | | | | | | | | | * Implement GPG API * Better handle error * Apply review recommendation + simplify database operations * Remove useless comments
* Refactor and fix incorrect comment (#1247)Ethan Koenig2017-03-151-1/+1
|
* Add basic integration test infrastructure (and new endpoint ↵Mura Li2017-03-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `/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
* API: support /users/:username/reposawwalker2017-02-271-2/+4
| | | | | | | | | | clean up fix arguments remove repeated token give admins listing rights
* Redirects for renamed repos (#807)Ethan Koenig2017-02-051-1/+8
| | | | | | * Redirects for renamed repos * Remove unused phrase from locales
* Add units concept for modulable functions of a repository (#742)Lunny Xiao2017-02-041-1/+1
| | | | | | | | | | | | | | | | * 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
* Remove unneeded database loads (#814)Ethan Koenig2017-02-021-3/+1
| | | Remove unnecessary calls to repo.GetOwner() in context handlers
* Use handlers for API authorization (#723)Ethan Koenig2017-01-261-14/+26
|
* Fix crash caused by #647 (#708)Bwko2017-01-201-1/+1
|
* Fix permission bugs in team API (#647)Ethan Koenig2017-01-201-19/+15
|
* API Endpoints for organization members (#645)Ethan Koenig2017-01-201-0/+10
|
* Bug fixes for webhook API (#650)Ethan Koenig2017-01-141-3/+41
|
* API endpoint for subscribers (#598)Ethan Koenig2017-01-071-0/+1
|
* API endpoint for stargazers (#597)Ethan Koenig2017-01-061-0/+1
|
* Release API endpointsEthan Koenig2017-01-021-0/+7
|
* API endpoints for forks (#509)Ethan Koenig2016-12-311-0/+2
|
* Repo permission bug fixes (#513)Ethan Koenig2016-12-291-5/+3
|
* Permissions bug fix for webhooksEthan Koenig2016-12-281-1/+1
|
* API endpoints for organization teams (#370)Ethan Koenig2016-12-281-0/+7
|
* API Endpoints for collaborators (#375)Ethan Koenig2016-12-261-1/+6
|
* Organization webhook API endpointsEthan Koenig2016-12-251-1/+9
|
* API Endpoint for watching (#191)Ethan Koenig2016-12-241-0/+9
|
* issue comment api fix (#449)Kim "BKC" Carlbäcker2016-12-221-1/+6
| | | | | | * ListAllInRepo & Delete Issue-Comments * Moar data in issue-comments
* [API] Pull Requests (#248)Kim "BKC" Carlbäcker2016-12-021-0/+15
|
* Add undocumented endpoint for /repositories/:idKim "BKC" Carlbäcker2016-12-021-0/+2
|
* API endpoints for starsEthan Koenig2016-11-161-1/+13
|