summaryrefslogtreecommitdiffstats
path: root/routers
Commit message (Collapse)AuthorAgeFilesLines
* Implement git refs API for listing references (branches, tags and other) (#5354)Lauris BH2018-11-273-0/+133
| | | | | | | | | | | | | | | | * Inital routes to git refs api * Git refs API implementation * Update swagger * Fix copyright * Make swagger happy add basic test * Fix test * Fix test again :)
* Create Progressive Web App (#4730)SohnyBohny2018-11-271-0/+9
| | | | | | | | | | | | | | | | | | | | | | * Create manifest and serviceworker * Create templates and add AppSubUrl * Add JSRenderer * fix ctx type * Add JSRenderer to static.go * Complete adding {{AppSubUrl}} * Add more fonts to urlsToCache * Add 512px and 192px icons * Hardcode font MD5 * Default theme doesn't have a specific CSS file
* show only opened milestones on issues page milestone filter (#5051)Lanre Adelowo2018-11-261-2/+2
| | | | | | | | | | | | | | * show only opened milestones on issues page milestone filter * update Godoc * update Godoc everywhere * update swagger * use false instead of 0 * Add seccond ordering by ID for milestones where no deadline is set
* API: '/orgs/:org/repos': return private repos with read access (#5310) ↵Daniel Balko2018-11-231-7/+9
| | | | | (#3829) (#5383) Signed-off-by: Daniel Balko <inxonic+github@gmail.com>
* Show review summary in pull requests (#5132)kolaente2018-11-221-0/+6
|
* add api for user to create org (#5268)Lunny Xiao2018-11-202-0/+53
| | | | | | | | | | | | | | | | * add api for user to create org * remove unused blank line on the swagger file end * fix create and add test * fix tests * fix routes of create org API * fix bug * add copyright heads
* Add raw blob endpoint to get objects by SHA ID (#5334)Peter Hoffmann2018-11-182-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Add raw blob endpoint This should make it possible to download raw blobs directly from /:repo/:username/raw/blob/:sha1 URLs. * fix: Make it work * As an SHA-ID is no path getRefNameFromPath can't be used to verify file specifying parameter * added relevant change in go-gitea/git #132 Signed-off-by: Berengar W. Lehr <Berengar.Lehr@kompetenztest.de> * Update Gopkg.lock Can't update all vendors due to errors Signed-off-by: Berengar W. Lehr <Berengar.Lehr@kompetenztest.de> * style: Add Gitea copyright header * feat: Added integration test for /repo/u/r/raw/blob * fix: correct year in copyright header
* added the ability to set labels on the "edit pull request" api (#5347)Lucien Kerl2018-11-161-0/+12
| | | Signed-off-by: Lucien Kerl <lucien.kerl@wuerth-it.com>
* Block registration based on email domain (#5157)Lanre Adelowo2018-11-141-0/+5
| | | * implement email domain whitelist
* Fix create team, update team missing units (#5188)Lunny Xiao2018-11-102-0/+28
|
* Add option to disable automatic mirror syncing. (#5242)Jonas Bröms2018-11-081-2/+6
| | | Setting the interval to 0 will disable to automatic syncing.
* Prometheus endpoint (#5256)Stanislav2018-11-042-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | * Add prometheus collector and route * dep ensure -add github.com/prometheus/client_golang/prometheus * dep ensure -update github.com/golang/protobuf * add metrics to reserved usernames * add comment head in metrics package * fix style imports * add metrics settings * add bearer token check * mapping metrics configs * fix lint * update config cheat sheet * update conf sample, typo fix
* Fix #5226 by adding CSRF checking to api reqToken and add CSRF to the POST ↵zeripath2018-11-031-4/+8
| | | | | | | | | | header for deadline (#5250) * Add CSRF checking to reqToken and place CSRF in the post for deadline creation Fixes #5226, #5249 * /api/v1/admin/users routes should have reqToken middleware
* Keys API changes (#4960)zeripath2018-10-313-14/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add private information to the deploy keys api This commit adds more information to the deploy keys to allow for back reference in to the main keys list. It also adds information about the repository that the key is referring to. Signed-off-by: Andrew Thornton <art27@cantab.net> * Add private information to the user keys API This adjusts the keys API to give out private information to user keys if the current user is the owner or an admin. Signed-off-by: Andrew Thornton <art27@cantab.net> * Add ability to search keys by fingerprint This commit adds the functionality to search ssh-keys by fingerprint of the ssh-key. Deploy keys per repository can also be searched. There is no current clear API point to allow search of all deploy keys by fingerprint or keyID. Signed-off-by: Andrew Thornton <art27@cantab.net> * Add integration test
* Add AutoHead functionality. (#5186)zeripath2018-10-301-0/+1
| | | Fixes #5153
* Make gitea serv use api/internal (#4886)Antoine GIRARD2018-10-302-5/+137
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Start to move to internal/private * Add GetPublicKeyByID * Add HasDeployKey * Add private.UpdateDeployKeyUpdated * Add private.GetUserByKeyID * Add private.AccessLevel * Add private.CheckUnitUser * Fix mistakes I made * Some cleaning + moving code to separate files * Fix error handling * Remove useless error handling for setup * lint: fix comment on exported func * fix copyright header * Fix order of args
* Serve audio files using HTML5 audio tag (#5221)Jonas Bröms2018-10-301-0/+2
| | | | | | * Serve audio files using HTML5 audio tag * Correct copy paste error
* UX of link account (Step 1) (#5006)AJ ONeal2018-10-281-2/+24
| | | | | | | | | | | | | | * Show either sign up OR sign in * disambiguate fresh start from adding recovery options * use tabs to switch between account link flows * add active to tab body as well * changes as per discussion * handle specific error; fix missing err typo
* Fix to 3819 - Filtering issues by tags on main screen issues (#3824)Rodrigo Villablanca Vásquez2018-10-281-0/+2
| | | | | | | | | | * Fix to 3819 * Changes suggested * Empty line removed * Fix error: non-name opts.Labels on left side of :=
* User action heatmap (#5131)kolaente2018-10-235-0/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Added basic heatmap data * Added extra case for sqlite * Built basic heatmap into user profile * Get contribution data from api & styling * Fixed lint & added extra group by statements for all database types * generated swagger spec * generated swagger spec * generated swagger spec * fixed swagger spec * fmt * Added tests * Added setting to enable/disable user heatmap * Added locale for loading text * Removed UseTiDB * Updated librejs & moment.js * Fixed import order * Fixed heatmap in postgresql * Update docs/content/doc/advanced/config-cheat-sheet.en-us.md Co-Authored-By: kolaente <konrad@kola-entertainments.de> * Added copyright header * Fixed a bug to show the heatmap for the actual user instead of the currently logged in * Added integration test for heatmaps * Added a heatmap on the dashboard * Fixed timestamp parsing * Hide heatmap on mobile * optimized postgresql group by query * Improved sqlite group by statement
* Add comment replies (#5104)Jonas Franz2018-10-221-1/+4
| | | | | | * Add comment replies * Replace reviewID with review.ID
* Fix Swagger JSON autogeneration issues. (#4845)zeripath2018-10-2022-22/+121
| | | | | | | | | | | | | | | | | | | | | * Fix Swagger JSON. Remove unnecessary schema references for the forbidden and empty responses Signed-off-by: Andrew Thornton <art27@cantab.net> * Fix swagger API for CreateAccessToken * Fix admin create org swagger * Fix swagger for adminCreateRepo * More swagger fixes Set int64 format for those which are int64 Some more form fixes * Fix swagger description of GET /repos/{owner}/{repo}/pulls
* Remove check for negative length (#5120)Oleg Kovalov2018-10-202-2/+2
|
* Give user a link to create PR after push (#4716)Julien Tant2018-10-202-0/+86
| | | | | | | | * Give user a link to create PR after push * Forks now create PR in the base repository + make sure PR creation is allowed * fix code style
* Add notification interface and refactor UI notifications (#5085)Lunny Xiao2018-10-186-14/+40
| | | | | | | | * add notification interface and refactor UI notifications * add missing methods on notification interface and notifiy only issue status really changed * implement NotifyPullRequestReview for ui notification
* Add support for search by uid (#4876)zeripath2018-10-181-0/+5
| | | Signed-off-by: Andrew Thornton <art27@cantab.net>
* Disable debug routes unless PPROF is enabled in configuration (#4995)Lauris BH2018-09-291-0/+1
|
* Detect charset and convert non UTF-8 files for display (#4950)Lauris BH2018-09-291-2/+4
| | | | | | | | | | | | | | * Detect charset and convert non UTF-8 files for display * Refactor and move function to correct module * Revert unrelated changes * More unrelated changes * Duplicate content for small text to have better encoding detection * Check if original content is valid before duplicating it
* Update Swagger API to match the return of /users/search (#4847)zeripath2018-09-211-1/+10
| | | Signed-off-by: Andrew Thornton <art27@cantab.net>
* Code review UI improvements and bugfixes (#4682)Lauris BH2018-09-171-2/+12
| | | | | | | | | | | | | | | | * Code review UI improvements * More fixes to dark theme * Style fix * Fix to allow add code review comments only on review files tab * More readability dark style fixes * Fix commenting on deleted files. Fixes #4752 * Fix line blame getting for multiple corner cases
* make sure to catch the right error so it is displayed as an error on the ui ↵Lanre Adelowo2018-09-161-1/+1
| | | | not a 500 (#4945)
* Allow admin toggle forcing a password change for newly created users (#4563)Lanre Adelowo2018-09-132-7/+45
|
* Force user to change password (#4489)Lanre Adelowo2018-09-135-6/+146
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * redirect to login page after successfully activating account * force users to change password if account was created by an admin * force users to change password if account was created by an admin * fixed build * fixed build * fix pending issues with translation and wrong routes * make sure path check is safe * remove unneccessary newline * make sure users that don't have to view the form get redirected * move route to use /settings prefix so as to make sure unauthenticated users can't view the page * update as per @lafriks review * add necessary comment * remove unrelated changes * support redirecting to location the user actually want to go to before being forced to change his/her password * run make fmt * added tests * improve assertions * add assertion * fix copyright year Signed-off-by: Lanre Adelowo <yo@lanre.wtf>
* feat(repo): support search repository by topic name (#4505)Bo-Yi Wu2018-09-133-0/+7
| | | | * feat(repo): support search repository by topic name
* Remove traces of embedded TiDB (#4906)techknowlogick2018-09-111-15/+2
| | | | Fix #3357
* Add file name and branch to page title (#4902)Lanre Adelowo2018-09-101-0/+2
|
* 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-104-5/+61
|
* 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
|
* Make reverse proxy auth optional (#4643)Najib Idrissi2018-08-291-6/+2
| | | | | | | | | | | | | | * Make reverse proxy auth optional If the option ENABLE_REVERSE_PROXY_AUTHENTICATION is enabled, make reverse proxy auth optional, instead of failing if the authentication did not succeed. Fixes #3973 Signed-off-by: Najib Idrissi <najib.idrissi.kaitouni@gmail.com> * Update http.go
* API /admin/users/{username} missing parameter (#4775)EnricoFerro2018-08-231-0/+6
|
* Fixed bug where team with admin privelege type doesn't get any unit attached ↵Lanre Adelowo2018-08-211-2/+3
| | | | to the team (#4719)
* User shouldn't be able to approve or reject his/her own PR (#4729)Lanre Adelowo2018-08-201-2/+22
| | | | | | | | | | | | | | | | * Make sure author cannot reject/approve their own PR * Disable buttons in templates too * Remove unneccessary if check since the switch below catches it * Fix IsOwner check * Update template and remove new template variable * Add alert template and redirect to diff page on review failure * Redirect to files diff as a little update to #4632
* Display error when adding a user to a team twice (#4746)Lanre Adelowo2018-08-191-1/+6
|
* Improve URL validation for external wiki and external issues (#4710)Lauris BH2018-08-151-2/+9
| | | | | | * Improve URL validation for external wiki and external issues * Do not allow also localhost address for external URLs
* Make cookies HttpOnly and obey COOKIE_SECURE flag (#4706)SagePtr2018-08-144-25/+26
|
* Add whitespace handling to PR-comparsion (#4683)nemoinho2018-08-143-4/+22
| | | | | | | | | | | | | | | | | | * Add whitespace handling to PR-comparsion In a PR we have to keep an eye on a lot of different things. But sometimes the bare code is the key-thing we want to care about and just don't want to care about fixed indention on some places. Especially if we follow the pathfinder rule we face a lot of these situations because these changes don't break the code in many languages but improve the readability a lot. So this change introduce a fine graned button to adjust the way how the reviewer want to see whitespace-changes within the code. The possibilities reflect the possibilities from git itself except of the `--ignore-blank-lines` flag because that one is also handled by `-b` and is really rare. Signed-off-by: Felix Nehrke <felix@nehrke.info>