Commit graph

22496 commits

Author SHA1 Message Date
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
Codeberg Translate
00a5a2365e i18n: update of translations from Codeberg Translate (#6745)
Co-authored-by: 0ko <0ko@users.noreply.translate.codeberg.org>
Co-authored-by: Miguel P.L <miguel_pl@users.noreply.translate.codeberg.org>
Co-authored-by: Laxystem <laxystem@users.noreply.translate.codeberg.org>
Co-authored-by: coralpink <coralpink@users.noreply.translate.codeberg.org>
Co-authored-by: xtex <xtexchooser@duck.com>
Co-authored-by: Lzebulon <lzebulon@users.noreply.translate.codeberg.org>
Co-authored-by: hugoalh <hugoalh@users.noreply.translate.codeberg.org>
Co-authored-by: mahlzahn <mahlzahn@posteo.de>
Co-authored-by: justbispo <justbispo@users.noreply.translate.codeberg.org>
Co-authored-by: Fjuro <fjuro@users.noreply.translate.codeberg.org>
Co-authored-by: Zughy <zughy@users.noreply.translate.codeberg.org>
Co-authored-by: Baempaieo <baempaieo@users.noreply.translate.codeberg.org>
Co-authored-by: kdh8219 <kdh8219@monamo.dev>
Co-authored-by: Edgarsons <edgarsons@users.noreply.translate.codeberg.org>
Co-authored-by: Benedikt Straub <benedikt-straub@web.de>
Co-authored-by: Coral Pink <coralpink@users.noreply.translate.codeberg.org>
Co-authored-by: Juno Takano <jutty@users.noreply.translate.codeberg.org>
Co-authored-by: tacaly <frederick@tacaly.com>
Co-authored-by: earl-warren <earl-warren@users.noreply.translate.codeberg.org>
Co-authored-by: SomeTr <sometr@users.noreply.translate.codeberg.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6745
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>
2025-02-06 08:43:30 +00:00
Earl Warren
41e74657d7 chore(i18n): lint errors (#6808)
settings.hidden_comment_types_description: Rodzaje komentarzy zaznaczone tutaj nie będą wyświetlały się na stronach zgłoszeń. Zaznaczenie "Etykieta" na przykład usunie wszystkie komentarze "<użytkownik> dodał/usunął <etykieta>".
repo.settings.add_web_hook_desc: Zintegruj <a target="_black" rel="noreferrer" href="https://TO-BE-REPLACED.COM">%s</a> ze swoim repozytorium.

Add user & label in Polish.

## Checklist

The [contributor guide](https://forgejo.org/docs/next/contributor/) contains information that will be helpful to first time contributors. There also are a few [conditions for merging Pull Requests in Forgejo repositories](https://codeberg.org/forgejo/governance/src/branch/main/PullRequestsAgreement.md). You are also welcome to join the [Forgejo development chatroom](https://matrix.to/#/#forgejo-development:matrix.org).

### Tests

- I added test coverage for Go changes...
  - [ ] in their respective `*_test.go` for unit tests.
  - [ ] in the `tests/integration` directory if it involves interactions with a live Forgejo server.
- I added test coverage for JavaScript changes...
  - [ ] in `web_src/js/*.test.js` if it can be unit tested.
  - [ ] in `tests/e2e/*.test.e2e.js` if it requires interactions with a live Forgejo server (see also the [developer guide for JavaScript testing](https://codeberg.org/forgejo/forgejo/src/branch/forgejo/tests/e2e/README.md#end-to-end-tests)).

### Documentation

- [ ] I created a pull request [to the documentation](https://codeberg.org/forgejo/docs) to explain to Forgejo users how to use this change.
- [ ] I did not document these changes and I do not expect someone else to do it.

### Release notes

- [ ] I do not want this change to show in the release notes.
- [ ] I want the title to show in the release notes with a link to this pull request.
- [ ] I want the content of the `release-notes/<pull request number>.md` to be be used for the release notes instead of the title.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6808
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-06 07:54:38 +00:00
Yann Büchau
0d3a759fdc feat: Allow opening a single-file diff from file history view (#6599)
This PR adds a small icon link to the file history list to open the diff for *only* this file in the respective commit. This is very useful if the commit in question touches a very large amount of files and finding the actual file in the diff is tedious.

- fixes #6596

Co-authored-by: Gusted <postmaster@gusted.xyz>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6599
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Yann Büchau <nobodyinperson@posteo.de>
Co-committed-by: Yann Büchau <nobodyinperson@posteo.de>
2025-02-05 17:43:27 +00:00
0ko
d1d78c1b14 fix(commenter roles): don't give system users roles (#6766)
Currently on every pull request Ghost would have a misleading "First-time contributor" role.
Also, if the issue author is a Ghost, all other ghosts who commented will be labeled as authors even if they are different ghosts.

I've added a missing check to abort all other permission and contribution checks early if the user is a ghost. Also applies to other system users, as suggested by @earl-warren.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6766
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-05 17:34:45 +00:00
Robert Wolff
862f4ad60c fix(ui): remove code search git grep warning (#6794)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6794
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Reviewed-by: Beowulf <beowulf@beocode.eu>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Shiny Nematoda <snematoda@noreply.codeberg.org>
Co-authored-by: Robert Wolff <mahlzahn@posteo.de>
Co-committed-by: Robert Wolff <mahlzahn@posteo.de>
2025-02-05 14:27:07 +00:00
0ko
0d10d0971e ui: remove divider in code search (#6796)
Related to https://codeberg.org/forgejo/forgejo/pulls/6794: it reminded me that I'm bothered by it and inspired to submit a PR.

It adds no value and looks ugly in all cases.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6796
Reviewed-by: Robert Wolff <mahlzahn@posteo.de>
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-05 11:27:35 +00:00
Robert Wolff
519169ee7b fix: more permissive markup commit hash detection (#6784)
This allows many more variants of commit hashes to be detected and interpreted as link if they are enclosed by up to two different non-word/non-digit characters. I also had in mind RTL languages, where the question mark and similar symbols are on the left of the commit hash.

Resolves #6771

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6784
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Robert Wolff <mahlzahn@posteo.de>
Co-committed-by: Robert Wolff <mahlzahn@posteo.de>
2025-02-05 09:04:19 +00:00
Gusted
499497c959 fix: make author search case insenstive (#6782)
- Make the author search in the issues and pull request list case
insenstive.
- Background: Forgejo mandates that all columns are case senstive and
only SQLite ignores this for ASCII characters with the `LIKE` operator
any other database will indeed do case senstive searching. Codeberg
recently made all columns case senstive, hence why this issue now surfaces.
- Added integration test.
- Resolves forgejo/forgejo#6744

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6782
Reviewed-by: Beowulf <beowulf@beocode.eu>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-02-04 16:33:47 +00:00
Renovate Bot
5b26596c5c Update vitest monorepo to v3 (forgejo) (major) (#6777)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6777
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
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-04 11:26:08 +00:00
Michael Kriese
bb6973033c chore(renovate): override platform version (#6779)
Needed to properly support platform automerge on codeberg.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6779
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-02-04 10:48:15 +00:00
Renovate Bot
6f181c3815 Update renovate to v39.158.2 (forgejo) (#6778)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6778
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-04 10:40:08 +00:00
Earl Warren
fd75bf83f5 Update dependency @vitest/eslint-plugin to v1.1.25 (forgejo) (#6755)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6755
2025-02-04 08:41:50 +00:00
Earl Warren
273bc9eb04 [gitea] week 2025-06 cherry pick (gitea/main -> forgejo) (#6763)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6763
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2025-02-04 08:19:06 +00:00
Renovate Bot
a89b5b5333 Update dependency @vitest/eslint-plugin to v1.1.25 2025-02-04 08:04:59 +00:00
iamyaash
aa17548b53 fix: FromAsCasting warning from Dockerfile (#6769)
## Checklist

The [contributor guide](https://forgejo.org/docs/next/contributor/) contains information that will be helpful to first time contributors. There also are a few [conditions for merging Pull Requests in Forgejo repositories](https://codeberg.org/forgejo/governance/src/branch/main/PullRequestsAgreement.md). You are also welcome to join the [Forgejo development chatroom](https://matrix.to/#/#forgejo-development:matrix.org).

### Tests

- I added test coverage for Go changes...
  - [ ] in their respective `*_test.go` for unit tests.
  - [ ] in the `tests/integration` directory if it involves interactions with a live Forgejo server.
- I added test coverage for JavaScript changes...
  - [ ] in `web_src/js/*.test.js` if it can be unit tested.
  - [ ] in `tests/e2e/*.test.e2e.js` if it requires interactions with a live Forgejo server (see also the [developer guide for JavaScript testing](https://codeberg.org/forgejo/forgejo/src/branch/forgejo/tests/e2e/README.md#end-to-end-tests)).

### Documentation

- [ ] I created a pull request [to the documentation](https://codeberg.org/forgejo/docs) to explain to Forgejo users how to use this change.
- [ ] I did not document these changes and I do not expect someone else to do it.

### Release notes

- [ ] I do not want this change to show in the release notes.
- [ ] I want the title to show in the release notes with a link to this pull request.
- [ ] I want the content of the `release-notes/<pull request number>.md` to be be used for the release notes instead of the title.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6769
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: iamyaash <iamyaash@outlook.com>
Co-committed-by: iamyaash <iamyaash@outlook.com>
2025-02-04 07:09:21 +00:00
Renovate Bot
df06904a9c Pin dependency codespell to 2.4.1 (forgejo) (#6776)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [codespell](https://github.com/codespell-project/codespell) | dev | pin | `^2.2.6` -> `2.4.1` |

Add the preset `:preserveSemverRanges` to your config if you don't want to pin your dependencies.

---

### 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 is behind base branch, 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:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNTYuMSIsInVwZGF0ZWRJblZlciI6IjM5LjE1Ni4xIiwidGFyZ2V0QnJhbmNoIjoiZm9yZ2VqbyIsImxhYmVscyI6WyJkZXBlbmRlbmN5LXVwZ3JhZGUiLCJ0ZXN0L25vdC1uZWVkZWQiXX0=-->

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6776
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-04 06:18:46 +00:00
Renovate Bot
1d8712a8d4 Lock file maintenance (forgejo) (#6768)
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:eyJjcmVhdGVkSW5WZXIiOiIzOS4xMzYuMSIsInVwZGF0ZWRJblZlciI6IjM5LjEzNi4xIiwidGFyZ2V0QnJhbmNoIjoiZm9yZ2VqbyIsImxhYmVscyI6WyJkZXBlbmRlbmN5LXVwZ3JhZGUiLCJ0ZXN0L25vdC1uZWVkZWQiXX0=-->

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6768
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-03 10:49:37 +00:00