Commit graph

21872 commits

Author SHA1 Message Date
FermeLeLundi
229cb20f68 Update modules/keying/keying.go
Typo
2024-11-28 10:34:08 +00:00
FermeLeLundi
893c2f2d90 Update modules/git/repo_commit.go
Typo
2024-11-28 10:31:28 +00:00
FermeLeLundi
0f64c5a806 Update modules/indexer/code/elasticsearch/elasticsearch.go
Typo
2024-11-28 10:29:18 +00:00
FermeLeLundi
eef6d55877 Update modules/typesniffer/typesniffer.go
Typo
2024-11-28 10:27:33 +00:00
FermeLeLundi
01e1bc0cb8 Update web_src/js/features/comp/ComboMarkdownEditor.js
Typo
2024-11-28 10:26:12 +00:00
FermeLeLundi
99de40b73e Update routers/web/repo/issue.go
Typo
2024-11-28 10:23:45 +00:00
FermeLeLundi
f0de20e747 Update models/git/commit_status_test.go
Typos
2024-11-28 10:15:54 +00:00
FermeLeLundi
decb673f28 Update services/repository/branch.go
Typo
2024-11-28 10:13:56 +00:00
FermeLeLundi
76d011c4b2 Update services/context/csrf.go
Typo
2024-11-28 10:12:46 +00:00
FermeLeLundi
3b47409532 Update Makefile
Typo
2024-11-28 10:11:36 +00:00
Codeberg Translate
df00b0e345 i18n: update of translations from Codeberg Translate (#6041)
Co-authored-by: 0ko <0ko@users.noreply.translate.codeberg.org>
Co-authored-by: emansije <emansije@users.noreply.translate.codeberg.org>
Co-authored-by: Kita Ikuyo <searinminecraft@courvix.com>
Co-authored-by: Edgarsons <Edgarsons@users.noreply.translate.codeberg.org>
Co-authored-by: SomeTr <SomeTr@users.noreply.translate.codeberg.org>
Co-authored-by: xtex <xtexchooser@duck.com>
Co-authored-by: CN-P5 <CN-P5@users.noreply.translate.codeberg.org>
Co-authored-by: WithLithum <WithLithum@users.noreply.translate.codeberg.org>
Co-authored-by: Wuzzy <wuzzy@disroot.org>
Co-authored-by: mahlzahn <mahlzahn@posteo.de>
Co-authored-by: Benedikt Straub <Nordfriese@users.noreply.translate.codeberg.org>
Co-authored-by: Benedikt Straub <benedikt-straub@web.de>
Co-authored-by: Lzebulon <Lzebulon@users.noreply.translate.codeberg.org>
Co-authored-by: Zughy <Zughy@users.noreply.translate.codeberg.org>
Co-authored-by: EssGeeEich <EssGeeEich@users.noreply.translate.codeberg.org>
Co-authored-by: Baempaieo <Baempaieo@users.noreply.translate.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-authored-by: Fjuro <fjuro@alius.cz>
Co-authored-by: antaanimosity <antaanimosity@users.noreply.translate.codeberg.org>
Co-authored-by: Atul_Eterno <Atul_Eterno@users.noreply.translate.codeberg.org>
Co-authored-by: earl-warren <earl-warren@users.noreply.translate.codeberg.org>
Co-authored-by: Outbreak2096 <Outbreak2096@users.noreply.translate.codeberg.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6041
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Codeberg Translate <translate@noreply.codeberg.org>
Co-committed-by: Codeberg Translate <translate@noreply.codeberg.org>
2024-11-28 08:41:35 +00:00
Renovate Bot
4009e6a85b Update dependency sortablejs to v1.15.5 2024-11-28 00:03:23 +00:00
Renovate Bot
7ffa8c4c2e Update dependency mermaid to v11.4.1 2024-11-28 00:03:01 +00:00
Earl Warren
22d08c62f1 Merge pull request 'feat: migrate TOTP secrets to keying' (#6074) from gusted/forgejo-totp-keying into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6074
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-11-27 18:31:35 +00:00
Earl Warren
1b796fd2d9 Merge pull request 'Fix wiki search overflowing on wide screens (#6047)' (#6063) from spiffyk/forgejo:wiki-search-too-wide into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6063
Reviewed-by: Shiny Nematoda <snematoda@noreply.codeberg.org>
2024-11-27 18:28:27 +00:00
Earl Warren
bd2593a771 Merge pull request 'fix: normalize guessed languages from enry' (#6084) from gusted/forgejo-f#-or-fsharp into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6084
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-11-27 18:24:29 +00:00
Gusted
7aeb1ba1d5
fix: normalize guessed languages from enry
- In the case that Enry correctly recognized the language, but returns
the language name in a way that isn't recognized by enry. Although
overkill I've added a map such that new entries should be easier to add.
- Resolves #6077
- Added unit test
2024-11-27 17:57:02 +01:00
Baltazár Radics
0734596eaa Use user.FullName in Oauth2 id_token response (#6071)
Cherry-pick of [gitea#32542](https://github.com/go-gitea/gitea/pull/32542).

This makes /login/oauth/authorize behave the same way as the /login/oauth/userinfo endpoint. Previously, `name` property of the returned OIDCToken used to depend on the UI.DefaultShowFullName setting (I don't think this is desired behavior). Even worse, the `userinfo` endpoint can return basically the same data, but the `name` value there always returned `FullName`, even if it's empty (no fallback to `Name`).

A few notes:

I'm not sure what branch to target with this PR, please correct me if I'm chose the wrong one.

The deleted lines in the tests are duplicates, there's a copy of the whole thing just below, the only difference being the `Name` field (used to test the dependency on the UI.DefaultShowFullName setting)

## 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.
- [ ] 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.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6071
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Baltazár Radics <baltazar.radics@gmail.com>
Co-committed-by: Baltazár Radics <baltazar.radics@gmail.com>
2024-11-27 07:48:32 +00:00
0ko
6b9168c1e8 Merge pull request 'feat: improve wording of limited visibility' (#6083) from gusted/limited-visibility into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6083
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2024-11-27 05:57:43 +00:00
Gusted
c1b1280182
feat: improve wording of limited visibility
- "Authenticated users" might suggest that there are special types of
users when it merely means users that are signed in.
- Resolves Codeberg/Documentation#427
2024-11-27 04:31:16 +01:00
Gusted
f795dd9bfb Merge pull request 'Update dependency chartjs-plugin-zoom to v2.2.0 (forgejo)' (#6082) from renovate/forgejo-chartjs-plugin-zoom-2.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6082
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-11-27 00:32:34 +00:00
Renovate Bot
6bb87ee6d7 Update dependency chartjs-plugin-zoom to v2.2.0 2024-11-27 00:03:02 +00:00
Gusted
a8c61532d2
feat: migrate TOTP secrets to keying
- Currently the TOTP secrets are stored using the `secrets` module with
as key the MD5 hash of the Secretkey, the `secrets` module uses general
bad practices. This patch migrates the secrets to use the `keying`
module (#5041) which is easier to use and use better practices to store
secrets in databases.
- Migration test added.
- Remove the Forgejo migration databases, and let the gitea migration
databases also run forgejo migration databases. This is required as the
Forgejo migration is now also touching tables that the forgejo migration
didn't create itself.
2024-11-27 00:34:16 +01:00
Earl Warren
e5417fdede Merge pull request '[gitea] week 2024-48 cherry pick (gitea/main -> forgejo)' (#6062) from earl-warren/wcp/2024-48 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6062
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-11-26 16:42:38 +00:00
Earl Warren
a7cae463b2 Merge pull request 'Improve colors used by colorblind-friendly forgejo themes' (#6059) from DanielGibson/forgejo:improve-colorblind-themes into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6059
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-11-26 16:30:53 +00:00
Otto
72f088ac05 Merge pull request 'Add Low German to list of default languages' (#6072) from Nordfriese/forgejo:low-german into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6072
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Reviewed-by: Otto <otto@codeberg.org>
2024-11-25 22:58:45 +00:00
Benedikt Straub
cd900449af
Update app.example.ini with language definitions from config-cheat-sheet.md 2024-11-25 19:34:49 +01:00
Benedikt Straub
cc8e02edda
Add Low German to list of default languages 2024-11-25 18:36:14 +01:00
Oto Šťáva
767467b9ae
Cap wiki search width at 80% container width
Co-Authored-By: Zuzana Slavíková <zuza.slavik@email.cz>
2024-11-25 09:51:26 +01:00
Oto Šťáva
c0777279fe
Fix wiki search overflowing on wide screens (#6047)
Confine the search menu to be at most the width of the page, or 80% of
the viewport width, whichever is smaller. To do this, introduce a new
`--container-width` variable for the descendant elements of
`.ui.container` to be able to access.

Also update the relevant e2e test: add a long 'lorem ipsum' page, add a
search for it, parameterize the width.
2024-11-25 09:50:13 +01:00
Earl Warren
ad70e7dfb3 Merge pull request 'Lock file maintenance (forgejo)' (#6067) from renovate/forgejo-lock-file-maintenance into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6067
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-11-25 07:39:00 +00:00
Earl Warren
cc4b7bc21b Merge pull request 'Show page titles in wiki search results (#6048)' (#6052) from spiffyk/forgejo:wiki-search-titles into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6052
Reviewed-by: Shiny Nematoda <snematoda@noreply.codeberg.org>
2024-11-25 07:37:29 +00:00
Renovate Bot
bd84864288 Update dependency sortablejs to v1.15.4 2024-11-25 03:10:44 +00:00
Renovate Bot
17b1282817 Lock file maintenance 2024-11-25 02:04:53 +00:00
Renovate Bot
5f0049bfea Update renovate to v39.28.0 (forgejo) (#6065)
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2024-11-25 00:33:00 +00:00
Earl Warren
d3ebc5b161
chore(release-notes): notes for the week 2024-48 weekly cherry pick 2024-11-24 15:43:19 +00:00
Rowan Bohde
eb0645f185
disable gravatar in test (#32529)
When running e2e tests on flaky networks, gravatar can cause a timeout
and test failures. Turn off, and populate avatars on e2e test suite run
to make them reliable.

(cherry picked from commit 9ac74a1a408136455a9e0586fb8e65163048597b)

Conflicts:
	models/fixtures/user.yml
	services/repository/contributors_graph_test.go
  trivial context conflicts
2024-11-24 15:42:36 +00:00
Lunny Xiao
32a91add34
Fix GetInactiveUsers (#32540)
Fix #31480

(cherry picked from commit 9bf821ae6c108379d22ae11d8d5784a4ed7ad647)

Conflicts:
	models/user/user_test.go
  trivial context conflict
2024-11-24 15:42:36 +00:00
Oto Šťáva
fc31fa0eeb
Show page titles in wiki search results (#6048)
Replace wiki page filenames with page titles in the search results,
fixing the problem with them showing unreadable URI-encoded names.
2024-11-24 15:55:34 +01:00
Daniel Gibson
4ec627c0b1 Improve colors used by colorblind-friendly forgejo themes
I found them to have too little contrast so I tweaked them a bit.
Screenshots and discussion can be found at:
https://codeberg.org/forgejo/forgejo/pulls/1746#issuecomment-2442469

Thanks a lot to @jpkhawam for creating the colorblind themes and for
helping me improving my changes even further! :)
2024-11-24 14:04:27 +00:00
Lunny Xiao
6482429091
Fix submodule parsing
(cherry picked from commit 33850a83fe4ebd23a762a7aac81614c42e303bfa)

This really is just the cherry pick of 407b6e6dfc7ee9ebb8a16c7f1a786e4c24d0516e
which is the first commit of the pull request, the one with the
change. The rest of the changes is a refactor that is unrelated to the
bug fix.

Conflicts:
	modules/git/commit_test.go
  trivial context conflict
2024-11-24 11:00:06 +00:00
Rowan Bohde
ddabba5f89
allow the actions user to login via the jwt token (#32527)
We have some actions that leverage the Gitea API that began receiving
401 errors, with a message that the user was not found. These actions
use the `ACTIONS_RUNTIME_TOKEN` env var in the actions job to
authenticate with the Gitea API. The format of this env var in actions
jobs changed with go-gitea/gitea/pull/28885 to be a JWT (with a
corresponding update to `act_runner`) Since it was a JWT, the OAuth
parsing logic attempted to parse it as an OAuth token, and would return
user not found, instead of falling back to look up the running task and
assigning it to the actions user.

Make ACTIONS_RUNTIME_TOKEN in action runners could be used,
attempting to parse Oauth JWTs. The code to parse potential old
`ACTION_RUNTIME_TOKEN` was kept in case someone is running an older
version of act_runner that doesn't support the Actions JWT.

(cherry picked from commit 407b6e6dfc7ee9ebb8a16c7f1a786e4c24d0516e)

Conflicts:
	services/auth/oauth2.go
  trivial context conflicts because OAuth2 scopes are in Forgejo and
  not yet in Gitea
2024-11-24 10:41:56 +00:00
Marcell Mars
262c48409b
Support HTTP POST requests to /userinfo, aligning to OpenID Core specification (#32578)
This PR adds support for the HTTP POST requests to `/userinfo` endpoint.
While the OpenID Core specification says both are supported and
recommends using HTTP GET.

ref: https://openid.net/specs/openid-connect-core-1_0.html#UserInfo
(cherry picked from commit 56bff7ae234ee21d0e4524e401a49385c383ccaf)

Conflicts:
	routers/web/web.go
  trivial context conflict
2024-11-24 10:22:40 +00:00
Kemal Zebari
e9928b7577
Remove duplicate empty repo check in delete branch API (#32569)
Found while working on #32433.

This branch will never be executed because we have would have already
made the same check a couple lines above.

(cherry picked from commit 355889dbc2432554f0bcdb22f918488849f0016c)
2024-11-24 10:20:19 +00:00
Lunny Xiao
f3afd18b76
Remove unnecessary code (#32560)
PushMirrors only be used in the repository setting page. So it should
not be loaded on every repository page.

(cherry picked from commit 0d5abd9b3e04a09f5d7de720c99e3451723e028e)
2024-11-24 10:17:44 +00:00
Kerwin Bryant
203f79a121
Fix a compilation error in the Gitpod environment (#32559)
When opening the latest code in **Gitpod** and running `make
lint-backend`, the following error occurs:
```bash
gitpod /workspace/gitea (main) $ make lint-backend
go run github.com/golangci/golangci-lint/cmd/golangci-lint@v1.60.3 run
# internal/profilerecord
compile: version "go1.23.1" does not match go tool version "go1.22.9"
# internal/goarch
compile: version "go1.23.1" does not match go tool version "go1.22.9"
# unicode/utf8
compile: version "go1.23.1" does not match go tool version "go1.22.9"
# internal/coverage/rtcov
compile: version "go1.23.1" does not match go tool version "go1.22.9"
# internal/byteorder
compile: version "go1.23.1" does not match go tool version "go1.22.9"
# cmp
compile: version "go1.23.1" does not match go tool version "go1.22.9"
# internal/itoa
compile: version "go1.23.1" does not match go tool version "go1.22.9"
# internal/race
compile: version "go1.23.1" does not match go tool version "go1.22.9"
# internal/goos
compile: version "go1.23.1" does not match go tool version "go1.22.9"
# internal/unsafeheader
compile: version "go1.23.1" does not match go tool version "go1.22.9"
# unicode
compile: version "go1.23.1" does not match go tool version "go1.22.9"
# internal/godebugs
compile: version "go1.23.1" does not match go tool version "go1.22.9"
# internal/asan
compile: version "go1.23.1" does not match go tool version "go1.22.9"
# math/bits
compile: version "go1.23.1" does not match go tool version "go1.22.9"
# internal/goexperiment
compile: version "go1.23.1" does not match go tool version "go1.22.9"
# internal/msan
compile: version "go1.23.1" does not match go tool version "go1.22.9"
# internal/runtime/atomic
compile: version "go1.23.1" does not match go tool version "go1.22.9"
# sync/atomic
compile: version "go1.23.1" does not match go tool version "go1.22.9"
# internal/runtime/syscall
compile: version "go1.23.1" does not match go tool version "go1.22.9"
# crypto/internal/alias
compile: version "go1.23.1" does not match go tool version "go1.22.9"
# encoding
compile: version "go1.23.1" does not match go tool version "go1.22.9"
# log/internal
compile: version "go1.23.1" does not match go tool version "go1.22.9"
# vendor/golang.org/x/crypto/cryptobyte/asn1
compile: version "go1.23.1" does not match go tool version "go1.22.9"
# github.com/golangci/golangci-lint/pkg/exitcodes
compile: version "go1.23.1" does not match go tool version "go1.22.9"
# internal/cpu
compile: version "go1.23.1" does not match go tool version "go1.22.9"
# unicode/utf16
compile: version "go1.23.1" does not match go tool version "go1.22.9"
# container/list
compile: version "go1.23.1" does not match go tool version "go1.22.9"
# crypto/subtle
compile: version "go1.23.1" does not match go tool version "go1.22.9"
# internal/goversion
compile: version "go1.23.1" does not match go tool version "go1.22.9"
# golang.org/x/exp/maps
compile: version "go1.23.1" does not match go tool version "go1.22.9"
# github.com/ccojocar/zxcvbn-go/match
compile: version "go1.23.1" does not match go tool version "go1.22.9"
# golang.org/x/exp/constraints
compile: version "go1.23.1" does not match go tool version "go1.22.9"
# golang.org/x/tools/internal/packagesinternal
compile: version "go1.23.1" does not match go tool version "go1.22.9"
# github.com/quasilyte/go-ruleguard/dsl/types
compile: version "go1.23.1" does not match go tool version "go1.22.9"
# vendor/golang.org/x/crypto/internal/alias
compile: version "go1.23.1" does not match go tool version "go1.22.9"
# internal/nettrace
compile: version "go1.23.1" does not match go tool version "go1.22.9"
# github.com/google/go-cmp/cmp/internal/flags
compile: version "go1.23.1" does not match go tool version "go1.22.9"
# github.com/gobwas/glob/util/runes
compile: version "go1.23.1" does not match go tool version "go1.22.9"
# internal/platform
compile: version "go1.23.1" does not match go tool version "go1.22.9"
# crypto/internal/boring/sig
compile: version "go1.23.1" does not match go tool version "go1.22.9"
# github.com/quasilyte/gogrep/internal/stdinfo
compile: version "go1.23.1" does not match go tool version "go1.22.9"
# github.com/daixiang0/gci/pkg/utils
compile: version "go1.23.1" does not match go tool version "go1.22.9"
# github.com/quasilyte/stdinfo
compile: version "go1.23.1" does not match go tool version "go1.22.9"
# github.com/Antonboom/testifylint/internal/testify
compile: version "go1.23.1" does not match go tool version "go1.22.9"
# hash/maphash
compile: version "go1.23.1" does not match go tool version "go1.22.9"
# github.com/nunnatsa/ginkgolinter/version
compile: version "go1.23.1" does not match go tool version "go1.22.9"
# google.golang.org/protobuf/internal/flags
compile: version "go1.23.1" does not match go tool version "go1.22.9"
make: *** [Makefile:413: lint-go] Error 1
```

(cherry picked from commit 32456b6f314f993efdc65fc90248b6fd1a8d55ef)
2024-11-24 10:17:27 +00:00
Earl Warren
19bde653c1 Merge pull request 'Update module github.com/stretchr/testify to v1.10.0 (forgejo)' (#6058) from renovate/forgejo-github.com-stretchr-testify-1.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6058
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-11-24 08:54:49 +00:00
Renovate Bot
8f0de303f3 Update module github.com/stretchr/testify to v1.10.0 2024-11-24 00:03:18 +00:00
Otto
c1ba9d37ab Merge pull request 'fix: Do not delete global Oauth2 applications' (#6054) from fnetx/global-oauth-corruption into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6054
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-11-23 22:47:51 +00:00
Otto Richter
1d5aee6ef8 fix: Do not delete global Oauth2 applications 2024-11-23 19:59:25 +01:00