Commit graph

20414 commits

Author SHA1 Message Date
charles
59532d93ef
Fix the wrong line number in the diff view page when expanded twice. (#31431)
close #31149, regression of #29385 (incorrect `data-query=`)

(cherry picked from commit c60ef946b1c5ed3347224cda5d3e17592cd16e5e)

Conflicts:
	templates/repo/diff/blob_excerpt.tmpl
	trivial context conflict
2024-06-23 12:48:08 +02:00
Brecht Van Lommel
585d62c0cd
Fix labels and projects menu overflow on issue page (#31435)
It was correct only on the new issue page.

Resolves #31415

(cherry picked from commit 5afafe22a34183c9c053a7ceac2c9dc05d9943e2)
2024-06-23 12:41:07 +02:00
Sumit
979eb1aa0c
[Fix] Account Linking UpdateMigrationsByType (#31428)
Fix https://github.com/go-gitea/gitea/issues/31427

(cherry picked from commit 17b3a38577d6e1d50ba5565ca3b1f2f57a04bf32)
2024-06-23 12:40:53 +02:00
charles
b53be9d45c
Fix markdown math brackets render problem (#31420)
Close #31371, support `($ ... $)` like GitHub

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
(cherry picked from commit 90a3c20e7996e2db577a51d37f2190e2e990a22a)

Conflicts:
	modules/markup/markdown/markdown_test.go
	trivial context conflict
2024-06-23 12:40:06 +02:00
silverwind
4ebe8c1270
Reduce air verbosity (#31417)
Make `air` log less. Uses the option added in
https://github.com/air-verse/air/pull/367.

(cherry picked from commit 1c1545268743d7d4536a5ff2a137af7c255f45c8)
2024-06-23 12:30:09 +02:00
Tobias Balle-Petersen
cdefd617d0
Increase max length of org team names from 30 to 255 characters (#31410)
This PR modifies the structs for editing and creating org teams to allow
team names to be up to 255 characters. The previous maximum length was
30 characters.

(cherry picked from commit 1c26127b520858671ce257c7c9ab978ed1e95252)
2024-06-23 12:21:38 +02:00
wxiaoguang
75bbca68ce
Refactor markup code (#31399)
1. use clearer names
2. remove deadcode
3. avoid name shadowing
4. eliminate some lint warnings

(cherry picked from commit 5a7376c0605415e63cb5b3b8f89ead01e567229b)

Conflicts:
	modules/markup/html.go
	simple code divergence, trivial logic
2024-06-23 11:53:36 +02:00
Earl Warren
9c48511c69
[PORT] Add cache test for admins (#31265)
* the cache was not refactored in Forgejo
* fix the test modifying a global variable
2024-06-23 11:38:35 +02:00
6543
77da92f42a
Add cache test for admins (#31265)
Add a test to probe the cache similar to the email test func.

![image](https://github.com/go-gitea/gitea/assets/24977596/700e2733-586d-4091-900f-f5f71e6e94bf)

![image](https://github.com/go-gitea/gitea/assets/24977596/2a953802-18fc-4e81-a37d-24ebe1297365)

![image](https://github.com/go-gitea/gitea/assets/24977596/e00d62ad-bb60-41cc-9138-09993daee156)

---------

Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: silverwind <me@silverwind.io>
(cherry picked from commit 363c1235987793dffa5cc851aaae585eb81f091e)

Conflicts:
	options/locale/locale_en-US.ini
	templates/admin/self_check.tmpl
	trivial context conflict
2024-06-23 11:27:03 +02:00
Earl Warren
299ef6e6db Merge pull request 'chore(dependency): raise the renovate PRs from 5 to 10' (#4211) from earl-warren/forgejo:wip-renovate into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4211
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-06-23 08:46:22 +00:00
GiteaBot
40cd885c11
[skip ci] Updated licenses and gitignores
(cherry picked from commit 129206da4543f2024601af20dac3eaf978d0c432)
2024-06-23 10:37:24 +02:00
Earl Warren
5239d9c823
chore(dependency): raise the renovate PRs from 5 to 10
Now that the backlog has been resoloved, it is not uncommon for a few
upgrade to wait for a few days before a ruling is made on wether they
should be upgraded or not.

That may leave one or two slots for other upgrades although there may
be more that could be decided immediately.

Raising the concurrency to 10 leaves room for such bursts and avoid
creating a backlog that is not justified by delays related to the
availability of contributors.
2024-06-23 09:35:36 +02:00
Earl Warren
dac93c2475 Merge pull request 'Update module github.com/go-chi/chi/v5 to v5.0.14' (#4209) from renovate/github.com-go-chi-chi-v5-5.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4209
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-23 06:46:31 +00:00
Earl Warren
a659bafaa3 Merge pull request 'Update dependency vue to v3.4.30' (#4208) from renovate/patch-vue-monorepo into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4208
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-23 06:39:43 +00:00
Renovate Bot
11e847ac74 Update module github.com/go-chi/chi/v5 to v5.0.14 2024-06-23 00:03:30 +00:00
Renovate Bot
75e1f073cc Update dependency vue to v3.4.30 2024-06-23 00:02:48 +00:00
Earl Warren
a010b138b4 Merge pull request 'Update dependency webpack to v5.92.1' (#4112) from renovate/webpack-5.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4112
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-22 13:37:53 +00:00
Earl Warren
32d1114948 Merge pull request 'Improve wording in user blocking modal' (#4204) from 0ko/forgejo:i18n-block-user-modal into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4204
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-22 12:22:03 +00:00
0ko
5d741259da [I18N] Improve wording in user blocking modal 2024-06-22 13:19:59 +05:00
Earl Warren
804aa99f06 Merge pull request 'Update dependency happy-dom to v14.12.3' (#4200) from renovate/happy-dom-14.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4200
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-22 06:32:55 +00:00
Renovate Bot
fea8f3c185 Update dependency happy-dom to v14.12.3 2024-06-22 00:03:09 +00:00
Renovate Bot
c07cc28d88 Update module code.forgejo.org/f3/gof3/v3 to v3.4.0 (#4196)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| code.forgejo.org/f3/gof3/v3 | require | minor | `v3.3.1` -> `v3.4.0` |

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am" (UTC), Automerge - "before 4am" (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:eyJjcmVhdGVkSW5WZXIiOiIzNy40MDkuMSIsInVwZGF0ZWRJblZlciI6IjM3LjQwOS4xIiwidGFyZ2V0QnJhbmNoIjoiZm9yZ2VqbyIsImxhYmVscyI6WyJkZXBlbmRlbmN5LXVwZ3JhZGUiXX0=-->

Co-authored-by: Twenty Panda <twenty-panda@posteo.com>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4196
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2024-06-21 13:51:59 +00:00
Earl Warren
7b23019040 Merge pull request 'Update ghcr.io/devcontainers/features/git-lfs Docker tag to v1.2.1' (#4191) from renovate/ghcr.io-devcontainers-features-git-lfs-1.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4191
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-06-21 08:57:01 +00:00
Earl Warren
a97adc6626
chore(dependency): group devcontainer packages and update quarterly 2024-06-21 10:18:29 +02:00
Earl Warren
96d6b0ce94 Merge pull request 'Update dependency renovate to v37.413.4' (#4192) from renovate/renovate-37.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4192
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-21 07:00:55 +00:00
Earl Warren
0e7095720b Merge pull request 'Show edit tab initially also when saved in preview tab previously' (#3969) from beowulf/show-edit-tab-initially-also-editing-comments-multiple-times-and-saving-in-preview-mode into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3969
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-06-21 06:54:54 +00:00
oliverpool
65f8c22cc7 [BUG] admin oauth2 source required check (#4194)
#4059 was unfortunately incomplete: some custom_url fields are currently shown, even if they are not used by the provider. Moreover the `Use Custom URLs Instead of Default URLs` is always checked by default.

Manual testing:
- go to http://localhost:3000/admin/auths
- click on `Add authentication source`
- Choose `Authentication type`: `OAuth2`
- Choose `OAuth2 provider`: `GitLab`
- verify that the `Use Custom URLs Instead of Default URLs` option is **initially unchecked**
- enable the `Use Custom URLs Instead of Default URLs` checkbox
- verify that only the fields "Authorize", "Token" and "Profile" URLs are shown (no "Email URL", nor "Tenant").
- Switch the `OAuth2 provider` to `Azure AD v2`
- verify that the `Use Custom URLs Instead of Default URLs` option is **initially checked**
- verify that only the field "Tenant" is shown (with the default "organizations").

![image](/attachments/0e2b1508-861c-4b0e-ae6a-6eb24ce94911)

Note: this is loosely based on the upstream fix https://github.com/go-gitea/gitea/pull/31246 which I initially overlooked.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4194
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: oliverpool <git@olivier.pfad.fr>
Co-committed-by: oliverpool <git@olivier.pfad.fr>
2024-06-21 06:21:37 +00:00
Renovate Bot
24915f4df5 Update dependency renovate to v37.413.4 2024-06-21 02:02:15 +00:00
Renovate Bot
c2c45520a5 Update ghcr.io/devcontainers/features/git-lfs Docker tag to v1.2.1 2024-06-20 00:01:42 +00:00
Renovate Bot
7c3a0d39e6 Update dependency webpack to v5.92.1 2024-06-19 18:01:53 +00:00
Earl Warren
d03a169dae Merge pull request 'Add headers to follower lists' (#4174) from 0ko/forgejo:ui-profile-followers-title into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4174
Reviewed-by: Otto <otto@codeberg.org>
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-19 09:54:41 +00:00
0ko
53215726e1 Add headers to follower lists 2024-06-19 11:53:59 +05:00
Earl Warren
b51f9fa37e Merge pull request '[SWAGGER] Make UserSettings definition an non-array' (#4182) from gusted/forgejo-api into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4182
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-19 06:36:45 +00:00
Earl Warren
f78269d16e Merge pull request 'Update module github.com/go-chi/chi/v5 to v5.0.13' (#4180) from renovate/github.com-go-chi-chi-v5-5.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4180
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-19 05:34:52 +00:00
Gusted
5926ed1f73
[SWAGGER] Make it consistent with reality
- Make the `UserSettings` definition an non-array, this is consistent
with the existing endpoints that uses this definition.
- Resolves #4179
2024-06-19 07:16:42 +02:00
Renovate Bot
07e26508b0 Update module github.com/go-chi/chi/v5 to v5.0.13 2024-06-19 00:02:33 +00:00
Earl Warren
7aa3b41dfe Merge pull request 'Port: Fix Activity Page Contributors dropdown (gitea#31264)' (#4176) from Mai-Lapyst/forgejo:cherrypick-31264 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4176
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-18 19:41:47 +00:00
Earl Warren
87625a23bb Merge pull request 'fix(renovate): add renovate.json validation to lint-backend' (#4172) from earl-warren/forgejo:wip-ci-renovate into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4172
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-06-18 19:38:09 +00:00
wxiaoguang
35447463ba
Fix Activity Page Contributors dropdown (#31264)
Fix #31261

(cherry picked from commit e728fd741be7848d476663eec1c9caaf34b46e61)
2024-06-18 20:05:23 +02:00
Earl Warren
7e0ab55e5f
fix(renovate): add renovate.json validation to lint-backend
Also catch the warning about JSON5 as an error because it will fail
the renovate run.

Fixes: https://codeberg.org/forgejo/forgejo/issues/3619
2024-06-18 19:26:17 +02:00
Elias Elwyn
abde31148f Integration test for redis alternatives - garnet, redict (#4138)
For #4082.

~~Per the discussion in the issue, the current plan will likely involve duplicating the redis library calling code once for each cacher, as neither garnet nor redict guarantee continued compatibility with redis.~~

See discussion below for details.

## Tasklist

- [x] Write workflow to run cache-specific unit test(s) only (cache, session, queue, nosql) for each cacher
- [x] Check whether garnet and redict pass unit tests with no code modification (gauge required work)
  - both passed, but that is because there were very few tests that test the remote cache store

### Out of scope for this PR

- Improve test coverage
  - `modules/cache` against a server
  - `modules/session` against a server (also needs tests in general)
- _(?) Duplicate implementation for each cacher_
  - _Restructure redis usage in `modules/cache` and `modules/settings/cache`_
  - _Restructure `modules/session` and its settings_
  - _Restructure `modules/queue` and its settings_
  - _Restructure `modules/nosql` and its settings_

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4138
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Elias Elwyn <a@jthv.ai>
Co-committed-by: Elias Elwyn <a@jthv.ai>
2024-06-18 12:31:15 +00:00
0ko
24ac2d4236 A few cosmetic improvements to the installation page (#4170)
* reword one field description
* fix top margin caused by docker installation hint in the form

## Preview

https://codeberg.org/attachments/ddcdf3f3-c31e-4ecd-b172-ac80431737cb

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4170
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-18 09:49:56 +00:00
Earl Warren
328b5d79d3 Merge pull request '[gitea] week 2024-25 cherry pick (gitea/main -> forgejo)' (#4145) from earl-warren/wcp/2024-25 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4145
Reviewed-by: twenty-panda <twenty-panda@noreply.codeberg.org>
2024-06-18 07:56:20 +00:00
Earl Warren
79e4667ce4 Merge pull request 'Update module github.com/gorilla/feeds to v1.2.0' (#4166) from renovate/github.com-gorilla-feeds-1.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4166
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-18 07:46:05 +00:00
Renovate Bot
a815eb552a
Update module github.com/gorilla/feeds to v1.2.0
Refs: https://github.com/go-gitea/gitea/pull/31400
2024-06-18 09:06:46 +02:00
Earl Warren
d7ce508894 Merge pull request 'Update dependency vite-string-plugin to v1.3.4' (#4164) from renovate/vite-string-plugin-1.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4164
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-18 06:52:04 +00:00
Renovate Bot
704f1205a6 Update dependency vite-string-plugin to v1.3.4 2024-06-18 06:02:32 +00:00
Codeberg Translate
1f386d4a83 [I18N] Translations update from Weblate (#4098)
Translations update from [Weblate](https://translate.codeberg.org) for [Forgejo/forgejo](https://translate.codeberg.org/projects/forgejo/forgejo/).

Co-authored-by: 0ko <0ko@users.noreply.translate.codeberg.org>
Co-authored-by: sinsky <sinsky@users.noreply.translate.codeberg.org>
Co-authored-by: Fjuro <fjuro@alius.cz>
Co-authored-by: Wuzzy <Wuzzy@users.noreply.translate.codeberg.org>
Co-authored-by: Dirk <Dirk@users.noreply.translate.codeberg.org>
Co-authored-by: Xinayder <Xinayder@users.noreply.translate.codeberg.org>
Co-authored-by: hankskyjames777 <hankskyjames777@users.noreply.translate.codeberg.org>
Co-authored-by: emansije <emansije@users.noreply.translate.codeberg.org>
Co-authored-by: earl-warren <earl-warren@users.noreply.translate.codeberg.org>
Co-authored-by: bbjubjub2494 <bbjubjub2494@users.noreply.translate.codeberg.org>
Co-authored-by: lotigara <lotigara@users.noreply.translate.codeberg.org>
Co-authored-by: Kita Ikuyo <searinminecraft@courvix.com>
Co-authored-by: kdh8219 <kdh8219@monamo.dev>
Co-authored-by: b1nar10 <b1nar10@users.noreply.translate.codeberg.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4098
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Codeberg Translate <translate@noreply.codeberg.org>
Co-committed-by: Codeberg Translate <translate@noreply.codeberg.org>
2024-06-18 05:27:03 +00:00
Shiny Nematoda
b5d96e7db7 [FEAT] expose fuzzy search for issues/repo (#4160)
Ports fuzzy search for `/issues` and `/pulls` from gitea.
Adds fuzzy search for `/user/repo/issues` and `/user/repo/pulls`.

---
## Notes
### Port: [`gitea#be5be0ac81`](be5be0ac81)

- CONFLICT (content): Merge conflict in routers/web/user/home.go

Conflict resolved by
  1. keeping both `PageIsOrgIssues` and the newly introduced `IsFuzzy`
  2. using `pager.AddParam(ctx, "fuzzy", "IsFuzzy")` rather than `pager.AddParamString("fuzzy", fmt.Sprintf("%v", isFuzzy))`

- CONFLICT (content): Merge conflict in templates/user/dashboard/issues.tmpl

Conflict resolved by keeping the changes from #4096, and picking the `&fuzzy=${{.IsFuzzy}}` inclusion to all urls and `{{if .PageIsPulls}}...`

### Port: [`gitea#fede3cbada`](fede3cbada)

- CONFLICT (content): Merge conflict in templates/user/dashboard/issues.tmpl

Conflict resolved by keeping previous changes and picking the replacement of `{{if .PageIsPulls}}...` with `{{template "shared/search/combo_fuzzy"...` which contains the replacement of `explorer.go` to `explorer.go_to`

### Fixup commit

replaces `Iif` with `if` which was introduced in gitea#fede3cbada

### Feature commit

adds in support for /user/repo/(issues|pulls) + test

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Kerwin Bryant <kerwin612@qq.com>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4160
Reviewed-by: twenty-panda <twenty-panda@noreply.codeberg.org>
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Shiny Nematoda <snematoda.751k2@aleeas.com>
Co-committed-by: Shiny Nematoda <snematoda.751k2@aleeas.com>
2024-06-17 18:58:24 +00:00
Earl Warren
bd23b8c75f Merge pull request 'test(dump): don't depend on directory listing order' (#4161) from emilylange/fix-dump-go-test into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4161
Reviewed-by: twenty-panda <twenty-panda@noreply.codeberg.org>
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-17 18:53:07 +00:00