aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Use dedicated draft PR icon when possible (#20303)Gusted2022-07-093-2/+11
| | | | | | | | | | * Use dedicated draft PR icon when possible - Currently the generic pull-request icon is used for draft PR's. This patch changes that by using the dedicated icon for this. - Resolves #20296 * Use draft title
* Update goldmark (#20300)Gusted2022-07-092-3/+3
| | | | | Update goldmark to v1.4.13 to fix a issue with quotes after a empty list item(See https://github.com/yuin/goldmark/issues/313) and downstream issue https://codeberg.org/Codeberg/Community/issues/645
* Do not create empty ".ssh" directory when loading config (#20289)wxiaoguang2022-07-091-3/+1
| | | | | | Creating the directory automatically is not correct. In other places for ssh key writing (RewriteAllPrincipalKeys / appendAuthorizedKeysToFile, etc), the directory will still be created when updating the keys. This PR will resolve the confusing and annoying problem: the dummy and empty ".ssh" directory in new git home.
* Implement sync push mirror on commit (#19411)Chongyi Zheng2022-07-0812-98/+208
| | | | | | | | | Support synchronizing with the push mirrors whenever new commits are pushed or synced from pull mirror. Related Issues: #18220 Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Use git.HOME_PATH for Git HOME directory (#20114)wxiaoguang2022-07-088-27/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add git.HOME_PATH * add legacy file check * Apply suggestions from code review Co-authored-by: zeripath <art27@cantab.net> * pass env GNUPGHOME to git command, move the existing .gitconfig to new home, make the fix for 1.17rc more clear. * set git.HOME_PATH for docker images to default HOME * Revert "set git.HOME_PATH for docker images to default HOME" This reverts commit f120101ddc267cef74e4f4b92c783d5fc8e275a1. * force Gitea to use a stable GNUPGHOME directory * extra check to ensure only process dir or symlink for legacy files * refactor variable name * The legacy dir check (for 1.17-rc1) could be removed with 1.18 release, since users should have upgraded from 1.17-rc to 1.17-stable * Update modules/git/git.go Co-authored-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com> * remove initFixGitHome117rc * Update git.go * Update docs/content/doc/advanced/config-cheat-sheet.en-us.md Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Add tooltip to repo icons in explore page (#20241)Baoshuo Ren2022-07-071-2/+2
| | | | | * Add label to repo icons in explore page Co-authored-by: silverwind <me@silverwind.io>
* Fix NPE when using non-numeric (#20277)Gusted2022-07-071-2/+3
| | | | | | - This code is only valid when `refNumeric` exist(otherwise we didn't find such numeric PR and can skip that check) and give a free-pas to the "BEFORE" check when `ref` is nil. - Resolves #20109
* Modify milestone search keywords to be case insensitive (#20266)Tyrone Yeh2022-07-061-1/+1
| | | Milestone search keywords are now sensitive, this modification is changed to insensitive
* Fix toolip on mobile notification bell (#20270)zeripath2022-07-061-1/+1
| | | | | | | | Unfortunately there is a bug in #20108 where the translation call was not updated to use `.locale` from `.i18n`. This PR updates the template to use `.locale`. Signed-off-by: Andrew Thornton <art27@cantab.net>
* Allow RSA 2047 bit keys (#20272)zeripath2022-07-063-3/+3
| | | | | | | | | Unfortunately it appears that 2048 bit RSA keys can occasionally be created in such a way that they appear to have 2047 bit length. This PR simply changes our defaults to allow these. Fix #20249 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Refix notification bell placement (#20251)zeripath2022-07-062-3/+3
| | | | | | | | | | | | | | | The use of `m-4 text black` for the notification bell results in this icon being shifted upwards. Instead we should use the `item` class but adjust `not-mobile` and `mobile-only` to make their `display: none` settings `!important`. (As an aside: This is probably one of the only times we should use `!important` in our less files and the rest should be avoided or removed.) Ref #20069 Revert #20236 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Bump mermaid from 9.1.1 to 9.1.2 (#20256)dependabot[bot]2022-07-062-16/+16
| | | | | | | | | | | | | | | | Bumps [mermaid](https://github.com/knsv/mermaid) from 9.1.1 to 9.1.2. - [Release notes](https://github.com/knsv/mermaid/releases) - [Changelog](https://github.com/mermaid-js/mermaid/blob/develop/CHANGELOG.md) - [Commits](https://github.com/knsv/mermaid/compare/9.1.1...9.1.2) --- updated-dependencies: - dependency-name: mermaid dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* EscapeFilter the group dn membership (#20200)zeripath2022-07-051-1/+1
| | | | | | | | | The uid provided to the group filter must be properly escaped using the provided ldap.EscapeFilter function. Fix #20181 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Only show Followers that current user can access (#20220)zeripath2022-07-053-17/+58
| | | | | | | | Users who are following or being followed by a user should only be displayed if the viewing user can see them. Signed-off-by: Andrew Thornton <art27@cantab.net>
* Init popup for new code comment (#20234)Gusted2022-07-053-9/+18
| | | | | | | | | - Initialize the popup for the tooltip inside the new code comment. - This works and is good enough to have this issue fixed for 1.17 Fix #20068
* Bypass Firefox (iOS) bug (#20244)wxiaoguang2022-07-051-0/+5
| | | | | | | | | | * https://github.com/go-gitea/gitea/issues/20240 At the moment, Firefox (iOS) (10x) has an engine bug. See https://github.com/go-gitea/gitea/issues/20240 If a script inserts a newly created (and content changed) element into DOM, there will be a nonsense error event reporting: Script error: line 0, col 0. This PR ignores such nonsense error event. Fix #20240
* Adjust max-widths for the repository file table (#20243)zeripath2022-07-051-2/+22
| | | | | | | | | | | | | | | | | | | | | | | | | Adjust the max-widths for the repository file table to allow for nicer resizing of the names and commit messages. Fix #20040 Signed-off-by: Andrew Thornton <art27@cantab.net> ## Screenshots ## MediaXL ![Screenshot from 2022-07-05 10-22-12](https://user-images.githubusercontent.com/1824502/177295867-7ba8cf60-8f61-4227-892f-e5a0477e4146.png) ## MediaLg ![Screenshot from 2022-07-05 10-24-37](https://user-images.githubusercontent.com/1824502/177296301-e066e206-10f7-4a15-a68b-0f772a95f369.png) ## MediaMd ![Screenshot from 2022-07-05 10-23-03](https://user-images.githubusercontent.com/1824502/177295965-69397649-16ca-456a-bc0c-ed507fcb7f44.png) ## MediaSm ![Screenshot from 2022-07-05 10-26-44](https://user-images.githubusercontent.com/1824502/177296700-ca2a853b-c47b-4592-baf4-4bc08a7e1c9c.png)
* Display full name (#20171)Baekjun Kim2022-07-051-0/+3
| | | | | | | The setting `DEFAULT_SHOW_FULL_NAME` promises to use the user's full name everywhere it can be used. Unfortunately the function `*user_model.User.ShortName()` currently uses the `.Name` instead - but this should also use the `.FullName()`. Therefore we should make `*user_model.User.ShortName()` base its pre-shortened name on the `.FullName()` function.
* Adjust class for mobile has the problem of double small bells (#20236)Tyrone Yeh2022-07-051-1/+1
| | | | | | | | | * Adjust class for mobile has the problem of double small bells * Update templates/base/head_navbar.tmpl Co-authored-by: Gusted <williamzijl7@hotmail.com> Co-authored-by: Gusted <williamzijl7@hotmail.com>
* Adjust template for #20069 smallbell (#20108)Tyrone Yeh2022-07-041-4/+15
| | | | | | | | | | | | | | | | | | | * Adjust template for #20069 smallbell * Adjust notification Unread Count variable to global and count bell position with mobile * Adjust bell icon style * Adjust smallbell to middle * Avoid using inline styles * move notificationUnreadCount to a general code block, reduce changed lines * Solved conflicts Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: 6543 <6543@obermui.de>
* Add integration tests for the Gitea migration form (#20121)Aravinth Manivannan2022-07-041-0/+56
| | | | | | | | | * tests: integration tests for the Gitea migration form * use a mix of ` and " instead of backslash https://github.com/go-gitea/gitea/pull/20121#discussion_r906729415 Co-authored-by: Loïc Dachary <loic@dachary.org>
* Allow dev i18n to be more concurrent (#20159)zeripath2022-07-041-74/+168
| | | | | | The recent changes to add live-reloading to the i18n translation files made the i18n code totally non-concurrent when using dev. This will make discovering other concurrency related issues far more difficult. This PR fixes these, adds some more comments to the code and slightly restructures a few functions. Signed-off-by: Andrew Thornton <art27@cantab.net>
* Allow enable LDAP source and disable user sync via CLI (#20206)Steven Kriegler2022-07-042-0/+71
| | | | | | | | | | | | | | | The current `admin auth` CLI for managing authentication source of type LDAP via BindDN and Simple LDAP does not allow enabling the respective source, once disabled via `--not-active`. The same applies to `--synchronize-users` specifially for LDAP via BindDN. These changes add two new flags to LDAP related CLI commands: - `--active` for both LDAP authentication source types - `--disable-synchronize-users` for LDAP via BindDN Signed-off-by: justusbunsi <61625851+justusbunsi@users.noreply.github.com>
* Remove `GO111MODULE` (#20221)Gusted2022-07-041-4/+3
| | | | | - Given we use go1.18 for this and don't rely on the Go 1.11 modules behavior(we use the modern `go run` & `go get` which has the correct behavior by-default).
* Update Bluemonday to v1.0.19 (#20199)zeripath2022-07-012-10/+9
| | | | | | | | | | | The current version of bluemonday is double escaping attributes. This PR updates bluemonday to the version that fixes this. (See: microcosm-cc/bluemonday#143 ) Fix #19860 Signed-off-by: Andrew Thornton art27@cantab.net
* Refix indices on actions table (#20158)zeripath2022-07-015-53/+59
| | | | | | | | | Unforunately the previous PR #20035 created indices that were not helpful for SQLite. This PR adjusts these after testing using the try.gitea.io db. Fix #20129 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Update default allowed attachment types (#20192)silverwind2022-07-013-3/+3
| | | Synced the list to what is allowed on GitHub currently.
* Fix cli command restore-repo: "units" should be splitted to string slice, to ↵wxiaoguang2022-07-013-7/+15
| | | | match the old behavior and match the dump-repo's behavior (#20183)
* [skip ci] Updated translations via Crowdinwxiaoguang2022-07-011-0/+7
|
* Fix `dump-repo` git init, fix wrong error type for NullDownloader (#20182)wxiaoguang2022-07-013-11/+17
| | | | | * Fix `dump-repo` git init * fix wrong error type for NullDownloader
* Check if project has the same repository id with issue when assign project ↵Lunny Xiao2022-06-309-11/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | to issue (#20133) * Check if project has the same repository id with issue when assign project to issue * Check if issue's repository id match project's repository id * Add more permission checking * Remove invalid argument * Fix errors * Add generic check * Remove duplicated check * Return error + add check for new issues * Apply suggestions from code review Co-authored-by: KN4CK3R <admin@oldschoolhack.me> Co-authored-by: Gusted <williamzijl7@hotmail.com> Co-authored-by: KN4CK3R <admin@oldschoolhack.me> Co-authored-by: 6543 <6543@obermui.de>
* [skip ci] Updated translations via Crowdinwxiaoguang2022-06-301-0/+2
|
* [skip ci] Updated translations via Crowdinwxiaoguang2022-06-2912-14/+4
|
* Enable spellcheck for EasyMDE, use contenteditable mode (#19776)wxiaoguang2022-06-296-65/+102
| | | | Enable spellcheck for EasyMDE, use contenteditable mode. Rewrite and refactor the ImagePaste code.
* [skip ci] Updated translations via CrowdinGusted2022-06-2812-0/+12
|
* Add username check to doctor (#20140)Gusted2022-06-271-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | * Add username check to doctor - Add a new breaking change detector to Gitea's doctor, which checks if all users still have a valid username according to Gitea. Given from time-to-time we need to make changes, either due to new routes or due to security, it's for a instance's admin to check if all users still have a valid username. * Fix extra argument * Apply suggestions from code review Co-authored-by: Jimmy Praet <jimmy.praet@telenet.be> * Apply suggestions from code review Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: Jimmy Praet <jimmy.praet@telenet.be> Co-authored-by: John Olheiser <john.olheiser@gmail.com> Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: delvh <dev.lh@web.de>
* Refactor `i18n` to `locale` (#20153)Gusted2022-06-27285-3668/+3668
| | | | | | | | | | | * Refactor `i18n` to `locale` - Currently we're using the `i18n` variable naming for the `locale` struct. This contains locale's specific information and cannot be used for general i18n purpose, therefore refactoring it to `locale` makes more sense. - Ref: https://github.com/go-gitea/gitea/pull/20096#discussion_r906699200 * Update routers/install/install.go
* Remove support for sr-SP (#20155)Gusted2022-06-273-3/+2
| | | | | - The language doesn't have >= 25% translation on crowdin and therefor was automatically removed from Gitea. - Ref: https://github.com/go-gitea/gitea/commit/f91092453ed0269420ab5161b4742a692dd500fe
* Hide notify mail setting ui if not enabled (#20138)Lunny Xiao2022-06-282-0/+3
|
* Fix custom folder name in customization docs (#20148)Jorge Ou2022-06-271-2/+2
|
* Add missing parameter for error in log message (#20144)Gusted2022-06-271-1/+1
| | | | | - Adds a `%v` for the last parameter, `err`. Co-authored-by: John Olheiser <john.olheiser@gmail.com>
* Show scrollbar when necessary (#20142)Gusted2022-06-271-1/+1
| | | | | | | | | - Firefox on Windows will unconditionally show scrollbars when you specify `overflow: scroll`. This is bad behavior, as you don't always need the scrollbar. Changing the scroll value to auto fixes this issue and only shows the scrollbar when necessary. - Resolves #20139 Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Add spacing between the properties of the key (#20145)Gusted2022-06-271-6/+6
| | | Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Remove U2F support (#20141)Gusted2022-06-2620-61/+4
| | | | | | - Completely remove U2F support from 1.18.0, 1.17.0 will be the last release that U2F is somewhat supported. Users who used U2F would already be warned about using U2F for a while now and should hopefully already be migrated. But starting 1.18 definitely remove it.
* Make better use of i18n (#20096)Gusted2022-06-2660-279/+337
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Prototyping * Start work on creating offsets * Modify tests * Start prototyping with actual MPH * Twiddle around * Twiddle around comments * Convert templates * Fix external languages * Fix latest translation * Fix some test * Tidy up code * Use simple map * go mod tidy * Move back to data structure - Uses less memory by creating for each language a map. * Apply suggestions from code review Co-authored-by: delvh <dev.lh@web.de> * Add some comments * Fix tests * Try to fix tests * Use en-US as defacto fallback * Use correct slices * refactor (#4) * Remove TryTr, add log for missing translation key * Refactor i18n - Separate dev and production locale stores. - Allow for live-reloading in dev mode. Co-authored-by: zeripath <art27@cantab.net> * Fix live-reloading & check for errors * Make linter happy * live-reload with periodic check (#5) * Fix tests Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: zeripath <art27@cantab.net>
* Use neutral language in comments and docs (#20135)Gusted2022-06-257-9/+9
| | | - Replace `his/her` to `their`, as it's more neutral language.
* Fix remove file on initial comment (#20127)Gusted2022-06-252-1/+3
| | | | | | | | Store the file uuid(which is returned by Gitea in the upload file response) onto the file object, so it can be used for the remove feature to specify this file. Fix #20115
* Add doctor command to write commit-graphs (#20007)zeripath2022-06-252-0/+79
| | | | | | | | This PR adds a doctor command to write the commit-graphs for the repositories: `gitea doctor --run check-commit-graphs --fix` Signed-off-by: Andrew Thornton <art27@cantab.net>
* Add sitemap support (#18407)Daniil Gentili2022-06-259-2/+257
|
* Use new config options (#20125)Kyle D2022-06-245-11/+11
|