Commit graph

4980 commits

Author SHA1 Message Date
Earl Warren
4261301dfb [gitea] week 2025-02 cherry pick (gitea/main -> forgejo) (#6471)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6471
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2025-01-07 06:17:49 +00:00
Renovate Bot
4b0d11976f Update module github.com/alecthomas/chroma/v2 to v2.15.0 (forgejo) (#6477)
Some checks are pending
/ release (push) Waiting to run
testing / test-e2e (push) Blocked by required conditions
testing / test-unit (push) Blocked by required conditions
testing / backend-checks (push) Waiting to run
testing / frontend-checks (push) Waiting to run
testing / test-remote-cacher (redis) (push) Blocked by required conditions
testing / test-remote-cacher (valkey) (push) Blocked by required conditions
testing / test-remote-cacher (garnet) (push) Blocked by required conditions
testing / test-remote-cacher (redict) (push) Blocked by required conditions
testing / test-mysql (push) Blocked by required conditions
testing / test-pgsql (push) Blocked by required conditions
testing / test-sqlite (push) Blocked by required conditions
testing / security-check (push) Blocked by required conditions
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [github.com/alecthomas/chroma/v2](https://github.com/alecthomas/chroma) | require | minor | `v2.14.0` -> `v2.15.0` |

---

### Release Notes

<details>
<summary>alecthomas/chroma (github.com/alecthomas/chroma/v2)</summary>

### [`v2.15.0`](https://github.com/alecthomas/chroma/releases/tag/v2.15.0)

[Compare Source](https://github.com/alecthomas/chroma/compare/v2.14.0...v2.15.0)

#### What's Changed

-   AQL: Add builtin functions introduced in v3.12 by [@&#8203;Simran-B](https://github.com/Simran-B) in https://github.com/alecthomas/chroma/pull/968
-   chore(styles): add evergarden inspired style by [@&#8203;comfysage](https://github.com/comfysage) in https://github.com/alecthomas/chroma/pull/970
-   chore(deps): update dependency svu to v2 by [@&#8203;renovate](https://github.com/renovate) in https://github.com/alecthomas/chroma/pull/971
-   chore(deps): update dependency watchexec to v2 by [@&#8203;renovate](https://github.com/renovate) in https://github.com/alecthomas/chroma/pull/962
-   chore(deps): update all non-major dependencies by [@&#8203;renovate](https://github.com/renovate) in https://github.com/alecthomas/chroma/pull/955
-   styles: Fix Gleam alias by [@&#8203;jmooring](https://github.com/jmooring) in https://github.com/alecthomas/chroma/pull/973
-   chore(deps): update all non-major dependencies by [@&#8203;renovate](https://github.com/renovate) in https://github.com/alecthomas/chroma/pull/974
-   chore(deps): update dependency python3 to v3.12.3 by [@&#8203;renovate](https://github.com/renovate) in https://github.com/alecthomas/chroma/pull/976
-   added the nordic theme via chroma/styles/nordic.xml by [@&#8203;avih7531](https://github.com/avih7531) in https://github.com/alecthomas/chroma/pull/977
-   Update the Materialize lexer by [@&#8203;arusahni](https://github.com/arusahni) in https://github.com/alecthomas/chroma/pull/978
-   feat(lexers/hare): add done keyword by [@&#8203;wackbyte](https://github.com/wackbyte) in https://github.com/alecthomas/chroma/pull/979
-   pygments2chroma: escape regex.words by [@&#8203;oliverpool](https://github.com/oliverpool) in https://github.com/alecthomas/chroma/pull/982
-   chore(deps): update all non-major dependencies by [@&#8203;renovate](https://github.com/renovate) in https://github.com/alecthomas/chroma/pull/981
-   Add JSONata Lexer by [@&#8203;DevDimov](https://github.com/DevDimov) in https://github.com/alecthomas/chroma/pull/983
-   Go lexer: single line comment without consuming endline, disable EnsureNL by [@&#8203;msorc](https://github.com/msorc) in https://github.com/alecthomas/chroma/pull/984
-   Update the Materialize lexer by [@&#8203;arusahni](https://github.com/arusahni) in https://github.com/alecthomas/chroma/pull/987
-   chore(deps): update all non-major dependencies by [@&#8203;renovate](https://github.com/renovate) in https://github.com/alecthomas/chroma/pull/985
-   Add Gleam to README by [@&#8203;Nicd](https://github.com/Nicd) in https://github.com/alecthomas/chroma/pull/990
-   Port Minecraft lexers from Pygments by [@&#8203;kofuk](https://github.com/kofuk) in https://github.com/alecthomas/chroma/pull/992
-   Don't output extra whitespace in YAML multiline by [@&#8203;Gusted](https://github.com/Gusted) in https://github.com/alecthomas/chroma/pull/993
-   chore(deps): update all non-major dependencies by [@&#8203;renovate](https://github.com/renovate) in https://github.com/alecthomas/chroma/pull/991
-   add beef syntax and tests by [@&#8203;Booklordofthedings](https://github.com/Booklordofthedings) in https://github.com/alecthomas/chroma/pull/995
-   Update GitHub light color palette by [@&#8203;konradreiche](https://github.com/konradreiche) in https://github.com/alecthomas/chroma/pull/998
-   chore(deps): update module github.com/alecthomas/kong to v1 by [@&#8203;renovate](https://github.com/renovate) in https://github.com/alecthomas/chroma/pull/999
-   Update the Materialize lexer by [@&#8203;arusahni](https://github.com/arusahni) in https://github.com/alecthomas/chroma/pull/1001
-   Update TypeScript lexer to allow nested generics by [@&#8203;fredrare](https://github.com/fredrare) in https://github.com/alecthomas/chroma/pull/1002
-   Pager friendly terminal formatting by [@&#8203;walles](https://github.com/walles) in https://github.com/alecthomas/chroma/pull/1006
-   chore(deps): update all non-major dependencies by [@&#8203;renovate](https://github.com/renovate) in https://github.com/alecthomas/chroma/pull/997
-   Add Typst Lexer by [@&#8203;oliverpool](https://github.com/oliverpool) in https://github.com/alecthomas/chroma/pull/1007
-   Add Jsonnet Lexer by [@&#8203;jolheiser](https://github.com/jolheiser) in https://github.com/alecthomas/chroma/pull/1011
-   fix: add underscore parsing in numbers for haskell by [@&#8203;Gusted](https://github.com/Gusted) in https://github.com/alecthomas/chroma/pull/1020
-   Add CSV lexer by [@&#8203;walles](https://github.com/walles) in https://github.com/alecthomas/chroma/pull/1005
-   fix(typescript): highlight string literal type parameters by [@&#8203;SKalt](https://github.com/SKalt) in https://github.com/alecthomas/chroma/pull/1010
-   add any as a builtin type for go by [@&#8203;quartercastle](https://github.com/quartercastle) in https://github.com/alecthomas/chroma/pull/1021
-   chore(deps): update all non-major dependencies by [@&#8203;renovate](https://github.com/renovate) in https://github.com/alecthomas/chroma/pull/1013
-   Remove whitespace tokenizing rule in markdown lexer by [@&#8203;cloudchamb3r](https://github.com/cloudchamb3r) in https://github.com/alecthomas/chroma/pull/1008
-   feat(JSON): support `.jsonc` extension by [@&#8203;CarterLi](https://github.com/CarterLi) in https://github.com/alecthomas/chroma/pull/1022
-   Add Eclipse ATL language (https://eclipse.dev/atl/) by [@&#8203;dwagelaar](https://github.com/dwagelaar) in https://github.com/alecthomas/chroma/pull/1024
-   Import NSIS Lexer from Pygments by [@&#8203;JakobDev](https://github.com/JakobDev) in https://github.com/alecthomas/chroma/pull/1026
-   chore(deps): update module github.com/alecthomas/kong to v1.5.1 by [@&#8203;renovate](https://github.com/renovate) in https://github.com/alecthomas/chroma/pull/1025
-   fix(nix): nix lexor missing '=' operator by [@&#8203;FlyingStitchman](https://github.com/FlyingStitchman) in https://github.com/alecthomas/chroma/pull/1031
-   Add WebVTT lexer ([#&#8203;707](https://github.com/alecthomas/chroma/issues/707)) by [@&#8203;dschuessler](https://github.com/dschuessler) in https://github.com/alecthomas/chroma/pull/1032

#### New Contributors

-   [@&#8203;comfysage](https://github.com/comfysage) made their first contribution in https://github.com/alecthomas/chroma/pull/970
-   [@&#8203;avih7531](https://github.com/avih7531) made their first contribution in https://github.com/alecthomas/chroma/pull/977
-   [@&#8203;wackbyte](https://github.com/wackbyte) made their first contribution in https://github.com/alecthomas/chroma/pull/979
-   [@&#8203;oliverpool](https://github.com/oliverpool) made their first contribution in https://github.com/alecthomas/chroma/pull/982
-   [@&#8203;DevDimov](https://github.com/DevDimov) made their first contribution in https://github.com/alecthomas/chroma/pull/983
-   [@&#8203;msorc](https://github.com/msorc) made their first contribution in https://github.com/alecthomas/chroma/pull/984
-   [@&#8203;Nicd](https://github.com/Nicd) made their first contribution in https://github.com/alecthomas/chroma/pull/990
-   [@&#8203;Booklordofthedings](https://github.com/Booklordofthedings) made their first contribution in https://github.com/alecthomas/chroma/pull/995
-   [@&#8203;konradreiche](https://github.com/konradreiche) made their first contribution in https://github.com/alecthomas/chroma/pull/998
-   [@&#8203;fredrare](https://github.com/fredrare) made their first contribution in https://github.com/alecthomas/chroma/pull/1002
-   [@&#8203;SKalt](https://github.com/SKalt) made their first contribution in https://github.com/alecthomas/chroma/pull/1010
-   [@&#8203;quartercastle](https://github.com/quartercastle) made their first contribution in https://github.com/alecthomas/chroma/pull/1021
-   [@&#8203;cloudchamb3r](https://github.com/cloudchamb3r) made their first contribution in https://github.com/alecthomas/chroma/pull/1008
-   [@&#8203;CarterLi](https://github.com/CarterLi) made their first contribution in https://github.com/alecthomas/chroma/pull/1022
-   [@&#8203;dwagelaar](https://github.com/dwagelaar) made their first contribution in https://github.com/alecthomas/chroma/pull/1024
-   [@&#8203;FlyingStitchman](https://github.com/FlyingStitchman) made their first contribution in https://github.com/alecthomas/chroma/pull/1031
-   [@&#8203;dschuessler](https://github.com/dschuessler) made their first contribution in https://github.com/alecthomas/chroma/pull/1032

**Full Changelog**: https://github.com/alecthomas/chroma/compare/v2.14.0...v2.15.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "* 0-3 * * *" (UTC), Automerge - "* 0-3 * * *" (UTC).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS45MC4wIiwidXBkYXRlZEluVmVyIjoiMzkuOTAuMCIsInRhcmdldEJyYW5jaCI6ImZvcmdlam8iLCJsYWJlbHMiOlsiZGVwZW5kZW5jeS11cGdyYWRlIiwidGVzdC9ub3QtbmVlZGVkIl19-->

Co-authored-by: Gusted <postmaster@gusted.xyz>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6477
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2025-01-06 04:11:25 +00:00
wxiaoguang
e507fa30df
Refactor env var related code (#33075)
And add more comments

(cherry picked from commit 4f386e2c5e39b860424faf4cbc02c16f641f956e)

Conflicts:
	cmd/main_test.go
	tests/integration/integration_test.go
  trivial context conflicts
2025-01-05 13:46:19 +00:00
JonRB
6208d5f5c2
unset XDG_HOME_CONFIG as gitea manages configuration locations (#33067)
unset XDG_CONFIG_HOME early to enable gitea to manage git configuration.
simple error checking to satisfy the linting. Closes #33039

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
(cherry picked from commit 233b7959e0518c47ef83c6a80c617546983433eb)
2025-01-05 13:46:19 +00:00
cassio zareck
9b2f38261b
Fix settings not being loaded at CLI (#26402)
Closes #25898
The problem was that the default settings weren't being loaded

---------

Signed-off-by: cassiozareck <cassiomilczareck@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
(cherry picked from commit 1e2c8eb494ff5b8378653db5fed876d824ebca6f)

Conflicts:
	modules/setting/indexer.go
  trivial context conflict
2025-01-05 12:13:48 +00:00
Lunny Xiao
bc64b6f004
Use gitrepo.GetTreePathLatestCommit to get file lastest commit instead from latest commit cache (#32987)
The latest commit cache is currently used only for listing tree files.
However, a cold start may take longer than directly invoking the Git
command. This PR addresses the issue of slow response times when
accessing raw files, improving performance in such scenarios.

```log
gitea.log:105521:2024/12/23 08:22:18 ...eb/routing/logger.go:68:func1() [W] router: slow      GET /xxxx/xxxxxx/raw/commit/xxxxxxxxxxxxxxxxxxxxxxxxxxx/.editorconfig for 172.18.0.5:53252, elapsed 3526.8ms @ repo/download.go:117(repo.SingleDownload)
```

(cherry picked from commit f4ccbd38dca77b1515a08ddf927f4f20cf644d30)
2025-01-05 12:13:48 +00:00
Gusted
3f44b97b5f
feat: add limited execution tracing support
- For every process that is spawned (every new non-trivial goroutine
such as http requests, queues or tasks) start a [execution
tracer](https://pkg.go.dev/runtime/trace). This allows very precise
diagnosis of how each individual process over a time period.
- It's safe and [fast](https://go.dev/blog/execution-traces-2024#low-overhead-tracing) to
be run in production, hence no setting to disable this. There's only
noticable overhead when tracing is actually performed and not continuous.
- Proper tracing support would mean the codebase would be full of
`trace.WithRegion` and `trace.Log`, which feels premature for this patch
as there's no real-world usage yet to indicate which places would need
this the most. So far only Git commands and SQL queries receive somewhat
proper tracing support given that these are used throughout the codebase.
- Make git commands a new process type.
- Add tracing to diagnosis zip file.
2025-01-05 04:07:49 +01:00
Gusted
a2e0dd829c
chore: avoid trying to stream data
`profile.Parse` always call `io.ReadAll` so avoid the trouble and a
goroutine and do it ourselves.

Add some limited testing (testing the parsed stack is volatile and not
really feasible).
2025-01-05 04:07:49 +01:00
Angel Nunez Mencias
a2eb249766 feat: add files to compare (#6461)
Some checks are pending
/ release (push) Waiting to run
testing / backend-checks (push) Waiting to run
testing / frontend-checks (push) Waiting to run
testing / test-unit (push) Blocked by required conditions
testing / test-e2e (push) Blocked by required conditions
testing / test-remote-cacher (redis) (push) Blocked by required conditions
testing / test-remote-cacher (valkey) (push) Blocked by required conditions
testing / test-remote-cacher (garnet) (push) Blocked by required conditions
testing / test-remote-cacher (redict) (push) Blocked by required conditions
testing / test-mysql (push) Blocked by required conditions
testing / test-pgsql (push) Blocked by required conditions
testing / test-sqlite (push) Blocked by required conditions
testing / security-check (push) Blocked by required conditions
Add the changed files between two commits to the response of the compare API, part of forgejo/forgejo#6460

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6461
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Angel Nunez Mencias <git@angelnu.com>
Co-committed-by: Angel Nunez Mencias <git@angelnu.com>
2025-01-05 02:32:46 +00:00
Otto
b01f3b9b05 Merge pull request 'feat: Add summary card for repos and releases' (#6269) from JakobDev/forgejo:repocard into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6269
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.codeberg.org>
Reviewed-by: Otto <otto@codeberg.org>
2025-01-01 17:48:28 +00:00
JakobDev
bc2f640a95
Update 2024-12-30 17:47:34 +01:00
Earl Warren
8e3c066b27 Merge pull request 'chore(branding): strip metadata information from the footer' (#6403) from earl-warren/forgejo:wip-footer into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6403
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2024-12-30 15:29:21 +00:00
Earl Warren
2c81893c76
chore(branding): strip metadata information from the footer
When the Forgejo version is displayed in the footer, the metadata
should not be displayed. It was once an indication that Forgejo
includes all of Gitea. But since the hard fork the codebase diverged
and this is no longer accurate.

The metadata is still displayed in the API, admin panels or headers
for the sake of backward compatibility.

Refs: https://codeberg.org/forgejo/discussions/issues/244
2024-12-29 22:40:13 +00:00
JakobDev
a82cd18d9a Merge branch 'forgejo' into repocard 2024-12-29 11:20:09 +00:00
JakobDev
b7d7431d05
Fix typos 2024-12-28 21:20:55 +01:00
katsu
0efd7130f0
fix trailing comma not matched in the case of alphanumeric issue (#32945)
Fix #32428.

Patch the regex to match `,`besides `.` `"` `'` `:` and space.

(cherry picked from commit fb75151fb14e866cab8d893c588f5673902b278b)
2024-12-28 19:00:07 +00:00
Gusted
967603abcc
feat: harden keying implementation
Harden the current checks in place, I doubt these will ever hit (you can
prove easily by reading the current source code this cannot happen) but
just in case a new Go version does something weird or something else
goes catastrophicly wrong, this should add an extra defense-in-depth
layer.

`n != aeadKeySize` will panic a nil error, don't think it's needed to
add more logic to this, a nil error is enough to indicate that that
condition failed (given the other condition is `err != nil`).

Also move constant integers to being `const`, this helps reducing the
amount of instructions being done for the extra check.
2024-12-25 00:10:18 +01:00
George Bartolomey
13ca6c14f1
feat: allow changing default branch update style
This commit allows chaning default branch update style through global
and repository settings. The setting affects "Update branch" button
in PR view (button shows when some commits are ahead of master branch).
When default update style is set to "rebase", dropdown button updates branch
by rebase by default. When update style is set to other value, dropdown button
updates branch by merge. Any of these actions may be selected using dropdown
in any case.

Signed-off-by: George Bartolomey <george@bh4.ru>
2024-12-23 18:55:25 +03:00
Shiny Nematoda
ee214cb886 feat: filepath filter for code search (#6143)
Some checks are pending
/ release (push) Waiting to run
testing / backend-checks (push) Waiting to run
testing / frontend-checks (push) Waiting to run
testing / test-unit (push) Blocked by required conditions
testing / test-e2e (push) Blocked by required conditions
testing / test-remote-cacher (redis) (push) Blocked by required conditions
testing / test-remote-cacher (valkey) (push) Blocked by required conditions
testing / test-remote-cacher (garnet) (push) Blocked by required conditions
testing / test-remote-cacher (redict) (push) Blocked by required conditions
testing / test-mysql (push) Blocked by required conditions
testing / test-pgsql (push) Blocked by required conditions
testing / test-sqlite (push) Blocked by required conditions
testing / security-check (push) Blocked by required conditions
Added support for searching content in a specific directory or file.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6143
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Shiny Nematoda <snematoda.751k2@aleeas.com>
Co-committed-by: Shiny Nematoda <snematoda.751k2@aleeas.com>
2024-12-22 12:24:29 +00:00
Gusted
1e7b922e44 Merge pull request 'fix: keep commit count limit in file history pagination static and not increase with every page' (#6337) from emilylange/fix-file-history-commit-pagination-limit into forgejo
Some checks are pending
/ release (push) Waiting to run
testing / backend-checks (push) Waiting to run
testing / frontend-checks (push) Waiting to run
testing / test-unit (push) Blocked by required conditions
testing / test-e2e (push) Blocked by required conditions
testing / test-remote-cacher (redis) (push) Blocked by required conditions
testing / test-remote-cacher (valkey) (push) Blocked by required conditions
testing / test-remote-cacher (garnet) (push) Blocked by required conditions
testing / test-remote-cacher (redict) (push) Blocked by required conditions
testing / test-mysql (push) Blocked by required conditions
testing / test-pgsql (push) Blocked by required conditions
testing / test-sqlite (push) Blocked by required conditions
testing / security-check (push) Blocked by required conditions
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6337
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-12-22 00:02:38 +00:00
emilylange
cd2c1361c5
fix: keep commit count limit in file history pagination static and not increase with every page
This fixes a regression introduced by 58a4407acb
from 2022 which reintroduced passing `--skip` to `git rev-list` in favor
of the custom skipping reader based on `io.CopyN` from 59d1cc49f1
and then forgetting to also revert the
`--max-count=CommitsRangeSize*Page` math.

Before this commit:

~~~bash
# curl -s "http://localhost:3000/api/v1/repos/forgejo/forgejo/commits?path=templates&page=1" | jq length
50

# curl -s "http://localhost:3000/api/v1/repos/forgejo/forgejo/commits?path=templates&page=2" | jq length
100

# curl -s "http://localhost:3000/api/v1/repos/forgejo/forgejo/commits?path=templates&page=10" | jq length
500
~~~

With this commit applied:

~~~bash
# curl -s "http://localhost:3000/api/v1/repos/forgejo/forgejo/commits?path=templates&page=1" | jq length
50

# curl -s "http://localhost:3000/api/v1/repos/forgejo/forgejo/commits?path=templates&page=2" | jq length
50

# curl -s "http://localhost:3000/api/v1/repos/forgejo/forgejo/commits?path=templates&page=10" | jq length
50
~~~
2024-12-21 23:46:29 +01:00
Julian Schlarb
b15352ceb0 fix: maven fallback to parent groupId 2024-12-21 11:48:09 +01:00
Gusted
2102163f2f Merge pull request 'chore: avoid using gock' (#6311) from gusted/forgejo-gock into forgejo
Some checks are pending
/ release (push) Waiting to run
testing / backend-checks (push) Waiting to run
testing / frontend-checks (push) Waiting to run
testing / test-unit (push) Blocked by required conditions
testing / test-e2e (push) Blocked by required conditions
testing / test-remote-cacher (redis) (push) Blocked by required conditions
testing / test-remote-cacher (valkey) (push) Blocked by required conditions
testing / test-remote-cacher (garnet) (push) Blocked by required conditions
testing / test-remote-cacher (redict) (push) Blocked by required conditions
testing / test-mysql (push) Blocked by required conditions
testing / test-pgsql (push) Blocked by required conditions
testing / test-sqlite (push) Blocked by required conditions
testing / security-check (push) Blocked by required conditions
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6311
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-12-20 21:15:11 +00:00
JakobDev
265174bd5e Merge branch 'forgejo' into repocard 2024-12-19 15:11:12 +00:00
Earl Warren
d07c5cf69c
fix: actions move to data.forgejo.org
code.forgejo.org is meant for development, the actions need to be
highly available and can be read-only. This is what data.forgejo.org
will provide.
2024-12-19 10:55:05 +01:00
Earl Warren
380e266440 Merge pull request '[gitea] week 2024-51 cherry pick (gitea/main -> forgejo)' (#6271) from earl-warren/wcp/2024-51 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6271
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-12-19 07:08:01 +00:00
JakobDev
df570a1d71 Merge branch 'forgejo' into repocard 2024-12-18 19:27:24 +00:00
Gusted
c26c60ccd1
chore: avoid using gock
- Avoid using gock to do HTTP mocking, this is fairly simply to do
ourselves and avoids a dependency, this commit does right that.
2024-12-18 06:40:02 +01:00
Gusted
61e21d7ded
chore: Make Forgejo build with go1.24
- [Go 1.24](https://groups.google.com/g/golang-announce/c/vYMfuq_XO6w)
is currently out for rc1.
- Using it to test unit tests and integration testing it failed horribly
with strange panics and errors, it is caused by
ca63101df4
and Forgejo trying to access the wrong internal data structures that
have been changed in Go 1.24.
- Use the new data structure for Go 1.24 and above.
2024-12-17 16:12:22 +01:00
Earl Warren
9283b03f3e
Add User-Agent for gitea's self-implemented lfs client. (branding) 2024-12-17 06:18:24 +01:00
hiifong
68278c796d
In some lfs server implementations, they require the ref attribute. (#32838)
Fix: #32611

In some lfs server implementations, they require the ref attribute.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
(cherry picked from commit 7616aeb2ea2a02c15480dcd4a232e98081569690)
2024-12-15 10:14:21 +01:00
hiifong
14a5d177e1
Add User-Agent for gitea's self-implemented lfs client. (#32832)
(cherry picked from commit 82c59d52ea650ce42bbca2c6740d9449d06e77be)
2024-12-15 10:14:21 +01:00
hiifong
4be37a986e
Fix lfs migration (#32812)
Fix: #32803
(cherry picked from commit 0b8a8941a01ed4bf914843c88740ad6203550b85)
2024-12-15 09:47:10 +01:00
Kemal Zebari
b0d6a7f07b
Implement update branch API (#32433)
Resolves #22526.

Builds upon #23061.

---------

Co-authored-by: sillyguodong <33891828+sillyguodong@users.noreply.github.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
(cherry picked from commit 01b1896bf5eacfd7f4f64d9ebb0ad165e3e60a5c)

Conflicts:
	routers/api/v1/api.go
  context conflict + s/PathParam/Params/
	templates/swagger/v1_json.tmpl
  make generate-swagger
2024-12-15 09:24:31 +01:00
JakobDev
7685a1e98e
feat: Add summary card for repos and releases 2024-12-14 19:36:09 +01:00
Gusted
3e1b03838e
fix: ensure correct ssh public key is used for authentication
- The root cause is described in b4f1988a35
- Move to a fork of `github.com/gliderlabs/ssh` that exposes the
permissions that was chosen by `x/crypto/ssh` after succesfully
authenticating, this is the recommended mitigation by the Golang
security team. The fork exposes this, since `gliderlabs/ssh` instead
relies on context values to do so, which is vulnerable to the same
attack, although partially mitigated by the fix in `x/crypto/ssh` it
would not be good practice and defense deep to rely on it.
- Existing tests covers that the functionality is preserved.
- No tests are added to ensure it fixes the described security, the
exploit relies on non-standard SSH behavior it would be too hard to
craft SSH packets to exploit this.
2024-12-12 05:54:07 +01:00
dragon
37a300b105 Add support for indexing arch files 2024-12-09 11:34:50 +08:00
wxiaoguang
b84a59b3cd Use 8 as default value for git lfs concurrency (#32421) 2024-12-06 00:17:57 +01:00
Royce Remer
f6273e2250 Make LFS http_client parallel within a batch. (#32369)
Signed-off-by: Royce Remer <royceremer@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-12-06 00:17:57 +01:00
Otto
ab00d875b8 Merge pull request 'fix: remove softbreak from github legacy callout' (#6152) from gusted/forgejo-callout into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6152
Reviewed-by: Otto <otto@codeberg.org>
2024-12-04 23:11:59 +00:00
Gusted
216a542bfb
fix: remove softbreak from github legacy callout
- A softbreak was being preserved during the github legacy callout (this
is likely due to a change in Goldmark) while it should not. This caused
an `<br>` to be present between the attention title and attention content.
- Added unit test.
2024-12-04 22:08:38 +01:00
Gusted
9bcf9502ef
feat: highlight Gradle Kotlin as Kotlin
- Grade Kotlin is almost the as Kotlin syntax, so render it as such.
- Resolves #6138
- Unit test added.
2024-12-04 22:06:33 +01:00
Earl Warren
56007ff3a2 Merge pull request '[gitea] week 2024-49 cherry pick (gitea/main -> forgejo)' (#6110) from earl-warren/wcp/2024-49 into forgejo
Some checks are pending
/ release (push) Waiting to run
testing / backend-checks (push) Waiting to run
testing / frontend-checks (push) Waiting to run
testing / test-unit (push) Blocked by required conditions
testing / test-e2e (push) Blocked by required conditions
testing / test-remote-cacher (redis) (push) Blocked by required conditions
testing / test-remote-cacher (valkey) (push) Blocked by required conditions
testing / test-remote-cacher (garnet) (push) Blocked by required conditions
testing / test-remote-cacher (redict) (push) Blocked by required conditions
testing / test-mysql (push) Blocked by required conditions
testing / test-pgsql (push) Blocked by required conditions
testing / test-sqlite (push) Blocked by required conditions
testing / security-check (push) Blocked by required conditions
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6110
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-12-03 15:06:55 +00:00
Rowan Bohde
2e00ae4cdd
Validate OAuth Redirect URIs (#32643)
This fixes a TODO in the code to validate the RedirectURIs when adding
or editing an OAuth application in user settings.

This also includes a refactor of the user settings tests to only create
the DB once per top-level test to avoid reloading fixtures.

(cherry picked from commit 16a7d343d78807e39df124756e5d43a69a2203a3)

Conflicts:
	services/forms/user_form.go
	tests/integration/user_settings_test.go
  simple conflicts
2024-12-03 10:19:22 +01:00
Gusted
45cec645de Merge pull request 'fix: return correct type in GetSubModule' (#6114) from gusted/forgejo-submodule-entry into forgejo
Some checks are pending
/ release (push) Waiting to run
testing / backend-checks (push) Waiting to run
testing / frontend-checks (push) Waiting to run
testing / test-unit (push) Blocked by required conditions
testing / test-e2e (push) Blocked by required conditions
testing / test-remote-cacher (redis) (push) Blocked by required conditions
testing / test-remote-cacher (valkey) (push) Blocked by required conditions
testing / test-remote-cacher (garnet) (push) Blocked by required conditions
testing / test-remote-cacher (redict) (push) Blocked by required conditions
testing / test-mysql (push) Blocked by required conditions
testing / test-pgsql (push) Blocked by required conditions
testing / test-sqlite (push) Blocked by required conditions
testing / security-check (push) Blocked by required conditions
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6114
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-12-03 03:24:01 +00:00
Gusted
e7cffc378f
Fix: return correct type in GetSubModule
- `GetSubModules` already solely stores the URL of the submodule and not
a `*SubModule` entry, so don't try to type assert it to be a struct.
- I am not able to pinpoint when this was regressed but if I had to
guess it might be #4941.
- Added integration test.
2024-12-02 01:08:09 +01:00
Gusted
d35bc0e636 Merge pull request 'feat: Add option to disable builtin authentication' (#6112) from squel/forgejo-disable-internal-signin into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6112
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2024-12-01 19:02:05 +00:00
George Tsiamasiotis
a126477e86 feat: Add option to disable builtin authentication.
Setting ENABLE_INTERNAL_SIGNIN to false will disable the built-in
signin form, should the administrator prefer to limit users to SSO.

Continuation of forgejo/forgejo#6076
2024-12-01 15:50:10 +01:00
FermeLeLundi
1151ff1b26 Update modules/keying/keying.go
Remove trailing whitespace
2024-11-29 15:42:17 +00:00
Fermé le Lundi
75f703326f Merge branch 'forgejo' into forgejo 2024-11-29 15:37:59 +00:00