Commit graph

22463 commits

Author SHA1 Message Date
Renovate Bot
ab69057327 Update dependency esbuild-loader to v4.3.0 (forgejo) (#6903)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [esbuild-loader](https://github.com/privatenumber/esbuild-loader) | dependencies | minor | [`4.2.2` -> `4.3.0`](https://renovatebot.com/diffs/npm/esbuild-loader/4.2.2/4.3.0) |

---

### Release Notes

<details>
<summary>privatenumber/esbuild-loader (esbuild-loader)</summary>

### [`v4.3.0`](https://github.com/privatenumber/esbuild-loader/releases/tag/v4.3.0)

[Compare Source](https://github.com/privatenumber/esbuild-loader/compare/v4.2.2...v4.3.0)

##### Features

-   upgrade esbuild to `^0.25` ([#&#8203;382](https://github.com/privatenumber/esbuild-loader/issues/382)) ([42ec34f](42ec34f31a))

</details>

---

### Configuration

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

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

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

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

---

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

---

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

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6903
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-02-12 10:35:13 +00:00
0ko
a6e0d3e37c fix(ui): hide extra PR property labels on title edit (#6898)
* hide labels [AGit](https://codeberg.org/forgejo/forgejo/pulls/2444) and [Editable](https://codeberg.org/forgejo/forgejo/pulls/6863) on title edit mode: they make layout broken and are not really needed at edit state
* make the code slightly less boring

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6898
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Panagiotis "Ivory" Vasilopoulos <git@n0toose.net>
Co-authored-by: 0ko <0ko@noreply.codeberg.org>
Co-committed-by: 0ko <0ko@noreply.codeberg.org>
2025-02-12 08:31:20 +00:00
Alessandro Ogier
90adede20b enable ssh mirrors in rootless images (#6896)
This mini-PR fixes mirror feature on docker rootless images, as discussed in #6894.

Thank you, regards

## Testing

- 24h After the PR is merged
- Visit https://v11.next.forgejo.org and create a ssh based mirror

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

## Release notes
<!--URL:https://codeberg.org/forgejo/forgejo-->
- Bug fixes
  - [PR](https://codeberg.org/forgejo/forgejo/pulls/6896): <!--number 6896 --><!--line 0 --><!--description ZW5hYmxlIHNzaCBtaXJyb3JzIGluIHJvb3RsZXNzIGltYWdlcw==-->enable ssh mirrors in rootless images<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6896
Reviewed-by: Otto <otto@codeberg.org>
Co-authored-by: Alessandro Ogier <alessandro.ogier@gmail.com>
Co-committed-by: Alessandro Ogier <alessandro.ogier@gmail.com>
2025-02-11 20:41:01 +00:00
Gusted
5509ce5557 [gitea] week 2025-07 cherry pick (gitea/main -> forgejo) (#6865)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6865
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2025-02-11 16:22:58 +00:00
Renovate Bot
067ddca6d3 Update dependency postcss to v8.5.2 (forgejo) (#6890)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6890
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-02-11 14:51:59 +00:00
Mirco
179f85cf49 Transient model for federated unstar (#6740)
This is the first step to https://codeberg.org/forgejo-contrib/federation/src/branch/main/FederationRoadmap.md#federated-unstar-wip

Co-authored-by: Michael Jerger <michael.jerger@meissa-gmbh.de>
Co-authored-by: ansgarz <ansgar.zwick@meissa.de>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6740
Reviewed-by: Otto <otto@codeberg.org>
Co-authored-by: Mirco <mirco.zachmann@meissa.de>
Co-committed-by: Mirco <mirco.zachmann@meissa.de>
2025-02-11 12:49:32 +00:00
Renovate Bot
0dcc72dcd9 Update module golang.org/x/net to v0.35.0 (forgejo) (#6891)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6891
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-02-11 12:34:42 +00:00
Otto
afa8e5ad13 fix: always set stripped slashes on http request (#6866)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6866
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Otto <otto@codeberg.org>
2025-02-10 18:30:52 +00:00
0ko
ed292505b6 fix(ui): use "organization name" in coldown messages for orgs (#6882)
Followup to https://codeberg.org/forgejo/forgejo/pulls/6422, resolving issue reported by @SomeTr on Weblate.

When reviewing that PR I assumed that org settings UI also references the name as "Username", but now I checked it and it's actually "Organization name".

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6882
Reviewed-by: Otto <otto@codeberg.org>
Co-authored-by: 0ko <0ko@noreply.codeberg.org>
Co-committed-by: 0ko <0ko@noreply.codeberg.org>
2025-02-10 18:30:39 +00:00
0ko
bb07f30b4f feat(ui): Display to maintainers in PR when it is editable (#6863)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6863
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2025-02-10 16:21:39 +00:00
Gusted
cf157ab360
fix: always set stripped slashes on http request
- The middleware that takes care of normalizing '//user2/////repo1' to
`/user2/repo1` would only set the normalized value to the Chi (Forgejo's
http router) `RoutePath` field, so Chi would correctly do the routing.
However not all components in Forgejo (like Forgejo's `context` module)
rely on Chi to get this updated path and some still rely on the value of
`(http.Request).URL.Path`, so always set the normalized value to the
http request.
- Adjusted unit test.
- Resolves forgejo/forgejo#6822
- The related issue was caused by
751a3da979/services/context/context.go (L115)
using the value of the http request on not that was set in the Chi context.
2025-02-10 12:55:11 +01:00
Renovate Bot
2a75f0733d Update module github.com/minio/minio-go/v7 to v7.0.85 (forgejo) (#6875)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [github.com/minio/minio-go/v7](https://github.com/minio/minio-go) | require | patch | `v7.0.84` -> `v7.0.85` |

---

### Release Notes

<details>
<summary>minio/minio-go (github.com/minio/minio-go/v7)</summary>

### [`v7.0.85`](https://github.com/minio/minio-go/releases/tag/v7.0.85): Bugfix Release

[Compare Source](https://github.com/minio/minio-go/compare/v7.0.84...v7.0.85)

#### What's Changed

-   Update s3-endpoints.go with ISO endpoints by [@&#8203;vnzongzna](https://github.com/vnzongzna) in https://github.com/minio/minio-go/pull/2053
-   Implement error interface for RemoveObjectError by [@&#8203;wuhaochen](https://github.com/wuhaochen) in https://github.com/minio/minio-go/pull/2058
-   allow users to extend DNS style buckets by [@&#8203;harshavardhana](https://github.com/harshavardhana) in https://github.com/minio/minio-go/pull/2057

#### New Contributors

-   [@&#8203;vnzongzna](https://github.com/vnzongzna) made their first contribution in https://github.com/minio/minio-go/pull/2053
-   [@&#8203;wuhaochen](https://github.com/wuhaochen) made their first contribution in https://github.com/minio/minio-go/pull/2058

**Full Changelog**: https://github.com/minio/minio-go/compare/v7.0.84...v7.0.85

</details>

---

### Configuration

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

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

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

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

---

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

---

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

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6875
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-02-10 07:28:34 +00:00
Renovate Bot
79d13c2686 Lock file maintenance (forgejo) (#6877)
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 - "* 0-3 * * 1" (UTC), Automerge - "* 0-3 * * *" (UTC).

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

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

👻 **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:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNTguMiIsInVwZGF0ZWRJblZlciI6IjM5LjE1OC4yIiwidGFyZ2V0QnJhbmNoIjoiZm9yZ2VqbyIsImxhYmVscyI6WyJkZXBlbmRlbmN5LXVwZ3JhZGUiLCJ0ZXN0L25vdC1uZWVkZWQiXX0=-->

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6877
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-02-10 07:28:08 +00:00
Renovate Bot
fef59104bc Update renovate to v39.164.1 (forgejo) (#6874)
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2025-02-10 07:23:56 +00:00
Beowulf
c6ab10c1ba
feat(ui): Display to maintainers in PR when it is editable 2025-02-09 16:22:25 +01:00
Gusted
3d708aeee6
chore: update deadcode 2025-02-09 10:34:12 +01:00
Kerwin Bryant
65fa66fb18
Add "No data available" display when list is empty (#33517)
Add a "No data available" message to be displayed when the list has no
data. This improves the user experience by providing clear feedback in
an empty state.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
(cherry picked from commit a52720b5b4da3e324034312f7fe1e29fd22686cc)
2025-02-09 10:25:18 +01:00
Lunny Xiao
8cda45f750
Move gitgraph from modules to services layer (#33527)
Just move, no code change.

(cherry picked from commit 466cc725bc69d9222abf17d7a22d86e7dbe991ac)
2025-02-09 10:20:47 +01:00
GiteaBot
9d2fabc7d3
[skip ci] Updated licenses and gitignores
(cherry picked from commit ed84f3737a31c46de537b688f877753a92d0ab5c)
2025-02-09 10:06:44 +01:00
Typed SIGTERM
d3689b5683
Correct bot label vertical-align (#33477)
(cherry picked from commit 50873c192559e05e88c8edbdd50ed336ef0a6c11)
2025-02-09 10:06:06 +01:00
Gusted
751a3da979 fix(api): allow collaborators to read their own permissions (#6856)
- Instead of checking the login name (which is not set in most cases and really the wrong thing to do here just like it is case sensitive) simply check that the requested user has the same ID as the doer.
- Resolves forgejo/forgejo#6837
- Add integration test.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6856
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-02-08 15:09:08 +00:00
Gusted
ed855e1492 chore(api): Improve description for repoCheckCollaborator (#6858)
- Make it clear how the API responds with if the user is a collaborator or not.
- Yes, not ideal. Should've been a JSON response instead - but backwards compatibility.
- Resolves forgejo/forgejo#6837

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6858
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-02-08 15:08:57 +00:00
Daniel Baumann
816cd117f7 fix(ui): hide 'New migration' button on org pages with migrations disabled (#6850) (#6851)
When migrations are disabled via `[repository].DISABLE_MIGRATIONS = true`, on organisation pages next to the 'New repository' button, the 'New migration' button is still shown.

This is caused by a logic error in the templates: instead of checking for disabled migrations, it checks for disabled pull mirrors. This patch fixes that to use `DisableMigrations` instead of `DisableNewPullMirrors`.

Signed-off-by: Daniel Baumann <daniel@debian.org>

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6851
Reviewed-by: Beowulf <beowulf@beocode.eu>
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Daniel Baumann <daniel@debian.org>
Co-committed-by: Daniel Baumann <daniel@debian.org>
2025-02-08 15:06:02 +00:00
Gusted
fad28141fa fix: render link in heading correctly in TOC (#6853)
- When you use a link in a heading such as `# [Text](link)` (instead of the conventional `# Text`) the TOC should only show `Text` and not `[Text](link)`.
- Use the `mdutil.Text` to only get the text from actual text nodes and not the text that was provided in the markdown input.
- Regression of e2fddcf681
- Resolves forgejo/forgejo#6847
- Added integration test.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6853
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-02-08 13:34:09 +00:00
Earl Warren
97f743a89e chore(release-notes): fix Forgejo v10.0.1 & v7.0.13 blog post URL (again) [skip ci] (#6857)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6857
Reviewed-by: Emily <emilylange@noreply.codeberg.org>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-02-08 13:17:25 +00:00
Earl Warren
da0804141b chore(release-notes): fix Forgejo v10.0.1 & v7.0.13 blog post URL (#6852)
See https://codeberg.org/forgejo/website/pulls/554 and https://forgejo.codeberg.page/@pull_554/2025-02-release-v10-0-1/

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6852
Reviewed-by: Robert Wolff <mahlzahn@posteo.de>
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-02-08 12:54:11 +00:00
forgejo-release-manager
1e4baa8439 chore(release-notes): Forgejo v10.0.1 (#6848)
https://codeberg.org/forgejo/forgejo/milestone/9468
Co-authored-by: Earl Warren <contact@earl-warren.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6848
Reviewed-by: 0ko <0ko@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-02-08 10:47:59 +00:00
forgejo-release-manager
1d2250ef45 chore(release-notes): Forgejo v7.0.13 (#6849)
https://codeberg.org/forgejo/forgejo/milestone/9022
Co-authored-by: Earl Warren <contact@earl-warren.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6849
Reviewed-by: 0ko <0ko@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-02-08 10:47:44 +00:00
Renovate Bot
24a06a7a88 Update module golang.org/x/crypto to v0.33.0 (forgejo) (#6836)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6836
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-02-08 10:24:30 +00:00
Earl Warren
b44b5fa63e fix(sec): Forgejo Actions web routes (#6844)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6844
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2025-02-08 09:16:23 +00:00
0ko
19f3639121 fix(sec): permission check for project issue (#6843) (merge commit)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6843
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2025-02-08 08:09:16 +00:00
Gusted
51060d9826
fix(sec): add tests for private issues on projects
- Add integration and unit tests to ensure that private issues on
projects are not shown in any way, shape or form when the doer has no
access to it.
2025-02-08 07:22:10 +00:00
Gusted
b1b635c1d9
fix(sec): permission check for project issue
- Do an access check when loading issues for a project column, currently
this is not done and exposes the title, labels and existence of a
private issue that the viewer of the project board may not have access
to.
- The number of issues cannot be calculated in a efficient manner
and stored in the database because their number may vary depending on
the visibility of the repositories participating in the project. The
previous implementation used the pre-calculated numbers stored in each
project, which did not reflect that potential variation.
- The code is derived from https://github.com/go-gitea/gitea/pull/22865
2025-02-08 07:22:10 +00:00
Gusted
caeb95cb10
fix(sec): modify api route for variables 2025-02-08 07:21:14 +00:00
Gusted
3705555f67
fix(sec): web route test edit and delete variable
Exhaustively test each combination of deleting and updating a action
action variable via the web route.
2025-02-08 07:21:14 +00:00
Gusted
3f4a36d2b5
fix(sec): add tests for web route delete runner
Exhaustively test each combination of deleting and updating a action
runner via the web route. Although updating an action runner was not
impacted, its good to have a test nonetheless.
2025-02-08 07:21:14 +00:00
Gusted
0b17346cff
fix(sec): web route update and delete runner variables
The web route to update and delete variables of runners did not check if
the ID that was given belonged to the context it was requested in, this
made it possible to update and delete every existing runner variable of
a instance for any authenticated user.

The code has been reworked to always take into account the context of
the request (owner and repository ID).
2025-02-08 07:21:14 +00:00
Gusted
f359ebeea5
fix(sec): web route delete runner
The web route to delete action runners did not check if the ID that was
given belonged to the context it was requested in, this made it possible
to delete every existing runner of a instance by a authenticated user.

The code was reworked to ensure that the caller of the delete
runner function retrieved the runner by ID and then checks if it belongs
to the context it was requested in, although this is not an optimal
solution it is consistent with the context checking of other code for
runners.
2025-02-08 07:21:14 +00:00
Gusted
94845020e8 feat: add commit limit for webhook payload (#6797)
- Adds a new option `[webhook].PAYLOAD_COMMIT_LIMIT` that limits the amount of commits is sent for each webhook payload, this was previously done via `[ui].FEED_MAX_COMMIT_NUM` which feels incorrect.
- The default is 15 for this new option, purely arbitary.
- Resolves forgejo/forgejo#6780
- Added unit testing, it's quite a lot because this the notification
area is not really easy to test and rather should've been a integration test
but that ends up having more complicated than trying doing an unit test.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6797
Reviewed-by: Otto <otto@codeberg.org>
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-02-07 19:26:50 +00:00
shgew
93f84db542 fix(ui): display verified icon for default gpg key (#6803)
I noticed that the icon next to the GPG key reference appears to be incorrect for commits signed by the default GPG key.

Looking into the commit history of the template file, I noticed that Forgejo-signed commits originally had a distinct icon:
gitea-unlock-cog --> octicon-shield-lock --> octicon-unverified (current)

Since octicon-unverified is also used when a commit cannot be verified (.Verification.Warning), I find it misleading for successfully signed commits. This PR changes the icon to the verified variant for better clarity.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6803
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Otto <otto@codeberg.org>
Co-authored-by: shgew <shgew@noreply.codeberg.org>
Co-committed-by: shgew <shgew@noreply.codeberg.org>
2025-02-07 12:30:25 +00:00
Gusted
c48f85797f fix: avoid y-axis clipping for branch name (#6817)
- `gt-ellipsis` is set on elements to avoid overflowing its text contents and in the case of overflowing it would show an ellipsis. To force it to not overflow `overflow: hidden` is set, however this also hides the overflow on the y-axis, `overflow-x: hidden` has the same behavior.
- To avoid avoid the branch name from being clipped, add a very small amount of padding on the y-axis. This is a workaround and not a proper solution. There does not seem a good cross-platform solution available to fix this in a proper way.
- Resolves forgejo/forgejo#6811

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6817
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-02-07 10:04:24 +00:00
0ko
b7065b7748 fix(ui): make Finish review button work again (#6818)
I bricked the Finish review button in https://codeberg.org/forgejo/forgejo/pulls/6729 because I was naive and thought there are no mines laid within JS. I was wrong, because review panel was expected to be a child of review button. I switched both selectors to context of reviewBox.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6818
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: 0ko <0ko@noreply.codeberg.org>
Co-committed-by: 0ko <0ko@noreply.codeberg.org>
2025-02-07 10:01:09 +00:00
0ko
2645c0824f chore(config): set default value of UseCompatSSHURI to true (#6820)
The default value was supposed to be set to `true` in https://codeberg.org/forgejo/forgejo/pulls/3285 for v8. However, the implementation was incomplete, because the value is being overridden to `false`:

1f24f35fe9/modules/setting/repository.go (L292)

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6820
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Robert Wolff <mahlzahn@posteo.de>
Co-authored-by: 0ko <0ko@noreply.codeberg.org>
Co-committed-by: 0ko <0ko@noreply.codeberg.org>
2025-02-07 09:25:46 +00:00
Otto Richter
7f01f3cb20 [skip ci] Fix flaky clipboard test (#6827)
The visual playwright tests for clipboard copy are flaky. The screenshot races against the modification of the tooltip, which makes the screenshots flap between "Copy to clipboard" and "Copied!". I fixed this in the second test and apparently forgot to copy it back to the first one.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6827
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Otto Richter <otto@codeberg.org>
Co-committed-by: Otto Richter <otto@codeberg.org>
2025-02-07 09:24:53 +00:00
Renovate Bot
f90bf425ad Update module github.com/go-enry/go-enry/v2 to v2.9.2 (forgejo) (#6825)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6825
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-02-07 08:15:45 +00:00
Matthias Riße
7f4f3434ec fix: consider HEAD requests to be pulls (#6750)
Previously an anonymous GET request to e.g.
https://codeberg.org/forgejo/forgejo/HEAD was allowed, as GET requests
are considered pulls and those don't need authentication for a public
repository, but a HEAD request to the same URL was rejected with a 401.
Since the result of a HEAD request is a subset of the result of a GET
request it is safe to allow HEAD as well.

This isn't really a practical issue for Forgejo itself, but I have encountered this in https://codeberg.org/forgejo-aneksajo/forgejo-aneksajo/issues/40. Since the fix isn't git-annex specific I am proposing it here.

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

- [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/6750
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Matthias Riße <m.risse@fz-juelich.de>
Co-committed-by: Matthias Riße <m.risse@fz-juelich.de>
2025-02-07 07:39:00 +00:00
0ko
5961db5aa7 ui: update styling of comment headers and role labels (#6816)
## Changes

* same as https://codeberg.org/forgejo/forgejo/pulls/6201, but for role labels
    * remove border
    * decrease paddings
    * all by simply removing `basic`
    * I did check that no important properties were added by that class
* make the header itself more compact by decreasing paddings here too
    * it's really large currently - being as high as single line content
* removed "review" label by @fnetX request

There was no heavy consideration behind these changes. I was just poking around the area from time to time and finally decided to submit something. If you think there's more consideration needed, please tell!

## Preview

![b1.webp](/attachments/626a8c26-ba21-4920-810e-2bd924997cdb)

![b2.webp](/attachments/389995d3-70d2-480f-8c75-56c59a659569)

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6816
Reviewed-by: Beowulf <beowulf@beocode.eu>
Reviewed-by: Otto <otto@codeberg.org>
Co-authored-by: 0ko <0ko@noreply.codeberg.org>
Co-committed-by: 0ko <0ko@noreply.codeberg.org>
2025-02-07 01:07:16 +00:00
Danko Aleksejevs
1f24f35fe9 Fix comment form e2e test (#6815)
This fixes the test in question erroneously failing due to a different `markdown-text-editor` present elsewhere (in this case, hidden in the "finish review" dropdown).

Having more than one comment form uncommanded would likely be a bug, so adding that selector instead of an ID.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6815
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Beowulf <beowulf@beocode.eu>
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Danko Aleksejevs <danko@very.lv>
Co-committed-by: Danko Aleksejevs <danko@very.lv>
2025-02-06 11:56:09 +00:00
Gusted
742e0c6a72 chore: teach lint-locale about locale_next (#6800)
- Ref: forgejo/forgejo#6203 & forgejo/forgejo#5703
- Moved code around to be reusable, otherwise an straightforward implementation.
- Added unit test.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6800
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-02-06 11:16:19 +00:00
Renovate Bot
6cdc78ed4f Update module golang.org/x/sys to v0.30.0 (forgejo) (#6807)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [golang.org/x/sys](https://pkg.go.dev/golang.org/x/sys) | require | minor | [`v0.29.0` -> `v0.30.0`](https://cs.opensource.google/go/x/sys/+/refs/tags/v0.29.0...refs/tags/v0.30.0) |

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6807
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-02-06 08:46:43 +00:00