summaryrefslogtreecommitdiffstats
path: root/routers/api/v1
Commit message (Collapse)AuthorAgeFilesLines
* feat(repo): support search repository by topic name (#4505)Bo-Yi Wu2018-09-131-0/+1
| | | | * feat(repo): support search repository by topic name
* Enforce token on api routes [fixed critical security issue #4357] (#4840)B-OnTheGo2018-09-101-1/+1
|
* allow api to create tags for releases (#4890)Bobonium2018-09-101-4/+0
|
* Slack webhook channel name cannot be empty or just contain an hashtag (#4786)Lanre Adelowo2018-09-101-3/+11
|
* Fixes repo branch endpoint summary (#4893)Lewis Cowles2018-09-091-1/+1
| | | | | | | in browser saw `/repos/{owner}/{repo}/branches/{branch} List a repository's branches` fixed Addresses https://github.com/go-gitea/debian-packaging/pull/1 Fixes https://github.com/go-gitea/gitea#4892
* Add sudo functionality to the API (#4809)zeripath2018-09-061-1/+44
|
* issues api allow pulls and fix #4832 (#4852)Lunny Xiao2018-09-031-1/+9
|
* API /admin/users/{username} missing parameter (#4775)EnricoFerro2018-08-231-0/+6
|
* Disable merging a WIP Pull request (#4529)Julien Tant2018-08-131-1/+1
| | | | | | | | | | | | | | | | | * prevent pull request to be merged when PR is a WIP * add tests * add helper to prepend WIP: in PR title * move default wip prefixes into settings * use configurable WIP prefixes in javascript and default to first one in templates * add documentation * add unit test on pull model Signed-off-by: Julien Tant <julien@craftyx.fr>
* An inactive user shouldn't be able to be added as a collaborator (#4535)Lanre Adelowo2018-08-071-0/+7
| | | | | | | | | | | | | | * an inactive user shouldn't be able to be a collaborator * use translated error message * add active user check when adding a new collaborator via the api * fix translation text * added collaborator test * improvee testcases
* api: repos/search: add parameters to control the sort order (#3964)Allen Wild2018-08-021-0/+47
| | | | | | | | | | | | | | | | The backend SearchRepositoryByName function supports several sort order options, hook these up to the /repos/search API. New parameters for /repos/search: 'sort': alpha, created, updated, size, or id 'order': asc or desc 'sort' defaults to alpha. 'order' defaults to ascending, and is ignored if 'sort' is not specified. The overall default behavior is unchanged (alphabetically ascending). This partially implements issue #3963 Signed-off-by: Allen Wild <allenwild93@gmail.com>
* Swagger.v1.json template (#3572)Piotr Orzechowski2018-07-282-3/+3
| | | | | | * Turn swagger.v1.json into template * Rename ENABLE_SWAGGER_ENDPOINT option to ENABLE_SWAGGER
* Respect email privacy option in user search via API (#4512)Lanre Adelowo2018-07-251-1/+1
| | | | | | * respect user's email privacy option * make email visible to admin irrespective of privacy option
* Added dependencies for issues (#2196) (#2531)kolaente2018-07-172-0/+14
|
* Issue due date api (#3890)kolaente2018-07-164-1/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Implemented basic api endpoint to manage deadlines * Fixed checking for permissions * Updating a deadline from the ui is now entirely done via the api * cleanup * Cosmetics * fixed lint + fmt * Added swagger model definition for deadline response * Updated gitea-sdk * Updated gitea-sdk * More cleanup * Generate swagger json * Merge branch 'master' of https://github.com/go-gitea/gitea into issue-due-date-api # Conflicts: # public/swagger.v1.json * Fixed permission to update a deadline via api * Re-added form to change a deadline * Added client-side validation + not ignore error messages from the api * Added locale for error message * Merge branch 'master' of https://github.com/go-gitea/gitea # Conflicts: # models/issue_comment.go * Proper date validation * Fixed indention * moved css to css file * added documentation for error codes * after merge cleanup * Added swagger description * DO NOTHING BUT TRIGGER THAT F*CKIN CI SO IT PICKS UP THE LATEST COMMIT AS IT SHOULD * DO NOTHING BUT TRIGGER THAT F*CKIN CI SO IT PICKS UP THE LATEST COMMIT AS IT SHOULD * regenerated stylesheets
* Fix query parameter name comment in issue API (#4421)Lauris BH2018-07-121-2/+2
|
* Add ability to delete a token (#4235)techknowlogick2018-07-062-0/+38
| | | Fix #4234
* Fixes repo membership check in API (#4341)Nicolas Da Mutten2018-07-051-1/+1
| | | Untested, since I can't compile (yet).
* Allow administrator to create repository for any organization (#4368)Lauris BH2018-07-051-7/+9
|
* Check that repositories can only be migrated to own user or organizations ↵Lauris BH2018-07-051-8/+15
| | | | | | | | | | (#4366) * Repositories can only migrated to own user or organizations * Add check for organization that user does not belong to * Allow admin to migrate repositories for other users
* Fix milestone appliance and permission checks (#4271)Jonas Franz2018-06-191-9/+17
| | | | | | | | | | | * Fix milestone appliance Fix missing permission check Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix comment * Add Gitea copyright line
* fix CreateIssueCommentOption reference (#4239)stevegt2018-06-151-1/+1
| | | * fixes a warning remaining from #4010 and #4220
* Fix swagger security parts (#4236)Antoine GIRARD2018-06-121-4/+4
|
* Fix swagger errors (#4220)Antoine GIRARD2018-06-1213-51/+158
| | | | | | | | | | Fix all the resting errors to have a valid swagger file. They are still some warnings but nothing blocking. Doing so I found that some request still misses son parameters for some POST/PUT/PATCH request. This means the a client generated from the swagger file will not work completely. Fix #4088 by activating validation in drone Should fix #4010.
* swagger: add 'required: true' for params in URL (#4097)stevegt2018-06-022-0/+2
| | | | | | | | * Partial fix for #4010 Swagger validation needs 'required: true' for parameters that are in the URL path. Signed-off-by: Steve Traugott <stevegt@t7a.org>
* add simple descriptions for file API responses (#4089)stevegt2018-06-011-3/+6
| | | | | | | | | | * Partial fix for #4010 Swagger needs a description field in each swagger:operation response. Adding minimal text for now on the way to getting swagger validate to pass. Many standard swagger client libraries will not work with gitea until validate passes, so prioritizing that over better descriptions for now. Signed-off-by: Steve Traugott <stevegt@t7a.org>
* add simple descriptions for swagger validate (#4087)stevegt2018-05-317-0/+41
| | | | | | | | | | | * Partial fix for #4010 Swagger needs a comment line above each swagger:response comment -- it uses these to populate the description: fields. Adding minimal text for now on the way to getting swagger validate to pass. Many standard swagger client libraries will not work at all with gitea until validate passes, so prioritizing that over better descriptions for now. Signed-off-by: Steve Traugott <stevegt@t7a.org>
* LDAP Public SSH Keys synchronization (#1844)Magnus Lindvall2018-05-241-1/+1
| | | | | | | | | | | | | | | | | | | * Add LDAP Key Synchronization feature Signed-off-by: Magnus Lindvall <magnus@dnmgns.com> * Add migration: add login source id column for public_key table * Only update keys if needed * Add function to only list pubkey synchronized from ldap * Only list pub ssh keys synchronized from ldap. Do not sort strings as ExistsInSlice does it. * Only get keys belonging to current login source id * Set default login source id to 0 * Some minor cleanup. Add integration tests (updete dep testify)
* Fix some webhooks bugs (#3981)Lunny Xiao2018-05-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | * fix some webhooks bugs * update vendor Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com> * fix test * fix clearlabels * fix pullrequest webhook bug fix #3492 * update release webhook description * remove unused code * fix push webhook in pull request * small changes
* Add more webhooks support and refactor webhook templates directory (#3929)Lunny Xiao2018-05-162-7/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | * add more webhook support * move hooks templates to standalone dir and add more webhooks ui * fix tests * update vendor checksum * add more webhook support * move hooks templates to standalone dir and add more webhooks ui * fix tests * update vendor checksum * update vendor Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com> * load attributes when created release * update comparsion doc
* Multiple assignees (#3705)kolaente2018-05-092-73/+65
|
* fix wrong issue endpoints in swagger doc (#3914)David Schneiderbauer2018-05-082-5/+5
|
* Issue due date (#3794)kolaente2018-05-012-14/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
* API endpoint for testing webhook (#3550)Ethan Koenig2018-04-294-4/+112
| | | | | | * API endpoint for testing webhook * Empty commit to rerun CI
* don't reset team/repo count when updating team via API (#3831)Morgan Bazalgette2018-04-291-7/+4
| | | fixes #3600
* Add topic support (#3711)Lunny Xiao2018-04-112-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | * add topic models and unit tests * fix comments * fix comment * add the UI to show or add topics for a repo * show topics on repositories list * fix test * don't show manage topics link when no permission * use green basic as topic label * fix topic label color * remove trace content * remove debug function
* refactor: import order. (#3736)Bo-Yi Wu2018-03-2918-31/+36
|
* Added issue search via api (#3612)kolaente2018-03-071-6/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Started implementing issue api search * Implemented issue search via api * Added search to swagger.json * Removed todo * fmt * Added comment to generate swagger json via "generate-swagger" * Simplified search * fmt * Removed unessecary comment * Removed unessecary declaration of the issues-variable * Removed unessecary comment * Removed unessecary comment * Added explanation keyword * Simplified check for empty keyword * corrected check if keyword is empty
* Add Attachment API (#3478)Jonas Franz2018-03-065-5/+350
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
* Rework special link parsing in the post-processing of markup (#3354)Morgan Bazalgette2018-02-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Get rid of autolink * autolink in markdown * Replace email addresses with mailto links * better handling of links * Remove autolink.js from footer * Refactor entire html.go * fix some bugs * Make tests green, move what we can to html_internal_test, various other changes to processor logic * Make markdown tests work again This is just a description to allow me to force push in order to restart the drone build. * Fix failing markdown tests in routers/api/v1/misc * Add license headers, log errors, future-proof <body> * fix formatting
* Populate URL field of API commits (#3546)Ethan Koenig2018-02-204-16/+23
| | | | | | * Populate URL field of API commits * fix orgmode_test
* Add option to enable or disable swagger endpoints (#3502)Piotr Orzechowski2018-02-141-2/+7
|
* Fix API-Endpoint release (#3012)Marc Brückner2018-01-162-3/+6
| | | | | | | | | * Fixes API-Endpoint release (#3005) * Using context.ReferencesGitRepo(); doing the same in the PATCH route. * Add release create, get and update test
* Cleanup models.User.HashPassword (#3334)Kim "BKC" Carlbäcker2018-01-121-2/+1
|
* Handle refactor (#3339)Morgan Bazalgette2018-01-106-10/+10
| | | | | | * Replace all ctx.Handle with ctx.ServerError or ctx.NotFound * Change Handle(403) to NotFound, avoid using macaron's NotFound
* Change EncodePasswd to HashPassword (#3329)Morgan Bazalgette2018-01-081-1/+1
| | | | | | * Change EncodePasswd to HashPassword * Create test+benchmark for HashPassword
* Writable deploy keys (closes #671) (#3225)Vlad Temian2018-01-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add is_writable checkbox to deploy keys interface * Add writable key option to deploy key form * Add support for writable ssh keys in the interface * Rename IsWritable to ReadOnly * Test: create read-only and read-write deploy keys via api * Add DeployKey access mode migration * Update gitea sdk via govendor * Fix deploykey migration * Add unittests for writable deploy keys * Move template text to locale * Remove implicit column update * Remove duplicate locales * Replace ReadOnly field with IsReadOnly method * Fix deploy_keys related integration test * Rename v54 migration with v55 * Fix migration hell
* Add Pull Request merge options - Ignore white-space for conflict checking, ↵Lauris BH2018-01-052-3/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rebase, Squash merge (#3188) * Pull request options migration and UI in settings * Add ignore whitespace functionality * Fix settings if pull requests are disabled * Fix migration transaction * Merge with Rebase functionality * UI changes and related functionality for pull request merging button * Implement squash functionality * Fix rebase merging * Fix pull request merge tests * Add squash and rebase tests * Fix API method to reuse default message functions * Some refactoring and small fixes * Remove more hardcoded values from tests * Remove unneeded check from API method * Fix variable name and comment typo * Fix reset commit count after PR merge
* Fix swagger docs (#3300)Ethan Koenig2018-01-041-7/+7
|
* Fix bugs in issue dashboard stats (#3073)Ethan Koenig2017-12-261-1/+1
|