aboutsummaryrefslogtreecommitdiffstats
path: root/routers
Commit message (Collapse)AuthorAgeFilesLines
* Support search operators for commits search (#6479)Mura Li2019-04-121-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Support searching commits with prefix syntax For now, support auther: committer: When more than one prefix is supplied is presented, the result is the union. When different prefixes are supplied, the result is the intersection. For example, "author:alice author:bob" => the result is all commits authored by Alice OR Bob "hello committer:alice" => the result is all commits committed by Alice AND has the keyword 'hello' in the message. Note that there should NOT have any space after the colon(:) of the prefix. For example, "author:bill" => correct "author: bill" => wrong * Remove unneeded logging * Add missing files of test repository * Add missing repo_unit entries to test fixtures * Update test cases * Add tooltip for commits search button * Update tooltip text I have no idea about how to format it with line breaks. * Make the usage example more real * Add a test case * Add new options struct for SearchCommits * Prefer len(s) > 0 over s != "" * Add NewSearchCommitsOptions
* fix bug user search API pagesize didn't obey ExplorePagingNum (#6579)Lunny Xiao2019-04-111-3/+0
|
* Allow admin users to set a repositoires visibility to public, even if ↵Matthias Beckert2019-04-111-2/+2
| | | | | FORCE_PRIVATE is to true (#6541) (#6572) Signed-off-by: Matthias Beckert <beckert.matthias@googlemail.com>
* Delete local branch if it exists (#6497)John Olheiser2019-04-081-0/+6
| | | Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Cleaned permission checks for API -> site admin can now do anything (#6483)Vasek Sraier2019-04-081-29/+40
| | | | | | | | | | | | | | * cleaned permission checks for API -> site admin can now do anything Signed-off-by: Vasek Sraier <git@vakabus.cz> * PR #6483: helper methods moved to context/context.go, added missing return Signed-off-by: Vasek Sraier <git@vakabus.cz> * PR #6483: added documentation to new exported helper functions in context/context.go Signed-off-by: Vasek Sraier <git@vakabus.cz>
* Show last commit status in pull request lists (#6465)Elias Norberg2019-04-022-0/+14
|
* fix upload attachments (#6481)Lunny Xiao2019-04-023-8/+14
| | | | | | | | * fix upload attachments * add migration for new column uploader_id on table attachment * fix imports sequence
* Better logging (#6038) (#6095)zeripath2019-04-0222-71/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Panic don't fatal on create new logger Fixes #5854 Signed-off-by: Andrew Thornton <art27@cantab.net> * partial broken * Update the logging infrastrcture Signed-off-by: Andrew Thornton <art27@cantab.net> * Reset the skip levels for Fatal and Error Signed-off-by: Andrew Thornton <art27@cantab.net> * broken ncsa * More log.Error fixes Signed-off-by: Andrew Thornton <art27@cantab.net> * Remove nal * set log-levels to lowercase * Make console_test test all levels * switch to lowercased levels * OK now working * Fix vetting issues * Fix lint * Fix tests * change default logging to match current gitea * Improve log testing Signed-off-by: Andrew Thornton <art27@cantab.net> * reset error skip levels to 0 * Update documentation and access logger configuration * Redirect the router log back to gitea if redirect macaron log but also allow setting the log level - i.e. TRACE * Fix broken level caching * Refactor the router log * Add Router logger * Add colorizing options * Adjust router colors * Only create logger if they will be used * update app.ini.sample * rename Attribute ColorAttribute * Change from white to green for function * Set fatal/error levels * Restore initial trace logger * Fix Trace arguments in modules/auth/auth.go * Properly handle XORMLogger * Improve admin/config page * fix fmt * Add auto-compression of old logs * Update error log levels * Remove the unnecessary skip argument from Error, Fatal and Critical * Add stacktrace support * Fix tests * Remove x/sync from vendors? * Add stderr option to console logger * Use filepath.ToSlash to protect against Windows in tests * Remove prefixed underscores from names in colors.go * Remove not implemented database logger This was removed from Gogs on 4 Mar 2016 but left in the configuration since then. * Ensure that log paths are relative to ROOT_PATH * use path.Join * rename jsonConfig to logConfig * Rename "config" to "jsonConfig" to make it clearer * Requested changes * Requested changes: XormLogger * Try to color the windows terminal If successful default to colorizing the console logs * fixup * Colorize initially too * update vendor * Colorize logs on default and remove if this is not a colorizing logger * Fix documentation * fix test * Use go-isatty to detect if on windows we are on msys or cygwin * Fix spelling mistake * Add missing vendors * More changes * Rationalise the ANSI writer protection * Adjust colors on advice from @0x5c * Make Flags a comma separated list * Move to use the windows constant for ENABLE_VIRTUAL_TERMINAL_PROCESSING * Ensure matching is done on the non-colored message - to simpify EXPRESSION
* fix bug when user login and want to resend register confirmation email (#6482)Lunny Xiao2019-04-021-1/+1
|
* move code.gitea.io/git to code.gitea.io/gitea/modules/git (#6364)Lunny Xiao2019-03-2723-41/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * move code.gitea.io/git to code.gitea.io/gitea/modules/git * fix imports * fix fmt * fix misspell * remove wrong tests data * fix unit tests * fix tests * fix tests * fix tests * fix tests * fix tests * enable Debug to trace the failure tests * fix tests * fix tests * fix tests * fix tests * fix tests * comment commit count tests since git clone depth is 50 * fix tests * update from code.gitea.io/git * revert change to makefile
* Clean up ref name rules (#6437)mrsdizzie2019-03-261-1/+2
| | | | | | | | | | | | | | | | | * Clean up ref name rules Clean up checks on reference names to better conform to the guideline here: https://git-scm.com/docs/git-check-ref-format This fixes half of #6321 * Update branch create integration test According to: https://git-scm.com/docs/git-check-ref-format And: git check-ref-format "master/feature=test1" This is a valid branch name and we should not be testing for it to fail.
* Fix Hook & HookList in Swagger (#6432)Segev Finer2019-03-261-2/+2
| | | Signed-off-by: Segev Finer <segev@codeocean.com>
* routers/repo/setting: display correct error for invalid mirror interval (#6414)Allen Wild2019-03-251-0/+10
| | | | | | | | | | | Set Err_Interval in the context data so that the mirror interval box is highlighted red as expected. Clear Err_RepoName for the mirror and advanced actions. repo_name is not set by these forms, causing auth.validate() to set the Err_RepoName before SettingsPost is called, which would lead to the repository name box getting erroneously highlighted red. Fixes: https://github.com/go-gitea/gitea/issues/6396
* Updates SDK dep (#6406)Richard Mahn2019-03-221-6/+10
|
* Markdown: enable some more extensions (#6362)Roland Koebler2019-03-211-2/+2
| | | | | | | | | | | | | | * Markdown: enable some more extensions Improve Markdown-rendering by enabling some extensions: - enable definitions lists - enable footnotes - enable header-ids and automatically generate header-ids (for linking to README-sections or creating table-of-contents for larger READMEs) * Markdown: update and exted tests Update and add tests for additionally enabled Markdown-extensions.
* Don't Unescape redirect_to cookie value (#6399)mrsdizzie2019-03-202-6/+5
| | | | | | | redirect_to holds a value that we want to redirect back to after login. This value can be a path with intentonally escaped values and we should not unescape it. Fixes #4475
* Include more variables on admin/config page (#6378)mrsdizzie2019-03-191-0/+16
| | | | | | | | | | Include the current CustomPath location in the admin section and also display GITEA_WORK_DIR and/or GITEA_CUSTOM env var if they are set. Right now there is no easy way to see this information, and if you try and help most users they won't be able to tell you anything about these values -- just that their custom template isn't working, files aren't in the right place, etc... Now you can see all paths and if they were set by ENV or not.
* make sure units of a team are returned (#6379)Lanre Adelowo2019-03-191-0/+5
|
* Implement Default Webhooks (#4299)Russell Aunger2019-03-184-21/+104
| | | | | | | | Partially implement #770. Add "Default Webhooks" page in site admin UI. Persist to the existing webhooks table, but store with RepoID=0 and OrgID=0. Upon repo creation, copy the set of default webhooks into the new repo.
* Updates to API 404 responses (#6077)John Olheiser2019-03-1829-91/+91
|
* Add bio field for user (#6113)techknowlogick2019-03-181-0/+1
| | | | Fix #4339
* Clean up various use of escape/unescape functions for URL generation (#6334)mrsdizzie2019-03-183-14/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Use PathUnescape instead of QueryUnescape when working with branch names Currently branch names with a '+' fail in certain situations because QueryUnescape replaces the + character with a blank space. Using PathUnescape should be better since it is defined as: // PathUnescape is identical to QueryUnescape except that it does not // unescape '+' to ' ' (space). Fixes #6333 * Change error to match new function name * Add new util function PathEscapeSegments This function simply runs PathEscape on each segment of a path without touching the forward slash itself. We want to use this instead of PathEscape/QueryEscape in most cases because a forward slash is a valid name for a branch etc... and we don't want that escaped in a URL. Putting this in new file url.go and also moving a couple similar functions into that file as well. * Use EscapePathSegments where appropriate Replace various uses of EscapePath/EscapeQuery with new EscapePathSegments. Also remove uncessary uses of various escape/unescape functions when the text had already been escaped or was not escaped. * Reformat comment to make drone build happy * Remove no longer used url library * Requested code changes
* Add same changes from issues page to milestone->issues page (#6328)John Olheiser2019-03-152-1/+9
|
* Return 409 when creating repo if it already exists. (#6330)Bogdan Petrea2019-03-151-2/+3
|
* update git vendor to fix wrong release commit id and add migrations (#6224)Lunny Xiao2019-03-111-1/+1
| | | | | | | | | | * update git vendor to fix wrong release commit id and add migrations * fix count * fix migration release * fix tests
* Add support for client basic auth for exchanging access tokens (#6293)Jonas Franz2019-03-111-1/+27
| | | | | | | | * Add support for client basic auth for exchanging access tokens * Improve error messages * Fix tests
* Copyedit docs (#6275)Aidan Fitzgerald2019-03-092-2/+2
|
* Add regenerate secret feature for oauth2 (#6291)Jonas Franz2019-03-092-0/+29
| | | | | | * Add regenerate secret functionality * Fix lint
* Add unit types to repo action URL to correctly show 404 when archived (#6247)John Olheiser2019-03-091-1/+1
| | | Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Integrate OAuth2 Provider (#5378)Jonas Franz2019-03-085-1/+587
|
* add isAdmin to user model (#6231)Lanre Adelowo2019-03-031-0/+1
| | | | | update vendor and add tests fix swagger
* fix display dashboard even if require to change password (#6214)Lunny Xiao2019-02-281-0/+6
| | | | | | * fix display dashboard even if require to change password * fix comments
* Create a repo redirect when transferring ownership (#6210) (#6211)James E. Blair2019-02-281-0/+8
| | | | | | | When transferring ownership of a repo to a different user/org, create a repo redirect that points to the new location in the same way that is done when a repo is renamed. Signed-off-by: James E. Blair <jeblair@redhat.com>
* 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-262-0/+10
| | | | | | | | * fix bug when migrate repository 500 when repo is existed * use 409 but not 422 for error status code when not exist * translation fix
* fix bug user could change private repository to public when force private ↵Lunny Xiao2019-02-221-0/+8
| | | | enabled. (#6156)
* fix bug when update owner team then visit team's repo return 404 (#6119)Lunny Xiao2019-02-221-2/+0
|
* Make repo creation for API similar to UI (#6142)John Olheiser2019-02-211-0/+3
|
* Allow display of LFS stored Readme.md on directory page (#6073) (#6099)zeripath2019-02-211-26/+88
| | | | | | | | | | | | | | | | | | * Fix display of >1Kb LFS text files * Make LFS stored Readme files viewable Signed-off-by: Andrew Thornton <art27@cantab.net> * Slight restructure Signed-off-by: Andrew Thornton <art27@cantab.net> * Slight restructure Signed-off-by: Andrew Thornton <art27@cantab.net> * catch errors and restructure LFS sections
* 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-213-3/+6
| | | | | | | | * refactor issue indexer, add some testing and fix a bug * fix error copyright year on comment header * issues indexer package import keep consistent
* Minor UI tweaks (#5980)John Olheiser2019-02-192-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove all CommitStatus when a repo is deleted Signed-off-by: jolheiser <john.olheiser@gmail.com> * Minor UI tweaks (#5782) Added 'No License' option Added link and octicon change for external issue trackers Reset password now notifies right away if the code is invalid Signed-off-by: jolheiser <john.olheiser@gmail.com> * More UI tweaks More info in PR * Generate stylesheet for arc-green * Make gofmt work * Change PR integration since the button is changed * Rebase * Generate stylesheet * UI updates Made the PR button a "basic" button Vertically centered the issue checkboxes Labels will update only once after modal is closed * Commit to reference related issues Resolves #5782 Resolves #5861 Addresses original question in #5993 * Change the comment wording since PR button is no longer little and green. * Revert changes that made Windows work * Regenerate stylesheet * Regenerate stylesheets * make generate-stylesheets * Update integration again, changed button style Signed-off-by: jolheiser <john.olheiser@gmail.com> * Added ID to PR button Changed integration to use the ID to avoid breaking in the future * Added missing semi-colons * Added back distinction between issue actions and filters (overlooked it before) Moved action button over next to other action dropdowns * Remove extra tab formatting in list.tmpl * Remove more formatting from GoLand * Replace hardcoded "No License" with i18n license helper.
* 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-193-5/+9
|
* Show email if the authenticated user owns the profile page being requested ↵Lanre Adelowo2019-02-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | for (#4981) * Show email if the authenticated user owns the profile page being requested for. Also removed `setting.UI.ShowUserEmail` as it's documentation says it only controls the email setting on the explore page * fix current user check... This prevents a panic as a user must be signed in before ctx.User is called * fix panic in tests * try to fix tests * Update year * Test CI fail * Revert change * User 3 is not allowed to authorize * Set user2 email to be private * Change to user4 in explore page as user2 now has private email option set
* Fix prohibit login check on authorization (#6106)Lunny Xiao2019-02-192-0/+18
| | | | | | | | | | | | * fix bug prohibit login not applied on dashboard * fix tests * fix bug user status leak * fix typo * return after render
* Show private organization for admin, fix #6111 (#6112)Zsombor2019-02-191-0/+1
|
* Implement "conversation lock" for issue comments (#5073)Lanre Adelowo2019-02-184-1/+112
|
* Allow to set organization visibility (public, internal, private) (#1763)Rémy Boulanouar2019-02-188-3/+41
|
* Allow labels to contain emoji (#6063)John Olheiser2019-02-161-0/+1
| | | | | | | | | | | | | | | | | | | * Add emoji to labels Minor cleanup of tribute code in footer.tmpl Signed-off-by: jolheiser <john.olheiser@gmail.com> * Quick find/replace in other i18n files containing label translations Signed-off-by: jolheiser <john.olheiser@gmail.com> * Revert "Quick find/replace in other i18n files containing label translations" This reverts commit ec3e1a3a1775989301bb2c1cd08e8871b317688d. * Add style to overwrite emoji height in labels * Revert Makefile change that makes Windows work