summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* alpine 3.16 (#19797)techknowlogick2022-05-252-4/+4
| | | Co-authored-by: 6543 <6543@obermui.de>
* Prevent loop if there is an error in GetNotificationCount (#19799)zeripath2022-05-251-1/+5
| | | | | | | | | | | | | | | | | | If the context is cancelled `.NotificationUnreadCount` in a template can cause an infinite loop with `ctx.ServerError()` being called, which creates a template that then calls `.NotificationUnreadCount` calling `GetNotificationCount()` with the cancelled context resulting in an error that calls `ctx.ServerError`... and so on... This PR simply stops calling `ctx.ServerError` in the error handler code for `.NotificationUnreadCount` as we have already started rendering and so it is too late to call `ctx.ServerError`. Additionally we skip logging the error if it's a context cancelled error. Fix #19793 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Add 'make tidy' (#19800)silverwind2022-05-242-61/+10
| | | | | Convenience command to run 'go mod tidy'. The compat flag is set to the minimum supported go version instead of min version minus one which is go's default, which eliminated some checksums in go.sum as a result.
* Update document to use FHS `/usr/local/bin/gitea` instead of `/app/...` for ↵wxiaoguang2022-05-244-18/+6
| | | | | | | Docker (#19794) * Update document to use FHS `/usr/local/bin/gitea` instead of `/app/...` in Docker * Update docs/content/doc/installation/with-docker.zh-cn.md
* [skip ci] Updated translations via CrowdinGiteaBot2022-05-241-2/+1
|
* Add the possibility to allow the user to have a favicon which differs from ↵Jan-Eric Schober2022-05-234-12/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the main logo (#18542) * Changed the filename of the favicon SVG This allows the user to have a favicon which differs from the logo. * Added favicon.svg This is needed to accommodate the changes for allowing the user to have a differing logo and favicon * Adjusted page to accommodate what icon is used as favicon * Added functionality to also generate the favicon.svg via generate-images.js * Adjusted the description for the new favicon compatibility Co-authored-by: silverwind <me@silverwind.io> * Updated generate-images.js to generate favicons from a separate favicons.svg file This belongs to PR #18542. * Added description on how custom favicons can be generated * Replaced space indents with tabs * Synced changes with current state of the file * Synced changes with current state of the file Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Lauris BH <lauris@nix.lv>
* [skip ci] Updated translations via CrowdinGiteaBot2022-05-2323-23/+4
|
* [skip ci] Updated licenses and gitignoresGiteaBot2022-05-222-1/+19
|
* Estimate Action Count in Statistics (#19775)zeripath2022-05-213-2/+24
|
* Prevent NPE when cache service is disabled (#19703)zeripath2022-05-213-15/+25
| | | | | | | | | | | | | | The cache service can be disabled - at which point ctx.Cache will be nil and the use of it will cause an NPE. The main part of this PR is that the cache is used for restricting resending of activation mails and without this we cache we cannot restrict this. Whilst this code could be re-considered to use the db and probably should be, I think we can simply disable this code in the case that the cache is disabled. There are also several bug fixes in the /nodeinfo API endpoint. Signed-off-by: Andrew Thornton <art27@cantab.net>
* Detect truncated utf-8 characters at the end of content as still ↵zeripath2022-05-212-1/+164
| | | | | | | | | | | | | | representing utf-8 (#19773) Our character detection algorithm can potentially incorrectly detect utf-8 as iso-8859-x if there is a truncated character at the end of the partially read file. This PR changes the detection algorithm to truncated utf8 characters at the end of the buffer. Fix #19743 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Add silentcodeg to MAINTAINERS (#19771)silentcodeg2022-05-211-0/+1
| | | | | | | | * Add silentcodeg to MAINTAINERS * add missing trailing g to chat nick Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Allows repo search to match against "owner/repo" pattern strings (#19754)Eekle2022-05-212-1/+39
| | | | | | | | | | | * Allows repo search to match against "owner/repo" pattern strings * Gofumpt * Adds test case for "owner/repo" style repo search * With "owner/repo" search terms, prioritise results which match the owner field * Fixes unquoted SQL string in repo search
* Update JS dependencies (#19767)silverwind2022-05-206-1880/+3256
| | | | | | - Update all JS dependencies minus Vue - Tested mermaid, swagger, build Co-authored-by: 6543 <6543@obermui.de>
* Nuke the incorrect permission report on /api/v1/notifications (#19761)zeripath2022-05-201-0/+5
| | | | | | | | | | | | | The permissions created in convertRepo use a minimal perm.AccessModeRead instead of correctly computing the permission for the repository. This incorrect permission is then reported to the user. I do not believe that reporting the permissions is helpful and therefore I propose we simply null these out. The user can check their permissions using a different endpoint. Fix #19759 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Move almost all functions' parameter db.Engine to context.Context (#19748)Lunny Xiao2022-05-20232-2093/+1448
| | | | * Move almost all functions' parameter db.Engine to context.Context * remove some unnecessary wrap functions
* Move org functions (#19753)Lunny Xiao2022-05-205-125/+96
| | | | | * Move org functions * Fix comment
* [doctor] pq: syntax error at or near "." quote user table name (#19765)silentcodeg2022-05-201-2/+2
|
* [doctor] update the help with fix capabilities (#19762)silentcodeg2022-05-201-2/+2
| | | * [doctor] update the help with fix capabilities
* Remove fomantic progress module (#19760)silverwind2022-05-2011-2035/+37
| | | | Replace it with HTML `<progress>` element. The bar won't go green at 100% anymore but I think it's not something that fits stylistically anyways.
* Make Ctrl+Enter (quick submit) work for issue comment and wiki editor (#19729)wxiaoguang2022-05-208-16/+54
| | | | | | | * Make Ctrl+Enter (quick submit) work for issue comment and wiki editor * Remove the required `SubmitReviewForm.Type`, empty type (triggered by quick submit) means "comment" * Merge duplicate code
* Enable packages by default again (as described by docs) (#19746)delvh2022-05-201-1/+1
|
* Replace blue button and label classes with primary (#19763)silverwind2022-05-2061-123/+132
| | | | | | | | | | | | | | | * make blue really blue * replace blue button and label classes with primary * add --color-blue-dark * add light color variants, tweak a few colors * fix colors * add comment Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix org package owner permissions (#19742)KN4CK3R2022-05-191-13/+21
| | | Old code did not respect owner visibility and the organization access calculation was wrong if the user was not a member.
* Update base.go (#19739)Guo Y.K2022-05-191-1/+1
| | | | | | | | use http.StatusTemporaryRedirect(307) when serve avatar directly browser caches 301 redirections, pre-signed s3 url would expire at some later point Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* [doctor] do not update User Stars numbers unless --fix (#19750)silentcodeg2022-05-191-3/+8
|
* Fix incorrect translation key (#19744)delvh2022-05-191-1/+1
| | | Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Improved ref comment link when origin is body/title (#19741)Eekle2022-05-181-1/+2
| | | | | | | * Makes comments in body text/title return the base page URL instead of "" in RefCommentHTMLURL() * Add comment explaining branch Co-authored-by: delvh <dev.lh@web.de>
* [doctor] explain what enable-push-options does (#19740)silentcodeg2022-05-181-1/+1
|
* Add doctor orphan check for orphaned pull requests without an existing base ↵silentcodeg2022-05-181-0/+3
| | | | repo (#19731)
* ContainerRegistry - removed Basic Auth header (#19735)KN4CK3R2022-05-172-5/+1
| | | | | * Removed Basic Auth header. * Fixed test.
* [skip ci] Updated translations via CrowdinGiteaBot2022-05-172-3/+3
|
* Add changelog for v1.16.8 (#19724) (#19730)65432022-05-162-1/+18
| | | | | | | | | | | | | | | * Add changelog for v1.16.8 (#19724) * Add changelog for v1.16.8 Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Gusted <williamzijl7@hotmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> * bump Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Gusted <williamzijl7@hotmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Improve commit list/view on mobile (#19712)Gusted2022-05-163-15/+93
| | | | | - This is a continuation on [the work](https://github.com/go-gitea/gitea/pull/19546) I've done for improving mobile experience on Gitea. - The current behavior of going trough the commits list is horrible, each individual item gets it's own row and thereby isn't quite compact as it should be on mobile. The commit view's header is in a bit better state, it's quite only that content is overlapping each other. - This patch fixes those problems. Each row in the commit list table will actually take a row in the UI. The commit view's header has now a better organized way of placing the information.
* Fix issue overview for teams (#19652)Gusted2022-05-1612-36/+87
| | | | | | | - Don't use hacky solution to limit to the correct RepoID's, instead use current code to handle these limits. The existing code is more correct than the hacky solution. - Resolves #19636 - Add test-case
* Fix nodeinfo caching and prevent NPE if cache non-existent (#19721)zeripath2022-05-161-7/+11
| | | | | Extract from #19703 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Update go-chi/cache to utilize Ping() (#19719)65432022-05-156-30/+15
| | | | | | | * update gitea.com/go-chi/cache -> v0.2.0 * ajust to new interface * refactor
* Disable blank issues (#19717)John Olheiser2022-05-151-1/+1
|
* clarify what session provider 'db' does (#19713)f0x522022-05-162-2/+3
| | | | | | | * clarify what session provider 'db' does * Also update session.PROVIDER in app.example.ini Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* [skip ci] Updated translations via CrowdinGiteaBot2022-05-153-9/+57
|
* Fix duplicate entry error when add team member (#19702)zuzuviewer2022-05-142-0/+12
|
* [Refactor] convert team(s) to apiTeam(s) (#13745)65432022-05-139-98/+110
| | | | | | | * Refactor: teams to api convert * make org load optional * more info in tests
* Use a better OlderThan for DeleteInactiveUsers (#19693)Gusted2022-05-131-1/+1
| | | | | | | | | | | | * Use a better OlderThan for DeleteInactiveUsers - Currently the OlderThan is zero, for instances that enable or run this task this could actually delete just new users that still need to confirm their email. This patch fixes that by setting the default to the `ActiveCodeLives` setting, which corresponds to the amount of time that a user can active their account, thus avoiding the issue of deleting unactivated email users. * Use correct duration
* [skip ci] Updated translations via CrowdinGiteaBot2022-05-132-1/+20
|
* Introduce eslint-plugin-jquery (#19690)silverwind2022-05-123-0/+68
| | | | | | | | Introduce the plugin that allows us to gradually forbid jQuery code. I've enabled all rules that already pass. Next step will be to go through each rule and fix the issues by using native DOM equivalents, which I think can be done in separate PRs, but if prefered I could also start here.
* Use Vue to refactor pull merge UI (#19650)wxiaoguang2022-05-127-218/+206
| | | | | | | | | | | | | | | | | * Use Vue to refactor pull merge UI * add comments * fix comments * small fine tune * fix tests * adopt new pull default messages * clean up Co-authored-by: 6543 <6543@obermui.de>
* [skip ci] Updated translations via CrowdinGiteaBot2022-05-121-14/+14
|
* Fix oauth setting list bug (#19682)Lunny Xiao2022-05-111-1/+1
|
* Delete user related oauth stuff on user deletion too (#19677)65432022-05-113-0/+34
| | | | | * delete user related oauth stuff on user deletion too * extend doctor check-db-consistency
* Move access and repo permission to models/perm/access (#19350)Lunny Xiao2022-05-1172-511/+608
| | | | | * Move access and repo permission to models/perm/access * Remove unnecessary code