Commit graph

22928 commits

Author SHA1 Message Date
Gusted
3ebd96ef73 [gitea] week 2025-16 cherry pick (gitea/main -> forgejo) (#7602)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7602
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2025-05-02 18:35:33 +00:00
Gabriel Bjørnager Jensen
f07456286e
fix(ui): Improve chronological sorting of user (#7596)
This PR changes `newest` and `oldest` sorting under *Explore/User* and *Explore/Organization* to refer to the `created_unix` column rather than `id`.

Fixes: #7595

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7596
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Gabriel Bjørnager Jensen <gabriel@achernar.io>
Co-committed-by: Gabriel Bjørnager Jensen <gabriel@achernar.io>
2025-05-02 20:33:57 +02:00
forgejo-release-manager
dbfc24001f chore(release-notes): Forgejo v7.0.15 (#7765)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7765
Co-authored-by: forgejo-release-manager <contact-forgejo-release-manager@forgejo.org>
Co-committed-by: forgejo-release-manager <contact-forgejo-release-manager@forgejo.org>
2025-05-02 15:13:14 +00:00
forgejo-release-manager
481c7aaf19 chore(release-notes): Forgejo v11.0.1 (#7764)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7764
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: forgejo-release-manager <contact-forgejo-release-manager@forgejo.org>
Co-committed-by: forgejo-release-manager <contact-forgejo-release-manager@forgejo.org>
2025-05-02 14:42:26 +00:00
0ko
5ac2c0a2ba fix(ui): multiple fixes of sync fork UI (#7740)
Followup to https://codeberg.org/forgejo/forgejo/pulls/2364
Replaces https://codeberg.org/forgejo/forgejo/pulls/7666

Fix multiple issues with the original implementation:
* `SyncFork` web handler used `{branch}` as a parameter, so it failed for branches with `/` in names
    * Originally I switched it to use `*` like other branch web handlers, but I found that it was easier to move it out from URL to POST request values
* Security: `SyncFork` web handler was using GET method, so just visiting the link was enough to execute the action
    * It was switched to POST done via form with CSRF, which also allowed to put branch name in it's values
* Security: in template, branch name was not escaped but rendered with `SafeHTML`, allowing for rendering fun characters like `&amp;` and for script execution. Also the link was not escaped correctly and would be leading to 404
    * To avoid having to change all translations, only the branch name+link part was changed and is now escaped with `HTMLFormat` before being passed to TrN

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7740
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: 0ko <0ko@noreply.codeberg.org>
Co-committed-by: 0ko <0ko@noreply.codeberg.org>
2025-05-02 14:25:05 +00:00
Earl Warren
aec8f4c57a fix: document that /repos/{owner}/{repo}/pulls may contain nulls (#7762)
The null means a server side bug prevents the pull request from being
retrieved.

Closes https://codeberg.org/forgejo/forgejo/issues/6571

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7762
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-05-02 13:53:08 +00:00
Renovate Bot
b7b70dbaf2 Update dependency forgejo/release-notes-assistant to v1.2.5 (forgejo) (#7760)
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [forgejo/release-notes-assistant](https://code.forgejo.org/forgejo/release-notes-assistant) | minor | `v1.1.1` -> `v1.2.5` |

---

### Release Notes

<details>
<summary>forgejo/release-notes-assistant (forgejo/release-notes-assistant)</summary>

### [`v1.2.5`](https://code.forgejo.org/forgejo/release-notes-assistant/releases/tag/v1.2.5)

[Compare Source](https://code.forgejo.org/forgejo/release-notes-assistant/compare/v1.2.4...v1.2.5)

<!--start release-notes-assistant-->

<!--URL:https://placeholder:ca61bc9776c376e293039231cd01158c2c2f0a4f@code.forgejo.org/forgejo/release-notes-assistant-->

-   bug fixes
    -   [PR](https://placeholder:ca61bc9776c376e293039231cd01158c2c2f0a4f@code.forgejo.org/forgejo/release-notes-assistant/pulls/60): <!--number 60 --><!--line 0 --><!--description Zml4OiBza2lwIGlmIHRoZSBsaXN0IG9mIFBScyBjb250YWlucyBhIG51bGwgZWxlbWVudA==-->fix: skip if the list of PRs contains a null element<!--description-->
-   other
    -   [PR](https://placeholder:ca61bc9776c376e293039231cd01158c2c2f0a4f@code.forgejo.org/forgejo/release-notes-assistant/pulls/55): <!--number 55 --><!--line 0 --><!--description VXBkYXRlIHJlbGVhc2UgYWN0aW9uIHRhZw==-->Update release action tag<!--description-->

<!--end release-notes-assistant-->

### [`v1.2.4`](https://code.forgejo.org/forgejo/release-notes-assistant/releases/tag/v1.2.4)

[Compare Source](https://code.forgejo.org/forgejo/release-notes-assistant/compare/v1.2.3...v1.2.4)

<!--start release-notes-assistant-->

<!--URL:https://placeholder:ca61bc9776c376e293039231cd01158c2c2f0a4f@code.forgejo.org/forgejo/release-notes-assistant-->

-   other
    -   [PR](https://placeholder:ca61bc9776c376e293039231cd01158c2c2f0a4f@code.forgejo.org/forgejo/release-notes-assistant/pulls/52): <!--number 52 --><!--line 0 --><!--description VXBkYXRlIGBzZXR1cC1mb3JnZWpvYCB0YWc=-->Update `setup-forgejo` tag<!--description-->
    -   [PR](https://placeholder:ca61bc9776c376e293039231cd01158c2c2f0a4f@code.forgejo.org/forgejo/release-notes-assistant/pulls/51): <!--number 51 --><!--line 0 --><!--description VXNlIFJOQSBmcm9tIGBmb3JnZWpvLXJlbGVhc2VgIGFjdGlvbg==-->Use RNA from `forgejo-release` action<!--description-->
    -   [PR](https://placeholder:ca61bc9776c376e293039231cd01158c2c2f0a4f@code.forgejo.org/forgejo/release-notes-assistant/pulls/47): <!--number 47 --><!--line 0 --><!--description QWRkIG5hbWUgdG8gQ0kgdGFza3M=-->Add name to CI tasks<!--description-->
    -   [PR](https://placeholder:ca61bc9776c376e293039231cd01158c2c2f0a4f@code.forgejo.org/forgejo/release-notes-assistant/pulls/45): <!--number 45 --><!--line 0 --><!--description VXNlIGBmb3JnZWpvLXJlbGVhc2VAdjJgIGFjdGlvbg==-->Use `forgejo-release@v2` action<!--description-->

<!--end release-notes-assistant-->

### [`v1.2.3`](https://code.forgejo.org/forgejo/release-notes-assistant/releases/tag/v1.2.3)

[Compare Source](https://code.forgejo.org/forgejo/release-notes-assistant/compare/v1.2.2...v1.2.3)

<!--start release-notes-assistant-->

<!--URL:https://code.forgejo.org/forgejo/release-notes-assistant-->

-   features
    -   [PR](https://code.forgejo.org/forgejo/release-notes-assistant/pulls/42): <!--number 42 --><!--line 0 --><!--description ZmVhdChjaSk6IHVzZSBSTkEgd2l0aCBSTkE=-->feat(ci): use RNA with RNA<!--description-->

<!--end release-notes-assistant-->

### [`v1.2.2`](https://code.forgejo.org/forgejo/release-notes-assistant/compare/v1.2.1...v1.2.2)

[Compare Source](https://code.forgejo.org/forgejo/release-notes-assistant/compare/v1.2.1...v1.2.2)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC), Automerge - Between 12:00 AM and 03:59 AM ( * 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:eyJjcmVhdGVkSW5WZXIiOiIzOS4yNjEuNCIsInVwZGF0ZWRJblZlciI6IjM5LjI2MS40IiwidGFyZ2V0QnJhbmNoIjoiZm9yZ2VqbyIsImxhYmVscyI6WyJkZXBlbmRlbmN5LXVwZ3JhZGUiLCJ0ZXN0L25vdC1uZWVkZWQiXX0=-->

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7760
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2025-05-02 08:53:48 +00:00
Michael Kriese
4096d0d2d6 chore(renovate): use gitea-releases datasource for rna (#7759)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7759
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Co-committed-by: Michael Kriese <michael.kriese@visualon.de>
2025-05-02 08:05:26 +00:00
Michael Kriese
e08f2ac7f1 chore(renovate): allow updating release notes assistant (#7758)
Extract release notes assistent version to a variable, so renovate can easily update it

fed044d3a3
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7758
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Co-committed-by: Michael Kriese <michael.kriese@visualon.de>
2025-05-02 07:44:09 +00:00
Earl Warren
beb985062d fix(sec): add tests for OAuth2 signup (#7755)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7755
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2025-05-02 06:25:56 +00:00
Earl Warren
c57ab693f9 fix(sec): only degrade permission check for git push (#7752)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7752
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2025-05-02 06:25:41 +00:00
Gusted
aa4ae81fe0
fix(sec): add tests for OAuth2 signup
Test two scenarios:
1. Account linking is set to `auto` and tries to link against a user who
is enrolled into Webauthn should show 2FA screen.
2. User is already linked and logins via OAuth2 and is enrolled into
WebAuthn should show 2FA screen.
2025-05-02 07:21:08 +02:00
Gusted
60c1af244a
fix(sec): only degrade permission check for git push
- A permission check is done when incoming SSH connections are handled (this is
run before git hooks). If this check is for write access and AGit flow
is supported, then this check is degraded to a read check. The
motivation behind this is that for AGit flow the user does not need
write permissions but only read permissions.
- The `if` condition cannot check if this is for AGit flow, as the Git
protocol has not run yet and thus has to delay this permission check.
This `if` condition failed to consider that this also might be run for
LFS which does not care about AGit flow and would not do a delayed
permission check, so ensure that this degradition only happens when the
`git-receive-pack` command is being run (which roughly equals to `git
push`).
- Clarify code comment.
- Added integration test.
2025-05-02 06:56:30 +02:00
Gusted
4a1487c193 feat: remove the legacy TEST_CONFLICTING_PATCHES_WITH_GIT_APPLY setting (#7745)
- The way of doing conflict testing via `git apply` stems from Gogs, it was replaced in Gitea 1.18 by `git read-tree -m` which uses 3-way merge [^0]. The option to disable the fallback `git apply` was introduced in Gitea 1.19 and enabled by default [^1].
- Given it was mostly kept just in case `git read-tree -m` was shown to be unreliable and it has been sufficiently battle tested with no known issues (in Forgejo), it's time to remove this way of conflict testing. I am not aware of anyone using this option or having any benefits over a 3-way merge via `git read-tree -m`.

[^0]: https://github.com/go-gitea/gitea/pull/18004
[^1]: https://github.com/go-gitea/gitea/pull/22130

<!--start release-notes-assistant-->

## Release notes
<!--URL:https://codeberg.org/forgejo/forgejo-->
- Breaking features
  - [PR](https://codeberg.org/forgejo/forgejo/pulls/7745): <!--number 7745 --><!--line 0 --><!--description cmVtb3ZlIHRoZSBsZWdhY3kgYFRFU1RfQ09ORkxJQ1RJTkdfUEFUQ0hFU19XSVRIX0dJVF9BUFBMWWAgc2V0dGluZw==-->remove the legacy `TEST_CONFLICTING_PATCHES_WITH_GIT_APPLY` setting<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7745
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-05-01 16:35:23 +00:00
Renovate Bot
fbc32463fc Update dependency eslint-plugin-unicorn to v59 (forgejo) (#7744)
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2025-05-01 12:54:35 +00:00
Panagiotis "Ivory" Vasilopoulos
b51ce74552 chore(ci): add clarification regarding test label (#7732)
Contributors use CI pipeline runs as a frame of reference to figure out
whether their work adhere's to Forgejo's quality assurance standards.
If a test label is missing and the CI does not run, the 'error message'
shown can cause confusion, as it might give the contributor the idea
that some action is expected from their part.

This change explicitly mentions that a reviewer must set the test
label.

Fixes forgejo/forgejo#7686.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7732
Reviewed-by: Beowulf <beowulf@beocode.eu>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Panagiotis "Ivory" Vasilopoulos <git@n0toose.net>
Co-committed-by: Panagiotis "Ivory" Vasilopoulos <git@n0toose.net>
2025-05-01 11:52:22 +00:00
Renovate Bot
55f4ee214d Update module github.com/alecthomas/chroma/v2 to v2.17.2 (forgejo) (#7738)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7738
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-05-01 10:41:26 +00:00
Earl Warren
2846aebc6a i18n: update of translations from Codeberg Translate (#7637)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7637
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2025-05-01 10:23:41 +00:00
Codeberg Translate
4a51a1f360
i18n: update of translations from Codeberg Translate
Co-authored-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Benedikt Straub <benedikt-straub@web.de>
Co-authored-by: Codeberg Translate <translate@codeberg.org>
Co-authored-by: Dirk <dirk@noreply.codeberg.org>
Co-authored-by: Edgarsons <edgarsons@noreply.codeberg.org>
Co-authored-by: Fjuro <fjuro@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-authored-by: Miguel P.L <miguel_pl@noreply.codeberg.org>
Co-authored-by: Panagiotis \"Ivory\" Vasilopoulos <git@n0toose.net>
Co-authored-by: SomeTr <sometr@noreply.codeberg.org>
Co-authored-by: Yushu <yushu@noreply.codeberg.org>
Co-authored-by: aleksi <aleksi@noreply.codeberg.org>
Co-authored-by: artnay <artnay@noreply.codeberg.org>
Co-authored-by: docudoc <docudoc@noreply.codeberg.org>
Co-authored-by: earl-warren <earl-warren@noreply.codeberg.org>
Co-authored-by: hugoalh <hugoalh@noreply.codeberg.org>
Co-authored-by: mimsee <mimsee@noreply.codeberg.org>
Co-authored-by: pixelcode <pixelcode@noreply.codeberg.org>
Co-authored-by: tacaly <frederick@tacaly.com>
Co-authored-by: xtex <xtexchooser@duck.com>
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo-next/cs/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo-next/de/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo-next/fi/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo-next/nds/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo-next/uk/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo-next/zh_Hans/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo-next/zh_Hant/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo/cs/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo/da/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo/de/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo/el/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo/es/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo/fi/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo/fr/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo/lv/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo/nl/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo/ru/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo/sv/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo/uk/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo/zh_Hans/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo/zh_Hant/
Translation: Forgejo/forgejo
Translation: Forgejo/forgejo-next
2025-05-01 09:50:01 +00:00
Renovate Bot
8bbac4c679 Update module github.com/redis/go-redis/v9 to v9.8.0 (forgejo) (#7739)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [github.com/redis/go-redis/v9](https://github.com/redis/go-redis) | require | minor | `v9.7.3` -> `v9.8.0` |

---

### Release Notes

<details>
<summary>redis/go-redis (github.com/redis/go-redis/v9)</summary>

### [`v9.8.0`](https://github.com/redis/go-redis/releases/tag/v9.8.0)

[Compare Source](https://github.com/redis/go-redis/compare/v9.7.3...v9.8.0)

### 9.8.0 (2025-04-30)

#### 🚀 Highlights

-   **Redis 8 Support**: Full compatibility with Redis 8.0, including testing and CI integration
-   **Enhanced Hash Operations**: Added support for new hash commands (`HGETDEL`, `HGETEX`, `HSETEX`) and `HSTRLEN` command
-   **Search Improvements**: Enabled Search DIALECT 2 by default and added `CountOnly` argument for `FT.Search`

####  New Features

-   Added support for new hash commands: `HGETDEL`, `HGETEX`, `HSETEX` ([#&#8203;3305](https://github.com/redis/go-redis/pull/3305))
-   Added `HSTRLEN` command for hash operations ([#&#8203;2843](https://github.com/redis/go-redis/pull/2843))
-   Added `Do` method for raw query by single connection from `pool.Conn()` ([#&#8203;3182](https://github.com/redis/go-redis/pull/3182))
-   Prevent false-positive marshaling by treating zero time.Time as empty in isEmptyValue ([#&#8203;3273](https://github.com/redis/go-redis/pull/3273))
-   Added FailoverClusterClient support for Universal client ([#&#8203;2794](https://github.com/redis/go-redis/pull/2794))
-   Added support for cluster mode with `IsClusterMode` config parameter ([#&#8203;3255](https://github.com/redis/go-redis/pull/3255))
-   Added client name support in `HELLO` RESP handshake ([#&#8203;3294](https://github.com/redis/go-redis/pull/3294))
-   **Enabled Search DIALECT 2 by default** ([#&#8203;3213](https://github.com/redis/go-redis/pull/3213))
-   Added read-only option for failover configurations ([#&#8203;3281](https://github.com/redis/go-redis/pull/3281))
-   Added `CountOnly` argument for `FT.Search` to use `LIMIT 0 0` ([#&#8203;3338](https://github.com/redis/go-redis/pull/3338))
-   Added `DB` option support in `NewFailoverClusterClient` ([#&#8203;3342](https://github.com/redis/go-redis/pull/3342))
-   Added `nil` check for the options when creating a client ([#&#8203;3363](https://github.com/redis/go-redis/pull/3363))

#### 🐛 Bug Fixes

-   Fixed `PubSub` concurrency safety issues ([#&#8203;3360](https://github.com/redis/go-redis/pull/3360))
-   Fixed panic caused when argument is `nil` ([#&#8203;3353](https://github.com/redis/go-redis/pull/3353))
-   Improved error handling when fetching master node from sentinels ([#&#8203;3349](https://github.com/redis/go-redis/pull/3349))
-   Fixed connection pool timeout issues and increased retries ([#&#8203;3298](https://github.com/redis/go-redis/pull/3298))
-   Fixed context cancellation error leading to connection spikes on Primary instances ([#&#8203;3190](https://github.com/redis/go-redis/pull/3190))
-   Fixed RedisCluster client to consider `MASTERDOWN` a retriable error ([#&#8203;3164](https://github.com/redis/go-redis/pull/3164))
-   Fixed tracing to show complete commands instead of truncated versions ([#&#8203;3290](https://github.com/redis/go-redis/pull/3290))
-   Fixed OpenTelemetry instrumentation to prevent multiple span reporting ([#&#8203;3168](https://github.com/redis/go-redis/pull/3168))
-   Fixed `FT.Search` Limit argument and added `CountOnly` argument for limit 0 0 ([#&#8203;3338](https://github.com/redis/go-redis/pull/3338))
-   Fixed missing command in interface ([#&#8203;3344](https://github.com/redis/go-redis/pull/3344))
-   Fixed slot calculation for `COUNTKEYSINSLOT` command ([#&#8203;3327](https://github.com/redis/go-redis/pull/3327))
-   Updated PubSub implementation with correct context ([#&#8203;3329](https://github.com/redis/go-redis/pull/3329))

#### 📚 Documentation

-   Added hash search examples ([#&#8203;3357](https://github.com/redis/go-redis/pull/3357))
-   Fixed documentation comments ([#&#8203;3351](https://github.com/redis/go-redis/pull/3351))
-   Added `CountOnly` search example ([#&#8203;3345](https://github.com/redis/go-redis/pull/3345))
-   Added examples for list commands: `LLEN`, `LPOP`, `LPUSH`, `LRANGE`, `RPOP`, `RPUSH` ([#&#8203;3234](https://github.com/redis/go-redis/pull/3234))
-   Added `SADD` and `SMEMBERS` command examples ([#&#8203;3242](https://github.com/redis/go-redis/pull/3242))
-   Updated `README.md` to use Redis Discord guild ([#&#8203;3331](https://github.com/redis/go-redis/pull/3331))
-   Updated `HExpire` command documentation ([#&#8203;3355](https://github.com/redis/go-redis/pull/3355))
-   Featured OpenTelemetry instrumentation more prominently ([#&#8203;3316](https://github.com/redis/go-redis/pull/3316))
-   Updated `README.md` with additional information ([#&#8203;310ce55](https://github.com/redis/go-redis/commit/310ce55))

####  Performance and Reliability

-   Bound connection pool background dials to configured dial timeout ([#&#8203;3089](https://github.com/redis/go-redis/pull/3089))
-   Ensured context isn't exhausted via concurrent query ([#&#8203;3334](https://github.com/redis/go-redis/pull/3334))

#### 🔧 Dependencies and Infrastructure

-   Updated testing image to Redis 8.0-RC2 ([#&#8203;3361](https://github.com/redis/go-redis/pull/3361))
-   Enabled CI for Redis CE 8.0 ([#&#8203;3274](https://github.com/redis/go-redis/pull/3274))
-   Updated various dependencies:
    -   Bumped golangci/golangci-lint-action from 6.5.0 to 7.0.0 ([#&#8203;3354](https://github.com/redis/go-redis/pull/3354))
    -   Bumped rojopolis/spellcheck-github-actions ([#&#8203;3336](https://github.com/redis/go-redis/pull/3336))
    -   Bumped golang.org/x/net in example/otel ([#&#8203;3308](https://github.com/redis/go-redis/pull/3308))
-   Migrated golangci-lint configuration to v2 format ([#&#8203;3354](https://github.com/redis/go-redis/pull/3354))

#### ⚠️ Breaking Changes

-   **Enabled Search DIALECT 2 by default** ([#&#8203;3213](https://github.com/redis/go-redis/pull/3213))
-   Dropped RedisGears (Triggers and Functions) support ([#&#8203;3321](https://github.com/redis/go-redis/pull/3321))
-   Dropped FT.PROFILE command that was never enabled ([#&#8203;3323](https://github.com/redis/go-redis/pull/3323))

#### 🔒 Security

-   Fixed network error handling on SETINFO (CVE-2025-29923) ([#&#8203;3295](https://github.com/redis/go-redis/pull/3295))

#### 🧪 Testing

-   Added integration tests for Redis 8 behavior changes in Redis Search ([#&#8203;3337](https://github.com/redis/go-redis/pull/3337))
-   Added vector types INT8 and UINT8 tests ([#&#8203;3299](https://github.com/redis/go-redis/pull/3299))
-   Added test codes for search_commands.go ([#&#8203;3285](https://github.com/redis/go-redis/pull/3285))
-   Fixed example test sorting ([#&#8203;3292](https://github.com/redis/go-redis/pull/3292))

#### 👥 Contributors

We would like to thank all the contributors who made this release possible:

[@&#8203;alexander-menshchikov](https://github.com/alexander-menshchikov), [@&#8203;EXPEbdodla](https://github.com/EXPEbdodla), [@&#8203;afti](https://github.com/afti), [@&#8203;dmaier-redislabs](https://github.com/dmaier-redislabs), [@&#8203;four_leaf_clover](https://github.com/four_leaf_clover), [@&#8203;alohaglenn](https://github.com/alohaglenn), [@&#8203;gh73962](https://github.com/gh73962), [@&#8203;justinmir](https://github.com/justinmir), [@&#8203;LINKIWI](https://github.com/LINKIWI), [@&#8203;liushuangbill](https://github.com/liushuangbill), [@&#8203;golang88](https://github.com/golang88), [@&#8203;gnpaone](https://github.com/gnpaone), [@&#8203;ndyakov](https://github.com/ndyakov), [@&#8203;nikolaydubina](https://github.com/nikolaydubina), [@&#8203;oleglacto](https://github.com/oleglacto), [@&#8203;andy-stark-redis](https://github.com/andy-stark-redis), [@&#8203;rodneyosodo](https://github.com/rodneyosodo), [@&#8203;dependabot](https://github.com/dependabot), [@&#8203;rfyiamcool](https://github.com/rfyiamcool), [@&#8203;frankxjkuang](https://github.com/frankxjkuang), [@&#8203;fukua95](https://github.com/fukua95), [@&#8203;soleymani-milad](https://github.com/soleymani-milad), [@&#8203;ofekshenawa](https://github.com/ofekshenawa), [@&#8203;khasanovbi](https://github.com/khasanovbi)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC), Automerge - Between 12:00 AM and 03:59 AM ( * 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:eyJjcmVhdGVkSW5WZXIiOiIzOS4yNjEuNCIsInVwZGF0ZWRJblZlciI6IjM5LjI2MS40IiwidGFyZ2V0QnJhbmNoIjoiZm9yZ2VqbyIsImxhYmVscyI6WyJkZXBlbmRlbmN5LXVwZ3JhZGUiLCJ0ZXN0L25vdC1uZWVkZWQiXX0=-->

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7739
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>
2025-05-01 08:45:55 +00:00
Renovate Bot
7ed278dec9 Update linters (forgejo) (#7736)
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2025-05-01 08:41:20 +00:00
Renovate Bot
e1d8afdf32 Update dependency happy-dom to v17.4.6 (forgejo) (#7735)
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2025-05-01 08:40:11 +00:00
Gusted
d7baf25a6b chore: fix test to avoid data race (#7731)
- The global Git version can be accessed by background services such as the PR checker, to minimize data race because of `MockVariableValue` resetting it. Run the mocked Git version as first test.
- Followup of forgejo/forgejo#7527

CI that is failing: https://codeberg.org/forgejo/forgejo/actions/runs/73021/jobs/10

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7731
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-04-30 14:59:33 +00:00
Gusted
c5d274a384 [gitea] week 2025-17 cherry pick (gitea/main -> forgejo) (#7713)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7713
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2025-04-30 14:50:18 +00:00
Lucas Schwiderski
9cc0d4b3d1 Show warning in locked issue discussion (#7726)
Closes: #7334

## 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.
  - [x] 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.
- [x] 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/7726
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Lucas Schwiderski <lucas@lschwiderski.de>
Co-committed-by: Lucas Schwiderski <lucas@lschwiderski.de>
2025-04-30 14:03:37 +00:00
Remo Senekowitsch
ec076e66d8 feat: use git-replay for rebasing (#7527)
Closes #7525

This is better for performance, because it can do more work in-memory. It also preserves unknown headers, which can be important for some clients. For example, Jujutsu uses a non-standard "change-id" header to track commits across rebase and amend, but regular git-rebase drops such unknown headers.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7527
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Remo Senekowitsch <remo@buenzli.dev>
Co-committed-by: Remo Senekowitsch <remo@buenzli.dev>
2025-04-29 20:51:56 +00:00
Gusted
32e64ccd34 chore: replace github.com/go-testfixtures/testfixtures (#7715)
- Replaces `github.com/go-testfixtures/testfixtures` with a homebrew solution that is fully compatible.
- The reason to replace this library is that it pulls in a lot of other libraries which is causing issues: (1) the test binary becomes bigger than necessary which really shows in incremental build times (this patch removes 27.6MiB of the integration test binary) (2) it pulls in libraries (mainly database drivers) that are not used and are not easy to upgrade in case of a security vulnerability, causing CI failures.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7715
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-04-29 19:28:56 +00:00
Earl Warren
a16350d9f4 chore(release): next-digest moved to invisible.forgejo.org (#7720)
In order to improve the security of the Forgejo infrastructure the next-digest repository was moved to a private instance.

## Testing

- After the merge, trigger a mirror to build a new v12.0-test release
- Verify in experimental that the workflows works as expected
- Verify v12.next.forgejo.org is upgraded with the latest commit
- Once the test completes
    - Tag for backport to v11 & v7
    - Manual backport to v7 because it conflicts

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7720
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-04-29 15:53:08 +00:00
Squel
8c81dca8b9 feat: allow access to /api/v1/packages/{username} without token (#7716)
- Only require tokens on package endpoints that modify packages, this being deletion of a package and (un)link of a package.
- Allows reading data via the API of otherwise public data
- Integration test added.

Some references to related past commits:
- de484e86bc Started requiring tokens for reading packages "mimicking the design of GitHub OAuth scopes".
- 18de83b2a3 Adjusted the scope further, but kept the GitHub design.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7716
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Squel <squeljur+git@gmail.com>
Co-committed-by: Squel <squeljur+git@gmail.com>
2025-04-29 14:37:19 +00:00
Kenneth Bruen
f6599099ee feat: add label for avatar settings (#7678)
By redirecting the user to the settings when clicking on the avatar, it is not immediately obvious that the user has to scroll down the page to change their avatar. By adding an id to reference in the fragment, we fix this.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7678
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Kenneth Bruen <kenny@kbruen.ro>
Co-committed-by: Kenneth Bruen <kenny@kbruen.ro>
2025-04-29 13:31:07 +00:00
Gusted
df5d656827 feat: consider WebAuthn & SSH for instance signing (#7693)
- Currently the options `pubkey` and `twofa` only consider TOTP and GPG keys respectively. Adjust the code to also consider WebAuthn credentials and SSH keys.
- While adding the new unified functions I noticed that certain places also benefited from using these unified functions and took the liberty (where it was either a trivial translation or it was covered under testing) to use the new unified functions.
- Resolves forgejo/forgejo#7658
- Adds unit and integration tests.

Documentation PR: https://codeberg.org/forgejo/docs/pulls/1166

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7693
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-04-29 10:34:07 +00:00
Lunny Xiao
d07a9a1b56 Update token creation API swagger documentation (#34288)
Fix #34231

(cherry picked from commit 0376c09fc27d848dbac471b629c83fd7a231852b)
2025-04-29 10:12:45 +02:00
christopher-besch
386e7f8208 send mail on failed or recovered workflow run (#7509)
Send a Mail when an action run fails or a workflow recovers.

This PR depends on https://codeberg.org/forgejo/forgejo/pulls/7491

closes #3719

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

<!--start release-notes-assistant-->

## Release notes
<!--URL:https://codeberg.org/forgejo/forgejo-->
- Features
  - [PR](https://codeberg.org/forgejo/forgejo/pulls/7509): <!--number 7509 --><!--line 0 --><!--description c2VuZCBtYWlsIG9uIGZhaWxlZCBvciByZWNvdmVyZWQgd29ya2Zsb3cgcnVu-->send mail on failed or recovered workflow run<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7509
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: christopher-besch <mail@chris-besch.com>
Co-committed-by: christopher-besch <mail@chris-besch.com>
2025-04-29 06:58:05 +00:00
Earl Warren
bc99bf5e8f fix: do not set GOPROXY=direct in Dockerfile* (#7707)
The default should be https://proxy.golang.org,direct otherwise someone trying to build the container image from sources will run into throttling limits imposed by code.forgejo.org (making more tha 10 request per second).

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7707
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Reviewed-by: Lucas <sclu1034@noreply.codeberg.org>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-04-28 17:35:25 +00:00
0ko
b25091f757 chore(ui): remove unused fomantic font size classes (#7705)
One can grep `massive` and `huge` on the current codebase and not find any evidence of these classes being used anywhere in the UI, probably because there's a good reason for this. So these rules are a dead weight.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7705
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2025-04-28 16:43:22 +00:00
Michael Jerger
bc8c3cc009 fix linting 2025-04-28 16:41:33 +02:00
Renovate Bot
eb188cf83f Lock file maintenance (forgejo) (#7696)
This PR contains the following updates:

| Update | Change |
|---|---|
| lockFileMaintenance | All locks refreshed |

🔧 This Pull Request updates lock files to use the latest dependency versions.

---

### Configuration

📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM, only on Monday ( * 0-3 * * 1 ) (UTC), Automerge - Between 12:00 AM and 03:59 AM ( * 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.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/renovate/discussions) if that's undesired.

---

 - [ ] <!-- 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:eyJjcmVhdGVkSW5WZXIiOiIzOS4yNTIuMCIsInVwZGF0ZWRJblZlciI6IjM5LjI1Mi4wIiwidGFyZ2V0QnJhbmNoIjoiZm9yZ2VqbyIsImxhYmVscyI6WyJkZXBlbmRlbmN5LXVwZ3JhZGUiLCJ0ZXN0L25vdC1uZWVkZWQiXX0=-->

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7696
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>
2025-04-28 07:17:50 +00:00
Renovate Bot
61b9535039 Update renovate to v39.261.4 (forgejo) (#7695)
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2025-04-28 06:57:08 +00:00
Ellen Emilia Anna Zscheile
a0cc05ba92 fix various typos (#7690)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7690
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: floss4good <floss4good@noreply.codeberg.org>
Reviewed-by: Beowulf <beowulf@beocode.eu>
Co-authored-by: Ellen Emilia Anna Zscheile <fogti+devel@ytrizja.de>
Co-committed-by: Ellen Emilia Anna Zscheile <fogti+devel@ytrizja.de>
2025-04-28 06:46:29 +00:00
Renovate Bot
9e70ff57b4 Update module github.com/yuin/goldmark to v1.7.11 (forgejo) (#7689)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [github.com/yuin/goldmark](https://github.com/yuin/goldmark) | require | patch | `v1.7.8` -> `v1.7.11` |

---

### Release Notes

<details>
<summary>yuin/goldmark (github.com/yuin/goldmark)</summary>

### [`v1.7.11`](https://github.com/yuin/goldmark/releases/tag/v1.7.11): release

[Compare Source](https://github.com/yuin/goldmark/compare/v1.7.10...v1.7.11)

### [`v1.7.10`](https://github.com/yuin/goldmark/releases/tag/v1.7.10): release

[Compare Source](https://github.com/yuin/goldmark/compare/v1.7.9...v1.7.10)

### [`v1.7.9`](https://github.com/yuin/goldmark/releases/tag/v1.7.9): release

[Compare Source](https://github.com/yuin/goldmark/compare/v1.7.8...v1.7.9)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC), Automerge - Between 12:00 AM and 03:59 AM ( * 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:eyJjcmVhdGVkSW5WZXIiOiIzOS4yNTIuMCIsInVwZGF0ZWRJblZlciI6IjM5LjI1Mi4wIiwidGFyZ2V0QnJhbmNoIjoiZm9yZ2VqbyIsImxhYmVscyI6WyJkZXBlbmRlbmN5LXVwZ3JhZGUiLCJ0ZXN0L25vdC1uZWVkZWQiXX0=-->

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7689
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-04-28 06:43:38 +00:00
christopher-besch
95ad7d6201 better comments and variable names for ActionRunNowDone (#7697)
Document a bit more clearly what the difference between the parameters to `sendActionRunNowDoneNotificationIfNeeded` and `ActionRunNowDone` are: `priorState`, `run`, `lastRun`, `updatedRun`.
The new variable names should be more explicit and consistent.

## 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

- [x] 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/7697
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: christopher-besch <mail@chris-besch.com>
Co-committed-by: christopher-besch <mail@chris-besch.com>
2025-04-28 06:37:08 +00:00
Gusted
31cd8c6d38 fix: use linguist-generated for language stats (#7685)
- Adds code comment to explain behavior of the `linguist-generated` gitattribute.
- Adjusts the code to ignore the file if `linguist-generated` is true.
- Resolves forgejo/forgejo#7677
- Adds unit testing.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7685
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-04-27 23:29:21 +00:00
Earl Warren
055fc6e0c3 chore: tune down remote user promotion debug message shown as error (#7687)
It is not an error for a remote user to not be promoted: this is the case for all users created via OAuth. Displaying an error is confusing to the admin when seen in the logs.

Refs: https://codeberg.org/forgejo/forgejo/issues/7681

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7687
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-04-27 20:50:48 +00:00
Gusted
2ce7affc9a fix: set default restricted for OAuth2 user (#7683)
Some checks failed
/ release (push) Has been cancelled
testing / backend-checks (push) Has been cancelled
testing / frontend-checks (push) Has been cancelled
testing / test-unit (push) Has been cancelled
testing / test-e2e (push) Has been cancelled
testing / test-remote-cacher (redis) (push) Has been cancelled
testing / test-remote-cacher (valkey) (push) Has been cancelled
testing / test-remote-cacher (garnet) (push) Has been cancelled
testing / test-remote-cacher (redict) (push) Has been cancelled
testing / test-mysql (push) Has been cancelled
testing / test-pgsql (push) Has been cancelled
testing / test-sqlite (push) Has been cancelled
testing / security-check (push) Has been cancelled
- The OAuthCallback code that is responsible for creating a new user, if one does not exist yet, did not use `[service].ALLOW_ONLY_EXTERNAL_REGISTRATION` as default value for the restricted field of a user.
- Resolves forgejo/forgejo#7681
- Add integration test.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7683
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-04-27 19:51:09 +00:00
Gusted
00761a15d1 chore: simplify GetDiff (#7682)
- Split `GetDiff` into two functions, `GetDiffSimple` and `GetDiffFull`. The former will do the bare minimum and really only get a Git diff while the latter does some extra stuff that's relevant for the frontend to show extra relevant.
- Use `GetDiffSimple` for API related calls, as they do not benefit nor are returning the extra information that `GetDiffFull` provides, this should show a measurable performance increase for API calls that returns commits and `/repos/{owner}/{repo}/pulls/{index}/files`.
- `GetDiffSimple` contains extra code comments about its interesting way to determine the before commit.
- Add unit tests to demonstrates that the logic for determining the before commit didn't change and the function still yields correct information.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7682
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-04-27 19:49:59 +00:00
Lucas Schwiderski
afcb7262ea Use available screen width for Actions logs (#7128)
Closes #7119.

![image](/attachments/a34e95c5-0301-465f-a616-9889dbf1f42d)

## 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.
- [x] 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/7128
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Lucas Schwiderski <lucas@lschwiderski.de>
Co-committed-by: Lucas Schwiderski <lucas@lschwiderski.de>
2025-04-27 12:13:13 +00:00
Matt Latusek
9289e293fd feat: Makefile & BSDmakefile changes (#7455)
Some checks failed
/ 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
Integration tests for the release process / release-simulation (push) Has been cancelled
This set of commits fixes multiple issues with both make scripts. It started with #7358 and digging into it I found more problems.

@Gusted [commented](https://codeberg.org/forgejo/forgejo/issues/7358#issuecomment-3145145):
>  I do think the place where verify-version gets called should likely be backend instead and the error should likely include extra details on how to fix the error, but that can be discussed in the PR.

I think it should be closest to where `$(FORGEJO_VERSION)` is used and that's part of `$(LDFLAGS)`, so I added it where the latter is used.

When it comes to wording feel free to make suggestions.

**I haven't tested docker builds.**

I believe the most optimal way to do it is to create POSIX-compliant shell script where all those conditionals and variable expansion may be placed, and then that script should generate POSIX-compliant Makefile.

# Testing

## BSDMakefile

Should be launched from a BSD OS. You need to add `-f BSDMakefile` on OpenBSD.

* `make show-version-major show-version-minor`
Should display two lines with version numbers.
* `make TAGS=bindata`
Should launch the building process once.

## Makefile

* `make TAGS=bindata`
Should do the same as `make build`.
* `make `*target*
Should build given target like it used to.
* Copy everything except *.git* and *VERSION* to a separate directory.
`make TAGS=bindata`
Should fail with error “Could not determine FORGEJO_VERSION...”
* Copy everything except *.git* and *VERSION* to a separate directory.
`make clean`
Should execute correctly.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7455
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Matt Latusek <matlib@matlibhax.com>
Co-committed-by: Matt Latusek <matlib@matlibhax.com>
2025-04-27 10:04:32 +00:00
aec
224cb07907 i18n(en): fix typo in archive notice (#7667)
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
Fixed minor typo in the archive notice.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7667
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: aec <aec@noreply.codeberg.org>
Co-committed-by: aec <aec@noreply.codeberg.org>
2025-04-26 15:39:25 +00:00
Renovate Bot
cbcb04cf53 Update dependency @stoplight/spectral-cli to v6.15.0 (forgejo) (#7664)
Some checks are pending
Integration tests for the release process / release-simulation (push) Waiting to run
/ 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
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2025-04-26 08:40:28 +00:00
Renovate Bot
b8d7303828 Update module github.com/PuerkitoBio/goquery to v1.10.3 (forgejo) (#7662)
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2025-04-26 08:40:26 +00:00