summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Extract linguist code to method (#29168)KN4CK3R2024-02-143-48/+41
|
* bump to use go 1.22 (#29119)techknowlogick2024-02-1413-54/+54
|
* Remove unused `KeyID`. (#29167)KN4CK3R2024-02-144-17/+12
| | | `KeyID` is never set.
* Refactor git version functions and check compatibility (#29155)wxiaoguang2024-02-142-30/+70
| | | | | | | | | | | | Introduce a new function checkGitVersionCompatibility, when the git version can't be used by Gitea, tell the end users to downgrade or upgrade. The refactored functions are related to make the code easier to test. And simplify the comments for "safe.directory" --------- Co-authored-by: delvh <dev.lh@web.de>
* Use ghost user if user was not found (#29161)KN4CK3R2024-02-142-0/+12
| | | Fixes #29159
* Document how the TOC election process works (#29135)delvh2024-02-141-9/+27
| | | | | | This is supposed to prevent a power vacuum so that a problem similar to the 2024 election will not happen again Additionally, update current TOC members from 2023 to 2024.
* Runner tokens are multi use (#29153)Scott Yeager2024-02-142-2/+4
| | | | | Fixes https://github.com/go-gitea/gitea/issues/28911. Co-authored-by: Giteabot <teabot@gitea.io>
* Fix Gitpod logic of setting ROOT_URL (#29162)Yarden Shoham2024-02-131-3/+12
|
* Remove jQuery from the user search form in admin page (#29151)Yarden Shoham2024-02-131-18/+23
| | | | | | | | | - Switched to plain JavaScript - Tested the form and it works as before --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Dont load Review if Comment is CommentTypeReviewRequest (#28551)65432024-02-133-1/+12
| | | | | | RequestReview get deleted on review. So we don't have to try to load them on comments. broken out #28544
* Show `View at this point in history` for every commit (#29122)Tim-Nicas Oelschläger2024-02-131-3/+6
| | | | | | | | | | | | Shows the 'View at this point in history'-link (from #27354) for every commit before: ![image](https://github.com/go-gitea/gitea/assets/72873130/0e5cd763-e099-4bb4-9519-653fe21f85a6) after: ![image](https://github.com/go-gitea/gitea/assets/72873130/2b57346f-51e3-4901-b85e-63a690878939)
* [skip ci] Updated translations via CrowdinGiteaBot2024-02-131-0/+36
|
* Add merge style `fast-forward-only` (#28954)Chris Copeland2024-02-1225-11/+204
| | | | | | | | | With this option, it is possible to require a linear commit history with the following benefits over the next best option `Rebase+fast-forward`: The original commits continue existing, with the original signatures continuing to stay valid instead of being rewritten, there is no merge commit, and reverting commits becomes easier. Closes #24906
* Use Markdown alert syntax for notes in README (#29150)Yarden Shoham2024-02-121-6/+6
| | | | | | - It looks nicer - This syntax is supported on both GitHub and Gitea Signed-off-by: Yarden Shoham <git@yardenshoham.com>
* Refactor issue template parsing and fix API endpoint (#29069)wxiaoguang2024-02-126-30/+87
| | | | | | | | | | | | | | | | The old code `GetTemplatesFromDefaultBranch(...) ([]*api.IssueTemplate, map[string]error)` doesn't really follow Golang's habits, then the second returned value might be misused. For example, the API function `GetIssueTemplates` incorrectly checked the second returned value and always responds 500 error. This PR refactors GetTemplatesFromDefaultBranch to ParseTemplatesFromDefaultBranch and clarifies its behavior, and fixes the API endpoint bug, and adds some tests. And by the way, add proper prefix `X-` for the header generated in `checkDeprecatedAuthMethods`, because non-standard HTTP headers should have `X-` prefix, and it is also consistent with the new code in `GetIssueTemplates`
* [skip ci] Updated translations via CrowdinGiteaBot2024-02-121-0/+2
|
* Update some translations and fix markdown formatting (#29099)me2seeks2024-02-116-23/+193
| | | | | | | | | Update `docs/content/administration/backup-and-restore.zh-cn.md` `docs/content/contributing/guidelines-frontend.zh-cn.md` `docs/content/help/support.zh-cn.md` `docs/content/installation/database-preparation.zh-cn.md` `docs/content/installation/windows-service.zh-cn.md` `docs/content/usage/profile-readme.zh-cn.md` to be consistent with the English document
* Show more settings for empty repositories (#29130)Tim-Nicas Oelschläger2024-02-111-4/+6
| | | | Shows more settings for empty repositories (Fixes #29060)
* Update JS and PY dependencies (#29127)silverwind2024-02-115-153/+127
| | | | | | - Update all excluding `@mcaptcha/vanilla-glue` and `eslint-plugin-array-func` - Remove deprecated and duplicate eslint rule - Tested Monaco, Mermaid and Swagger
* Add alert blocks in markdown (#29121)Yarden Shoham2024-02-104-31/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Follows https://github.com/go-gitea/gitea/pull/21711 - Closes https://github.com/go-gitea/gitea/issues/28316 Implement GitHub's alert blocks markdown feature Docs: - https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#alerts - https://github.com/orgs/community/discussions/16925 ### Before ![image](https://github.com/go-gitea/gitea/assets/20454870/14f7b02a-5de5-4fd0-8437-a055dadb31f2) ### After ![image](https://github.com/go-gitea/gitea/assets/20454870/ed06a869-e545-42f1-bf25-4ba20b1be196) ## :warning: BREAKING :warning: The old syntax no longer works How to migrate: If you used ```md > **Note** My note ``` Switch to ```md > [!NOTE] > My note ``` --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Giteabot <teabot@gitea.io>
* Remove obsolete border-radius on comment content (#29128)silverwind2024-02-101-4/+0
| | | | | | | | | | | | This border-radius is obsolete since we changed the comment rendering a few months ago and it caused incorrect display on blockquotes. Before: <img width="160" alt="Screenshot 2024-02-10 at 18 42 48" src="https://github.com/go-gitea/gitea/assets/115237/ccbf4660-acf9-4268-aad9-1ad49d317a67"> After: <img width="135" alt="Screenshot 2024-02-10 at 18 42 40" src="https://github.com/go-gitea/gitea/assets/115237/6f588e02-3b2a-49ee-b459-81d8068b2f4e">
* Make blockquote border size less aggressive (#29124)Yarden Shoham2024-02-101-1/+1
| | | | | | | | | | | | | | | | | It's too thick I made it match GitHub's size # Before ![image](https://github.com/go-gitea/gitea/assets/20454870/08c05004-acd9-485e-9219-110d93fe1226) # After ![image](https://github.com/go-gitea/gitea/assets/20454870/e2e32b6c-4ba8-488e-9405-95d33f80adf7) Signed-off-by: Yarden Shoham <git@yardenshoham.com>
* Drop "@" from email sender to avoid spam filters (#29109)Gwyneth Morgan2024-02-101-4/+4
| | | | | | | | | | | | | | | | Commit 360b3fd17c (Include username in email headers (#28981), 2024-02-03) adds usernames to the From field of notification emails in the form of `Display Name (@username)`, to prevent spoofing. However, some email filtering software flags "@" in the display name part of the From field as potential spoofing, as you could set the display name part to another email address than the one you are sending from (e.g. `From: "apparent@email-address" <actual@email-address>`). To avoid being flagged, instead send emails from `Display Name (username)`. Closes: #29107 --------- Co-authored-by: Giteabot <teabot@gitea.io>
* [skip ci] Updated translations via CrowdinGiteaBot2024-02-101-2/+154
|
* Disallow duplicate storage paths (#26484)Lunny Xiao2024-02-097-20/+42
| | | | Replace #26380
* add lint-spell-fix to lint-fix (#29111)silverwind2024-02-091-1/+1
| | | | Followup to https://github.com/go-gitea/gitea/pull/29106, fix this oversight.
* Rework spellchecking, add `lint-spell` (#29106)silverwind2024-02-099-24/+36
| | | | | | | | | | | - Use maintained fork https://github.com/golangci/misspell - Rename `mispell-check` to `lint-spell`, add `lint-spell-fix` - Run `lint-spell` in separate actions step - Lint more files, fix discovered issues - Remove inaccurate and outdated info in docs (we do not need GOPATH for tools anymore) Maybe later we can add more spellchecking tools, but I have not found any good ones yet.
* Refactor parseSignatureFromCommitLine (#29054)wxiaoguang2024-02-098-149/+104
| | | | | | | | | | | | Replace #28849. Thanks to @yp05327 for the looking into the problem. Fix #28840 The old behavior of newSignatureFromCommitline is not right. The new parseSignatureFromCommitLine: 1. never fails 2. only accept one format (if there is any other, it could be easily added) And add some tests.
* Display friendly error message (#29105)KN4CK3R2024-02-081-7/+7
| | | | `ctx.Error` only displays the text but `ctx.ServerError` renders the usual error page.
* Use defaults browserslist (#29098)silverwind2024-02-081-3/+1
| | | | | IE usage has dropped enough to not be included in the defaults browserslist anymore as per https://browsersl.ist/#q=defaults, so we can use the defaults now.
* Fix push to create with capitalize repo name (#29090)Lunny Xiao2024-02-081-5/+7
| | | Fix #29073
* Only delete scheduled workflows when needed (#29091)Zettat1232024-02-081-3/+6
| | | | | | Fix #29040 `handleSchedules` should be called only if `DetectWorkflows` should detect schedule workflows
* Remove unnecessary parameter (#29092)Lunny Xiao2024-02-083-11/+5
| | | | The parameter extraConfigs has never been used anywhere. This PR just removed it. It can be taken back once it's needed.
* Move vitest setup file to root (#29097)silverwind2024-02-082-1/+1
| | | | | I'm using this convention in other projects and I think it makes sense for gitea too because the vitest setup file is loaded globally for all tests, not just ones in web_src, so it makes sense to be in the root.
* Fix incorrect link to swift doc and swift package-registry login command ↵CEnnis912024-02-082-2/+3
| | | | | | | | | | | (#29096) Fixes a few mistakes in the Swift package registry documentation. Syntax for the `package-registry login` command can be found [here](https://github.com/apple/swift-package-manager/blob/main/Documentation/PackageRegistry/PackageRegistryUsage.md#registry-authentication). I was not sure the best way to compress all of that information, so I just focused on making sure the incorrect `package-registry set` command was fixed.
* Fix swift packages not resolving (#29095)CEnnis912024-02-081-1/+1
| | | Fixes #29094
* Fix missing link on outgoing new release notifications (#29079)Wiktor Kwapisiewicz2024-02-081-0/+1
| | | | | | | | | | | | | Outgoing new release e-mail notifications were missing links to the actual release. An example from Codeberg.org e-mail: <a href=3D"">View it on Codeberg.org</a>.<br/> This PR adds `"Link"` context property pointing to the release on the web interface. The change was tested using `[mailer] PROTOCOL=dummy`. Signed-off-by: Wiktor Kwapisiewicz <wiktor@metacode.biz>
* Avoid showing unnecessary JS errors when there are elements with different ↵wxiaoguang2024-02-083-9/+19
| | | | | origin on the page (#29081) Try to fix #29080
* Fix gitea-origin-url with default ports (#29085)silverwind2024-02-083-13/+34
| | | | | | | | | | | | | | When setting `url.host` on a URL object with no port specified (like is the case of default port), the resulting URL's port will not change. Workaround this quirk in the URL standard by explicitely setting port for the http and https protocols. Extracted the logic to a function for the purpose of testing. Initially I wanted to have the function in utils.js, but it turns out esbuild can not treeshake the unused functions which would result in the webcomponents chunk having all 2kB utils.js inlined, so it seemed not worth. Fixes: https://github.com/go-gitea/gitea/issues/29084
* Improve user experience for outdated comments (#29050)wxiaoguang2024-02-085-17/+100
| | | | | | | | | | Try to improve #28949 1. Make `ctx.Data["ShowOutdatedComments"] = true` by default: it brings consistent user experience, and sometimes the "outdated (source changed)" comments are still valuable. 2. Show a friendly message if the comment won't show, then the end users won't fell that "the comment disappears" (it is the special case when `ShowOutdatedComments = false`)
* fix: Elasticsearch: Request Entity Too Large #28117 (#29062)dark-angel2024-02-071-5/+11
| | | | | | | | | | | | | | | | Fix for gitea putting everything into one request without batching and sending it to Elasticsearch for indexing as issued in #28117 This issue occured in large repositories while Gitea tries to index the code using ElasticSearch. I've applied necessary changes that takes batch length from below config (app.ini) ``` [queue.code_indexer] BATCH_LENGTH=<length_int> ``` and batches all requests to Elasticsearch in chunks as configured in the above config
* Fix orgmode link resolving (#29024)wxiaoguang2024-02-072-39/+41
| | | | | Fix #28974 Add some new tests and fix some legacy unclear tests.
* Remove lightningcss (#29070)silverwind2024-02-073-277/+37
| | | | | | | | Remove lightningcss and minify with esbuild again. The size of output CSS will increase by around 1.4%, but I think it's worth it to allow building gitea in more cases like the one in the linked issue. We can reconsider once lightningcss becomes more stable. Fixes: https://github.com/go-gitea/gitea/issues/29058
* Hide code links on release page if user cannot read code (#29064)Jason Song2024-02-061-24/+5
| | | | | | | | | | | | | | | | | On the release list page, if the user doesn't have the permission to read code, the code links will lead to 404 pages or api errors: <img width="1297" alt="image" src="https://github.com/go-gitea/gitea/assets/9418365/a74fbc63-6dd6-43c6-853c-28acdbfdcb4e"> After this PR: <img width="1297" alt="image" src="https://github.com/go-gitea/gitea/assets/9418365/a626373d-c2df-40a9-8fed-1b12ff6bc56f"> And this PR also removed some dead code. After #23465, the tag list page has an independent template, and all `IsTag` in the release list template are always false.
* [skip ci] Updated translations via CrowdinGiteaBot2024-02-061-3/+3
|
* Don't do a full page load when clicking `Watch` or `Star` (#29001)Yarden Shoham2024-02-054-30/+61
| | | | | | | | | - The watch/unwatch button and star/unstar get their own template - The backend returns HTML instead of redirect --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: John Olheiser <john.olheiser@gmail.com>
* Remove useless template file (#29053)Jason Song2024-02-051-19/+0
| | | | | | | | | | | | | | | Removed `templates/repo/settings/nav.tmpl`. I don't think it's still used. On main branch: <img width="521" alt="image" src="https://github.com/go-gitea/gitea/assets/9418365/c0bf958c-698a-4348-840e-3ade0312bd6e"> On commit 755eec745fa324fdd13078f0147638f8731652ba (the commit that created this file): <img width="615" alt="image" src="https://github.com/go-gitea/gitea/assets/9418365/5156b26d-1ecd-4197-a0a6-dc2d17652ff4">
* Fix typos in the documentation (#29048)Wang2024-02-051-1/+1
| | | Corrected two typos.
* Move some repository transfer functions to service layer (#28855)Lunny Xiao2024-02-058-358/+347
|
* Propagate install_if and provider_priority to APKINDEX (#28899)Sergey Bugaev2024-02-052-10/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resolves https://github.com/go-gitea/gitea/issues/28704 Example of an entry in the generated `APKINDEX` file: ``` C:Q1xCO3H9LTTEbhKt9G1alSC87I56c= P:hello V:2.12-r1 A:x86_64 T:The GNU Hello program produces a familiar, friendly greeting U:https://www.gnu.org/software/hello/ L:GPL-3.0-or-later S:15403 I:36864 o:hello m: t:1705934118 D:so:libc.musl-x86_64.so.1 p:cmd:hello=2.12-r1 i:foobar=1.0 !baz k:42 ``` the `i:` and `k:` entries are new. --------- Co-authored-by: KN4CK3R <admin@oldschoolhack.me>