summaryrefslogtreecommitdiffstats
path: root/modules/context
Commit message (Collapse)AuthorAgeFilesLines
* [API] on 500 error only show message if gitea in dev mode (#11641) (#11753)65432020-06-031-0/+4
| | | | | | | * add API specific InternalServerError() * return 500 error msg only if not Production mode * rm unnessesary change
* Return json on 500 error from API (#11574) (#11659)65432020-05-281-4/+21
| | | | | | | Backport #11574 add API specific InternalServerError() InternalServerError
* When must change password only show Signout (#11600) (#11637)guillep2k2020-05-271-1/+3
| | | | | | | | | | | | | | When "Must Change Password" simplify the navbar header to only show the signout button as all other links will redirect back. This prevents the notifications icon from showing preventing initialization of the event-source and hence preventing redirect_to being set, however in addition do not set the redirect_to cookie if we are looking at the /user/events page. Fix #11554 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: zeripath <art27@cantab.net>
* api.Context.NotFound(...) should tolerate nil (#11288)zeripath2020-05-051-0/+5
| | | | | | | | | | | | | There is an unfortunate signature change with the api.Context NotFound function; whereas the normal modules/context/Context NotFound function requires an error or nil, the api.Context variant will panic with an NPE if a nil is provided. This PR will allow api.Context.NotFound to tolerate a being passed a nil. Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv>
* Allow unauthenticated users to compare (#11240)Kyle Evans2020-05-041-17/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * routers: make /compare route available to unauthenticated users Remove some bits of the compare interface if the user isn't signed in. Notably, they don't need to see the "New Pull Request" button box nor the hidden form that would fail to submit due to the POST request continuing to require proper privileges. Follow-up commits will improve the UI a bit around this, removing some "Pull Request" verbiage in favor of "Compare." * ui: home: show "compare" button for unauthenticated users This change requires pulling in the BaseRepo unconditionally and recording if the pull request is in-fact not allowed (.PullRequestCtx.Allowed). If the user isn't allowed to create a pull request, either because this isn't a fork or same-fork branch PRs aren't allowed, then we'll name the button "Compare" instead of "Pull Request." * ui: branch list: use the new Compare language when available When viewing the branch listing as an unauthenticated user, you'll get "Pull Request" buttons. use the new "Compare" verbiage instead, which matches GitHub behavior when you can't issue a pull request from the branches. Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Fix release counter on API repository info (#10968)65432020-04-061-2/+1
| | | | | | Use the same mechanism as the webpage for calculating the release count Fix #10946
* API add/generalize pagination (#9452)SpaWn2KiLl2020-01-241-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
* Fix wrong permissions check when issues/prs shared operations (#9885)Lunny Xiao2020-01-201-1/+1
| | | | | | | | | | | * Fix wrong permissions check when issues/prs shared operations * move redirect to the last of the function * fix swagger Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv>
* Fix issues/pulls dependencies problems (#9842)Lunny Xiao2020-01-191-2/+2
| | | | | | | | * Fix issues/pulls dependencies problems * fix swagger and api param name * fix js
* Add require signed commit for protected branch (#9708)zeripath2020-01-151-4/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add require signed commit for protected branch * Fix fmt * Make editor show if they will be signed * bugfix * Add basic merge check and better information for CRUD * linting comment * Add descriptors to merge signing * Slight refactor * Slight improvement to appearances * Handle Merge API * manage CRUD API * Move error to error.go * Remove fix to delete.go * prep for merge * need to tolerate \r\n in message * check protected branch before trying to load it * Apply suggestions from code review Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * fix commit-reader Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Add owner_name column for table repository for maintaince reason (#9717)Lunny Xiao2020-01-121-1/+1
| | | | | | | | | | | | | | * Add owner_name column for table repository for maintaince reason * refactor * Fix tests * fix test * fix bug when fork repository Co-authored-by: zeripath <art27@cantab.net>
* Prevent redirect to Host (#9678)zeripath2020-01-091-1/+2
|
* Use Req.URL.RequestURI() to cope with FCGI urls (#9473)zeripath2019-12-242-9/+9
| | | | | * Use Req.URL.RequestURI() to cope with FCGI urls * Add debug logging statement when forbidden in internal API.
* Swagger info corrections (#9441)65432019-12-201-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * use numbers and not http.Status___ enum * fix test * add many missing swagger responses * code format * Deletion Sould return 204 ... * error handling improvements * if special error type ... then add it to swagger too * one smal nit * invalidTopicsError is []string * valid swagger specification 2.0 - if you add responses swagger can tell you if you do it right :+1: * use ctx.InternalServerError * Revert "use numbers and not http.Status___ enum" This reverts commit b1ff386e2418ed6a7f183e756b13277d701278ef. * use http.Status* enum everywhere
* Add /milestones endpoint (#8733)Brad Albright2019-12-151-0/+1
| | | | | Create a /milestones endpoint which basically serves as a dashboard view for milestones, very similar to the /issues or /pulls page. Closes #8232
* Fix nil context user (#9099)John Olheiser2019-11-201-1/+7
| | | Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Team permission to create repository in organization (#8312)David Svantesson2019-11-201-6/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add team permission setting to allow creating repo in organization. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add test case for creating repo when have team creation access. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * build error: should omit comparison to bool constant Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add comment on exported functions * Fix fixture consistency, fix existing unit tests * Fix boolean comparison in xorm query. * addCollaborator and changeCollaborationAccessMode separate steps More clear to use different if-cases. * Create and commit xorm session * fix * Add information of create repo permission in team sidebar * Add migration step * Clarify that repository creator will be administrator. * Fix some things after merge * Fix language text that use html * migrations file * Create repository permission -> Create repositories * fix merge * fix review comments
* Add Close() method to gogitRepository (#8901)zeripath2019-11-132-0/+28
| | | | | | | | | In investigating #7947 it has become clear that the storage component of go-git repositories needs closing. This PR adds this Close function and adds the Close functions as necessary. In TransferOwnership the ctx.Repo.GitRepo is closed if it is open to help prevent the risk of multiple open files. Fixes #7947
* Template Repositories (#8768)John Olheiser2019-11-111-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Start work on templates Signed-off-by: jolheiser <john.olheiser@gmail.com> * Continue work Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix IsTemplate vs IsGenerated Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tabs vs spaces * Tabs vs Spaces * Add templates to API & start adding tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix integration tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Remove unused User Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move template tests to existing repos Signed-off-by: jolheiser <john.olheiser@gmail.com> * Minor re-check updates and cleanup Signed-off-by: jolheiser <john.olheiser@gmail.com> * make fmt Signed-off-by: jolheiser <john.olheiser@gmail.com> * Test cleanup Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix optionalbool Signed-off-by: jolheiser <john.olheiser@gmail.com> * make fmt Signed-off-by: jolheiser <john.olheiser@gmail.com> * Test fixes and icon change Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add new user and repo for tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tests (finally) Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update meta repo with env variables Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move generation to create page Combine with repo create template Modify API search to prioritize owner for repo Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tests and coverage Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix swagger and JS lint Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix API searching for own private repos Signed-off-by: jolheiser <john.olheiser@gmail.com> * Change wording Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix repo search test. User had a private repo that didn't show up Signed-off-by: jolheiser <john.olheiser@gmail.com> * Another search test fix Signed-off-by: jolheiser <john.olheiser@gmail.com> * Clarify git content Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * Feedback updates Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add topics WIP Signed-off-by: jolheiser <john.olheiser@gmail.com> * Finish adding topics Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update locale Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Only view branch or tag if it match refType requested. (#8899)David Svantesson2019-11-111-2/+18
| | | | | | * only view branch or tag if it match refName. * remove pointer in method
* Use AppSubUrl for more redirections (#8647)zeripath2019-10-231-1/+1
| | | | Fix #8461 - fix misspelling of {{AppSubUrl}} and other misspelling in template Fixes /explore and organisation redirection
* Add SubURL to redirect path (#8632)John Olheiser2019-10-221-1/+1
| | | Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Ensure that GitRepo is set on Empty repositories (#8539)zeripath2019-10-161-2/+8
| | | | | | Both issues/new and settings/hooks/git expect `ctx.Repo.GitRepo` to be set. This PR changes the context code to open the GitRepo. Fixes #8538
* upgrade gopkg.in/editorconfig/editorconfig-core-go.v1 (#8501)Colin Arnott2019-10-151-1/+1
| | | | | editorconfig-core-go made breaking api changes and has recently released v2.1.1. This change consumes the new api and fixes up any breaking references.
* Move migrating repository from frontend to backend (#6200)Lunny Xiao2019-10-131-15/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * move migrating to backend * add loading image when migrating and fix tests * fix format * fix lint * add redis task queue support and improve docs * add redis vendor * fix vet * add database migrations and fix app.ini sample * add comments for task section on app.ini.sample * Update models/migrations/v84.go Co-Authored-By: lunny <xiaolunwen@gmail.com> * Update models/repo.go Co-Authored-By: lunny <xiaolunwen@gmail.com> * move migrating to backend * add loading image when migrating and fix tests * fix fmt * add redis task queue support and improve docs * fix fixtures * fix fixtures * fix duplicate function on index.js * fix tests * rename repository statuses * check if repository is being create when SSH request * fix lint * fix template * some improvements * fix template * unified migrate options * fix lint * fix loading page * refactor * When gitea restart, don't restart the running tasks because we may have servel gitea instances, that may break the migration * fix js * Update models/repo.go Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * Update docs/content/doc/advanced/config-cheat-sheet.en-us.md Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * fix tests * rename ErrTaskIsNotExist to ErrTaskDoesNotExist * delete release after add one on tests to make it run happy * fix tests * fix tests * improve codes * fix lint * fix lint * fix migrations
* Do only show teams access for organization repositories, not for personal ↵David Svantesson2019-09-241-0/+1
| | | | | repositories (#8265) Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
* Fix Go 1.13 private repository go get issue (#8112)Lunny Xiao2019-09-062-3/+20
| | | | | | | | | | * Fix Go 1.13 invalid import path creation Signed-off-by: Rutger Broekhoff <rutger@viasalix.nl> * Apply suggested changes from #8100 Signed-off-by: Rutger Broekhoff <rutger@viasalix.nl>
* Use gitea forked macaron (#7933)Tamal Saha2019-08-238-17/+20
| | | Signed-off-by: Tamal Saha <tamal@appscode.com>
* Removed unnecessary conversions (#7557)Christian Muehlhaeuser2019-07-231-1/+1
| | | No need to convert to the same type.
* fix API link header (#7298)Lunny Xiao2019-06-262-7/+85
|
* API error cleanup (#7186)John Olheiser2019-06-121-11/+2
|
* Add golangci (#6418)kolaente2019-06-123-11/+8
|
* Handle insecure and ports in go get (#7041)zeripath2019-05-272-2/+13
| | | | | | * Handle insecure and ports in go get * Fix IsExternalURL for non-standard ports
* Fix org visibility bug when git cloning (#6743)Lunny Xiao2019-04-251-6/+0
| | | | | | | | | | | | | | * 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
* Handle redirects in git clone commands (#6688)James E. Blair2019-04-251-0/+3
| | | | | | | | | | Add support for repo_redirect objects in the git smart http handler so that when a user clones a repo that has been moved or renamed, they are redirected to the new location. This requires that the query string be included in the redirect as well, so that is added. Signed-off-by: James E. Blair <jeblair@redhat.com>
* Trace Logging on Permission Denied & ColorFormat (#6618)zeripath2019-04-221-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add log.ColorFormat and log.ColorFormatted Structs can now implement log.ColorFormatted to provide their own colored format when logged with `%-v` or additional flags. Signed-off-by: Andrew Thornton <art27@cantab.net> * Add basic ColorFormat to repository and user Signed-off-by: Andrew Thornton <art27@cantab.net> * Add basic ColorFormat to access and unit Signed-off-by: Andrew Thornton <art27@cantab.net> * Add ColorFormat to permission and on trace log it Signed-off-by: Andrew Thornton <art27@cantab.net> * Add log.NewColoredIDValue to make ID value coloring consistent Signed-off-by: Andrew Thornton <art27@cantab.net> * formatting changes * Add some better tracing to permission denied for read issues/pulls Signed-off-by: Andrew Thornton <art27@cantab.net> * Add Trace logging on permission denied Signed-off-by: Andrew Thornton <art27@cantab.net> * Remove isTrace() check from deferred func * Adjust repo and allow logging of team * use FormatInt instead of Itoa * Add blank line Signed-off-by: Andrew Thornton <art27@cantab.net> * Update access.go
* Unifies pagination template usage (#6531) (#6533)Mario Lubenka2019-04-202-10/+60
|
* Improve listing performance by using go-git (#6478)Filip Navara2019-04-191-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Use go-git for tree reading and commit info lookup. Signed-off-by: Filip Navara <navara@emclient.com> * Use TreeEntry.IsRegular() instead of ObjectType that was removed. Signed-off-by: Filip Navara <navara@emclient.com> * Use the treePath to optimize commit info search. Signed-off-by: Filip Navara <navara@emclient.com> * Extract the latest commit at treePath along with the other commits. Signed-off-by: Filip Navara <navara@emclient.com> * Fix listing commit info for a directory that was created in one commit and never modified after. Signed-off-by: Filip Navara <navara@emclient.com> * Avoid nearly all external 'git' invocations when doing directory listing (.editorconfig code path is still hit). Signed-off-by: Filip Navara <navara@emclient.com> * Use go-git for reading blobs. Signed-off-by: Filip Navara <navara@emclient.com> * Make SHA1 type alias for plumbing.Hash in go-git. Signed-off-by: Filip Navara <navara@emclient.com> * Make Signature type alias for object.Signature in go-git. Signed-off-by: Filip Navara <navara@emclient.com> * Fix GetCommitsInfo for repository with only one commit. Signed-off-by: Filip Navara <navara@emclient.com> * Fix PGP signature verification. Signed-off-by: Filip Navara <navara@emclient.com> * Fix issues with walking commit graph across merges. Signed-off-by: Filip Navara <navara@emclient.com> * Fix typo in condition. Signed-off-by: Filip Navara <navara@emclient.com> * Speed up loading branch list by keeping the repository reference (and thus all the loaded packfile indexes). Signed-off-by: Filip Navara <navara@emclient.com> * Fix lising submodules. Signed-off-by: Filip Navara <navara@emclient.com> * Fix build Signed-off-by: Filip Navara <navara@emclient.com> * Add back commit cache because of name-rev Signed-off-by: Filip Navara <navara@emclient.com> * Fix tests Signed-off-by: Filip Navara <navara@emclient.com> * Fix code style * Fix spelling * Address PR feedback Signed-off-by: Filip Navara <navara@emclient.com> * Update vendor module list Signed-off-by: Filip Navara <navara@emclient.com> * Fix getting trees by commit id Signed-off-by: Filip Navara <navara@emclient.com> * Fix remaining unit test failures * Fix GetTreeBySHA * Avoid running `git name-rev` if not necessary Signed-off-by: Filip Navara <navara@emclient.com> * Move Branch code to git module * Clean up GPG signature verification and fix it for tagged commits * Address PR feedback (import formatting, copyright headers) * Make blob lookup by SHA working * Update tests to use public API * Allow getting content from any type of object through the blob interface * Change test to actually expect the object content that is in the GIT repository * Change one more test to actually expect the object content that is in the GIT repository * Add comments
* API OTP Context (#6674)techknowlogick2019-04-192-0/+46
| | | | | | | | | | | | | | | | | | | | | | * API OTP Context * Update api.go * token * token * fix per discord * copyright header * remove check for token in OTP * Update auth.go * simplify * Update api.go
* Fixes 4762 - Content API for Creating, Updating, Deleting Files (#6314)Richard Mahn2019-04-171-0/+15
|
* Add API for manipulating Git hooks (#6436)Segev Finer2019-04-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | * Add API for manipulating Git hooks Signed-off-by: Segev Finer <segev@codeocean.com> * Replace code.gitea.io/sdk with PR branch temporarily for CI * Switch back to code.gitea.io/sdk@master * Return 403 instead of 404 on no permission to edit hooks in API * Add tests for Git hooks API * Update models/repo_list_test.go Co-Authored-By: segevfiner <segev208@gmail.com> * Update models/repo_list_test.go Co-Authored-By: segevfiner <segev208@gmail.com> * empty line
* Fix forking an empty repository (#6637)Segev Finer2019-04-151-7/+7
| | | | | Fixes #6633 Signed-off-by: Segev Finer <segev@codeocean.com>
* wrap the ServerError and NotFound and log from the caller (#6550)zeripath2019-04-091-4/+12
|
* Cleaned permission checks for API -> site admin can now do anything (#6483)Vasek Sraier2019-04-081-1/+37
| | | | | | | | | | | | | | * 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>
* Better logging (#6038) (#6095)zeripath2019-04-024-80/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* move code.gitea.io/git to code.gitea.io/gitea/modules/git (#6364)Lunny Xiao2019-03-272-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Updates to API 404 responses (#6077)John Olheiser2019-03-181-0/+29
|
* Clean up various use of escape/unescape functions for URL generation (#6334)mrsdizzie2019-03-183-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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 lang specific font stacks for CJK (#6007)zeripath2019-03-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add lang specific font stacks * Force font changes Signed-off-by: Andrew Thornton <art27@cantab.net> * Fix icons Signed-off-by: Andrew Thornton <art27@cantab.net> * Fix octicons and icons Signed-off-by: Andrew Thornton <art27@cantab.net> * Just override the semantic ui fonts only Signed-off-by: Andrew Thornton <art27@cantab.net> * Missed the headers... override them too * Missed some more semantic ui stuff * Fix PT Sans Signed-off-by: Andrew Thornton <art27@cantab.net> * More changes Signed-off-by: Andrew Thornton <art27@cantab.net> * Squashed commit of the following: commit 7d1679e9079541359869c9e677ba7412bfcc59f3 Author: Mike L <cl.jeremy@qq.com> Date: Wed Mar 13 13:53:49 2019 +0100 Remove missed YaHei leftover from _home.less commit 0079121ea91860a323ed4e5cc1a9c0d490d9cefd Author: Mike L <cl.jeremy@qq.com> Date: Wed Mar 13 12:03:54 2019 +0100 Fix overdone fixes (inherit, :lang) commit 62c919915928ec1db4731d547e95885f91a0618d Author: Mike L <cl.jeremy@qq.com> Date: Wed Mar 13 02:29:10 2019 +0100 Fix elements w/ explicit lang (language chooser) commit b3117587aa2eb8570d60bed583a11ee5565418be Author: Mike L <cl.jeremy@qq.com> Date: Tue Mar 12 20:17:26 2019 +0100 Fix textarea also (to match body) commit 81cedf2c3012c4dd05a7680782b4a98e1b947f67 Author: Mike L <cl.jeremy@qq.com> Date: Tue Mar 12 19:41:39 2019 +0100 Revert css temporarily to fix conflict commit 80ff82797f3203cbeaf866f22e961334e137df89 Author: Mike L <cl.jeremy@qq.com> Date: Tue Mar 12 19:15:30 2019 +0100 Tweak CJK, fix Yu Gothic, more monospace inherits commit 581dceb9a869646c2c486dabb925c88c2680d70c Author: Mike L <cl.jeremy@qq.com> Date: Mon Mar 11 13:09:26 2019 +0100 Add Lato for latin extd. & cyrillic, improve CJK * update stylesheet
* Fix #6234 : Check organization visibility before everything else (#6235)Zsombor2019-03-051-0/+11
| | | | | | * Fix #6234 : Check organization visibility before everything else * Ensure that Owner is available in the Repo