summaryrefslogtreecommitdiffstats
path: root/modules (follow)
Commit message (Collapse)AuthorAgeFilesLines
* [BUG] Make chroma match case-insenstiveGusted2024-10-112-2/+8
| | | | | | | | | | | | | | | - In the case that [go-enry](https://github.com/go-enry/go-enry/) returned langauge doesn't match a lexer name (Either because its not available or because it doesn't match Chroma's name), a last effort attempt is made to use Chroma's matching. - go-enry already applies `strings.ToLower` onto the filename to avoid being case-sensitive, add the same code for Chroma's matching. The code being used doesn't rely on the filename being case senstive for correct matching. - Adds unit test. - Resolves #752 (cherry picked from commit dcc442351d2a70344dba582ec76c14a39e5aa2c0)
* update git book link to v2 (#5503)ehshi2024-10-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ## Checklist The [contributor guide](https://forgejo.org/docs/next/contributor/) contains information that will be helpful to first time contributors. There also are a few [conditions for merging Pull Requests in Forgejo repositories](https://codeberg.org/forgejo/governance/src/branch/main/PullRequestsAgreement.md). You are also welcome to join the [Forgejo development chatroom](https://matrix.to/#/#forgejo-development:matrix.org). ### Tests - I added test coverage for Go changes... - [ ] in their respective `*_test.go` for unit tests. - [ ] in the `tests/integration` directory if it involves interactions with a live Forgejo server. - I added test coverage for JavaScript changes... - [ ] in `web_src/js/*.test.js` if it can be unit tested. - [ ] in `tests/e2e/*.test.e2e.js` if it requires interactions with a live Forgejo server (see also the [developer guide for JavaScript testing](https://codeberg.org/forgejo/forgejo/src/branch/forgejo/tests/e2e/README.md#end-to-end-tests)). ### Documentation - [ ] I created a pull request [to the documentation](https://codeberg.org/forgejo/docs) to explain to Forgejo users how to use this change. - [x] I did not document these changes and I do not expect someone else to do it. ### Release notes - [ ] I do not want this change to show in the release notes. - [ ] I want the title to show in the release notes with a link to this pull request. - [ ] I want the content of the `release-notes/<pull request number>.md` to be be used for the release notes instead of the title. Co-authored-by: Ehsan Shirvanian <ehsan@duck.com> Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5503 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org> Co-authored-by: ehshi <ehshi@noreply.codeberg.org> Co-committed-by: ehshi <ehshi@noreply.codeberg.org> (cherry picked from commit 82b1ab56de93afeb6eb010058101098aee34e355)
* Fixed race condition when deleting documents by repoId in ElasticSearch (#32185)Bruno Sofiato2024-10-061-1/+27
| | | | | | | | | Resolves #32184 --------- Signed-off-by: Bruno Sofiato <bruno.sofiato@gmail.com> (cherry picked from commit d266d190bd744b7b6f572bf69a42013e21b9be62)
* Fix wrong status of `Set up Job` when first step is skipped (#32120)yp053272024-09-292-21/+49
| | | | | | Fix #32089 (cherry picked from commit 6fa962f409c84477a7a4cf35b4a38a4a93fc3224)
* Merge pull request '[v9.0/forgejo] feat: add architecture-specific removal ↵Earl Warren2024-09-271-37/+32
|\ | | | | | | | | | | support for arch package' (#5407) from bp-v9.0/forgejo-89742c4 into v9.0/forgejo Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5407
| * feat: add architecture-specific removal support for arch package (#5351)Exploding Dragon2024-09-271-37/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - [x] add architecture-specific removal support - [x] Fix upload competition - [x] Fix not checking input when downloading docs: https://codeberg.org/forgejo/docs/pulls/874 ### Release notes - [ ] I do not want this change to show in the release notes. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5351 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org> Co-authored-by: Exploding Dragon <explodingfkl@gmail.com> Co-committed-by: Exploding Dragon <explodingfkl@gmail.com> (cherry picked from commit 89742c49135e47372e272596bd536d5d1244721f)
* | Use camo.Always instead of camo.Allways (#32097)Lunny Xiao2024-09-273-4/+14
| | | | | | | | | | | | | | | | Fix #31575 https://gitea.com/gitea/docs/pulls/73 (cherry picked from commit 8e2dd5d3ddfb442937c79f05df88d18b856952cb) (cherry picked from commit 2ffb08bb888bb950b6ed4ff12a4cf4bacc337e18)
* | Add bin to Composer Metadata (#32099)Jamie Schouten2024-09-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This PR addresses the missing `bin` field in Composer metadata, which currently causes vendor-provided binaries to not be symlinked to `vendor/bin` during installation. In the current implementation, running `composer install` does not publish the binaries, leading to issues where expected binaries are not available. By properly declaring the `bin` field, this PR ensures that binaries are correctly symlinked upon installation, as described in the [Composer documentation](https://getcomposer.org/doc/articles/vendor-binaries.md). (cherry picked from commit d351a42494e71b5e2da63302c2f9b46c78e6dbde) (cherry picked from commit 9d3473119893ffde0ab36d98e7a0e41c5d0ba9a3)
* | Fix wrong last modify time (#32102)Lunny Xiao2024-09-272-1/+3
| | | | | | | | | | (cherry picked from commit a802508f88e546bf18990559e44bf27a09c869ee) (cherry picked from commit f709de24039ab7e605d3e09e3b61240836381603)
* | feat: add IfZero utility functionEarl Warren2024-09-271-0/+9
| | | | | | | | | | (cherry picked from commit 43de021ac1ca017212ec75fd88a8a80a9db27c4c) (cherry picked from commit 1bdf334844f398d0a2adafc4499cef15f95df6d8)
* | Lazy load avatar images (#32051)hiifong2024-09-271-1/+1
|/ | | | | (cherry picked from commit f38e1014483b84f4541ffb354cd5dfdd7e000e2c) (cherry picked from commit 9d5f409a5a0ac784523cc94a6011f8c8a41d5a95)
* feat(ui): add more emoji and code block rendering in issuesBram Hagens2024-09-244-11/+100
|
* Support allowed hosts for migrations to work with proxy (#32025)Jason Song2024-09-141-5/+1
| | | | (cherry picked from commit 125679f2e14cdc8a26a147f7e8fd0e5f174fb5cb)
* Increase `cacheContextLifetime` to reduce false reports (#32011)Jason Song2024-09-142-7/+7
| | | | | | | | | | | | | | | | | | | | | | Replace #32001. To prevent the context cache from being misused for long-term work (which would result in using invalid cache without awareness), the context cache is designed to exist for a maximum of 10 seconds. This leads to many false reports, especially in the case of slow SQL. This PR increases it to 5 minutes to reduce false reports. 5 minutes is not a very safe value, as a lot of changes may have occurred within that time frame. However, as far as I know, there has not been a case of misuse of context cache discovered so far, so I think 5 minutes should be OK. Please note that after this PR, if warning logs are found again, it should get attention, at that time it can be almost 100% certain that it is a misuse. (cherry picked from commit a323a82ec4bde6ae39b97200439829bf67c0d31e)
* Use forum.gitea.com instead of old URL (#31989)Lunny Xiao2024-09-091-1/+1
| | | | | | | | | | | | | | (cherry picked from commit a5818470fe62677d8859b590b2d80b98fe23d098) Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu> Conflicts: - .github/ISSUE_TEMPLATE/bug-report.yaml .github/ISSUE_TEMPLATE/config.yml .github/ISSUE_TEMPLATE/feature-request.yaml .github/ISSUE_TEMPLATE/ui.bug-report.yaml templates/install.tmpl All of these are Gitea-specific. Resolved the conflict by not picking their change.
* Fix index too many file names bug (#31903)Lunny Xiao2024-09-091-7/+31
| | | | | | | Try to fix #31884 Fix #28584 (cherry picked from commit 286ede47ad683bf0431e531e82019cd016cc54dd)
* Merge pull request 'chore: remove extra go-sqlite3 imports' (#5243) from ↵Otto2024-09-081-2/+0
|\ | | | | | | | | | | | | yoctozepto/no-extra-sqlite into forgejo Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5243 Reviewed-by: Otto <otto@codeberg.org>
| * chore: remove extra go-sqlite3 importsRadosław Piliszek2024-09-061-2/+0
| | | | | | | | | | go-sqlite3 is already properly included conditionally within the `modules/setting` package.
* | Construct screenGusted2024-09-061-2/+5
|/
* chore: update mock redis clientGusted2024-09-012-7190/+71
| | | | - Follow up of #5173
* Merge pull request 'chore: Only implement used API of Redis client' (#5173) ↵Gusted2024-09-015-16/+52
|\ | | | | | | | | | | | | from gusted/forgejo-redis-binary-size into forgejo Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5173 Reviewed-by: Otto <otto@codeberg.org>
| * [FEAT] Only implement used API of Redis clientGusted2024-08-305-16/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Currently for the `nosql` module (which simply said provides a manager for redis clients) returns the [`redis.UniversalClient`](https://pkg.go.dev/github.com/redis/go-redis/v9#UniversalClient) interface. The interfaces exposes all available commands. - In generalm, dead code elimination should be able to take care of not generating the machine code for methods that aren't being used. However in this specific case, dead code elimination either is disabled or gives up on trying because of exhaustive call stack the client by `GetRedisClient` is used. - Help the Go compiler by explicitly specifying which methods we use. This reduces the binary size by ~400KB (397312 bytes). As Go no longer generate machine code for commands that aren't being used. - There's a **CAVEAT** with this, if a developer wants to use a new method that isn't specified, they will have to know about this hack (by following the definition of existing Redis methods) and add the method definition from the Redis library to the `RedisClient` interface.
* | Merge pull request 'chore(ci): Cache generated binary across jobs' (#5130) ↵Earl Warren2024-08-301-2/+2
|\ \ | |/ |/| | | | | | | | | | | from fnetx/runner-caching into forgejo Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5130 Reviewed-by: Michael Kriese <michael.kriese@gmx.de> Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
| * Cache generated binary across jobsOtto Richter2024-08-261-2/+2
| | | | | | | | | | | | | | | | | | - retrieved by the commit hash - removes bindata tags from integration tests, because it does not seem to be required - due to the missing automatically generated data, the zstd tests fail (they use repo data including node_modules (!) as input to the test, there is no apparent reason for the size constants)
* | Merge branch 'forgejo' into bugfix-archExploding Dragon2024-08-293-4/+4
|\ \
| * \ Merge pull request '[CHORE] Move `cache` & `captcha` library' (#5146) from ↵Gusted2024-08-293-4/+4
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | gusted/forgejo-captcha into forgejo Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5146 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
| | * | [CHORE] Move cache libraryGusted2024-08-273-4/+4
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | - This is in the spirit of #5090. - Move to a fork of gitea.com/go-chi/cache, code.forgejo.org/go-chi/cache. It removes unused code (a lot of adapters, that can't be used by Forgejo) and unused dependencies (see go.sum). Also updates existing dependencies. https://code.forgejo.org/go-chi/cache/compare/8c64f1a3625880d82a47996bf0afcd6387a98e05..main
* | | Merge branch 'forgejo' into bugfix-archExploding Dragon2024-08-281-3/+3
|\| |
| * | Merge pull request '[gitea] week 2024-35 cherry pick (gitea/main -> ↵Earl Warren2024-08-271-3/+3
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | forgejo)' (#5109) from algernon/wcp/2024-35 into forgejo Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5109 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
| | * | Use correct function name (#31887)Lunny Xiao2024-08-251-3/+3
| | | | | | | | | | | | | | | | (cherry picked from commit 0299bb97f038685aee794a992fa4a9f5cf83652e)
* | | | Merge branch 'forgejo' into bugfix-archExploding Dragon2024-08-2723-100/+651
|\| | |
| * | | Merge pull request 'feat: Trivial default quota configuration' (#5125) from ↵Otto2024-08-271-0/+9
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | algernon/forgejo:falling-in-reverse into forgejo Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5125 Reviewed-by: Otto <otto@codeberg.org>
| | * | | feat: Trivial default quota configurationGergely Nagy2024-08-261-0/+9
| | | |/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a new configuration setting: `[quota.default].TOTAL`, which will be used if no groups are configured for a particular user. The new option makes it possible to entirely skip configuring quotas via the API if all that one wants is a total size. Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
| * | | Merge pull request '[PORT] Refactor the usage of batch catfile ↵Gusted2024-08-2616-90/+364
| |\ \ \ | | |/ / | |/| | | | | | | | | | | | | | | | | | (gitea#31754)' (#5122) from gusted/forgejo-port-gt-31754 into forgejo Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5122 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
| | * | [TESTS] Add test for CatFileBatch(Check)Gusted2024-08-261-0/+163
| | | |
| | * | [PORT] Refactor the usage of batch catfile (gitea#31754)Lunny Xiao2024-08-2615-90/+201
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When opening a repository, it will call `ensureValidRepository` and also `CatFileBatch`. But sometimes these will not be used until repository closed. So it's a waste of CPU to invoke 3 times git command for every open repository. This PR removed all of these from `OpenRepository` but only kept checking whether the folder exists. When a batch is necessary, the necessary functions will be invoked. --- Conflict resolution: Because of the removal of go-git in (#4941) `_nogogit.go` files were either renamed or merged into the 'common' file. Git does handle the renames correctly, but for those that were merged has to be manually copied pasted over. The patch looks the same, 201 additions 90 deletions as the original patch. (cherry picked from commit c03baab678ba5b2e9d974aea147e660417f5d3f7)
| * | Merge pull request '[FIX] Don't allow SSH authentication without ssh ↵Earl Warren2024-08-261-0/+6
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | executable' (#5123) from gusted/forgejo-prevent-no-ssh into forgejo Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5123 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
| | * | [FIX] Don't allow SSH authentication without ssh executableGusted2024-08-261-0/+6
| | |/ | | | | | | | | | | | | | | | | | | | | | - Follow up of #4819 - When no `ssh` executable is present, disable the UI and backend bits that allow the creation of push mirrors that use SSH authentication. As this feature requires the usage of the `ssh` binary. - Integration test added.
| * | Merge pull request '[CHORE] Move to new sessioner library' (#5090) from ↵Earl Warren2024-08-265-10/+272
| |\ \ | | |/ | |/| | | | | | | | | | | | | | | | gusted/forgejo-sessioner-fork into forgejo Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5090 Reviewed-by: Otto <otto@codeberg.org> Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
| | * [CHORE] Move to new sessioner libraryGusted2024-08-255-10/+272
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Moves to a fork of gitea.com/go-chi/session that removed support for couchbase (and ledis, but that was never made available in Forgejo) along with other code improvements. https://code.forgejo.org/go-chi/session/compare/f8ce6775954417f3270aafd573d3e4e448a44bad..main - The rationale for removing Couchbase is quite simple. Its not licensed under FOSS license (https://www.couchbase.com/blog/couchbase-adopts-bsl-license/) and therefore cannot be tested by Forgejo and shouldn't be supported. This is a similair vein to the removal of MSSQL support (https://codeberg.org/forgejo/discussions/issues/122) - A additional benefit is that this reduces the Forgejo binary by ~600Kb.
* | | clean style and add more testsdragon2024-08-262-2/+2
| | |
* | | Fix arch OptDepends version check and add gzip compressiondragon2024-08-262-3/+7
|/ /
* | Merge pull request 'fix: include last line in file previews with no trailing ↵Gusted2024-08-256-4/+39
|\ \ | | | | | | | | | | | | | | | | | | newline' (#5085) from solomonv/fix-previews-without-trailing-eol into forgejo Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5085 Reviewed-by: Gusted <gusted@noreply.codeberg.org>
| * | fix: include last line in file previews with no trailing newlineSolomon Victorino2024-08-256-4/+39
| | |
* | | Merge pull request 'Allow pushmirror to use publickey authentication' ↵Gusted2024-08-247-48/+165
|\ \ \ | |/ / |/| | | | | | | | | | | | | | (#4819) from ironmagma/forgejo:publickey-auth-push-mirror into forgejo Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4819 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
| * | [FEAT] Allow pushmirror to use publickey authenticationPhilip Peterson2024-08-227-48/+165
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Continuation of https://github.com/go-gitea/gitea/pull/18835 (by @Gusted, so it's fine to change copyright holder to Forgejo). - Add the option to use SSH for push mirrors, this would allow for the deploy keys feature to be used and not require tokens to be used which cannot be limited to a specific repository. The private key is stored encrypted (via the `keying` module) on the database and NEVER given to the user, to avoid accidental exposure and misuse. - CAVEAT: This does require the `ssh` binary to be present, which may not be available in containerized environments, this could be solved by adding a SSH client into forgejo itself and use the forgejo binary as SSH command, but should be done in another PR. - CAVEAT: Mirroring of LFS content is not supported, this would require the previous stated problem to be solved due to LFS authentication (an attempt was made at forgejo/forgejo#2544). - Integration test added. - Resolves #4416
* | | fix: improve PR/issue short link display textSolomon Victorino2024-08-222-42/+18
| | | | | | | | | | | | | | | - include subpaths - don't append "(comment)" for unrelated hash/query strings
* | | fix: breaking changes with meili (#5073)Shiny Nematoda2024-08-222-6/+3
| |/ |/| | | | | | | | | | | | | | | resolves breaking changes introduced in #5058 Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5073 Reviewed-by: Gusted <gusted@noreply.codeberg.org> Co-authored-by: Shiny Nematoda <snematoda.751k2@aleeas.com> Co-committed-by: Shiny Nematoda <snematoda.751k2@aleeas.com>
* | Merge pull request 'feat(ui): Add `rel="nofollow"` to in-list labels' ↵Gusted2024-08-211-1/+1
|\ \ | |/ |/| | | | | | | | | (#5002) from xlii/forgejo:forgejo into forgejo Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5002 Reviewed-by: Gusted <gusted@noreply.codeberg.org>
| * follow up on #2367: rel="nofollow" on in-list labelsChl2024-08-151-1/+1
| | | | | | | | | | The forgejo/forgejo#2367 pull requests added rel="nofollow" on filters in the menu, this commit adds it on the labels in the listing and a few other places.