mirror of
1
Fork 0
Commit Graph

18844 Commits

Author SHA1 Message Date
oliverpool a7570ce5ac test: LFS gc should not delete all metadata objects
and ComputeBlobHash should depend on the blob content (not only the
length)

(cherry picked from commit 3dfa5ba43a)
2024-04-26 10:27:01 +00:00
Earl Warren 8e304659c5 Merge pull request '[v7.0/forgejo] services/convert: Convert a Repository's ObjectFormatName too' (#3478) from bp-v7.0/forgejo-2385f3c into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3478
Reviewed-by: Gergely Nagy <algernon@noreply.codeberg.org>
2024-04-26 10:07:58 +00:00
Earl Warren e072201830 fix(lfs): gogit /settings/lfs/find 500 error (#3472)
Refs: https://codeberg.org/forgejo/forgejo/pulls/3448
Refs: https://codeberg.org/forgejo/forgejo/issues/3438
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3472
Reviewed-by: oliverpool <oliverpool@noreply.codeberg.org>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
(cherry picked from commit c31ae1a651)
2024-04-26 09:48:22 +00:00
Earl Warren d58b74d368 Merge pull request '[v7.0/forgejo] [FIX] Set max fuzziness to 2 for bleve' (#3477) from bp-v7.0/forgejo-a641ebf into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3477
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-04-26 09:36:09 +00:00
Gergely Nagy 9860af7f39 services/convert: Convert a Repository's ObjectFormatName too
When converting a `repo_model.Repository` to `api.Repository`, copy the
`ObjectFormatName` field too.

Fixes #3458.

Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
(cherry picked from commit 2385f3c9db)
2024-04-26 08:55:40 +00:00
Shiny Nematoda 966975a3e0 [FIX] Set max fuzziness to 2 for bleve (#3444)
closes #3443

regression from ab5f0b7558

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3444
Reviewed-by: Otto <otto@codeberg.org>
Co-authored-by: Shiny Nematoda <snematoda.751k2@aleeas.com>
Co-committed-by: Shiny Nematoda <snematoda.751k2@aleeas.com>
(cherry picked from commit a641ebf221)
2024-04-26 08:29:21 +00:00
Earl Warren 9cd8cd4874 Merge pull request '[v7.0/forgejo] docs: contributing: avoid information duplication' (#3457) from bp-v7.0/forgejo-ad9872d into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3457
Reviewed-by: Otto <otto@codeberg.org>
2024-04-26 06:55:37 +00:00
Earl Warren 1040683676 Merge pull request 'docs(release-notes): 7.0.0 LFS garbage collection and workaround' (#3471) from earl-warren/forgejo:wip-release-notes-v7.0.1 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3471
Reviewed-by: oliverpool <oliverpool@noreply.codeberg.org>
2024-04-26 06:44:51 +00:00
Earl Warren a37836f228
docs(release-notes): 7.0.0 LFS garbage collection and workaround
Refs: https://codeberg.org/forgejo/forgejo/issues/3438
2024-04-26 08:09:04 +02:00
Earl Warren 5083ea72fb [v7.0/forgejo] fix(ui): /settings/lfs/find 500 error (#3451)
When in the repository settings, visiting

- `LFS` to `/{owner}/{repo}/settings/lfs`
- `Find pointer files` to `/{owner}/{repo}/settings/lfs/pointers`
- `Find commits` to `/{owner}/{repo}/settings/lfs/find?oid=...`

failed with an error 500 because of an incorrect evaluation of the
template.

Regression introduced by
cbf923e87b

A test is added to visit the page and guard against future
regressions.

Refs: https://codeberg.org/forgejo/forgejo/issues/3438
(cherry picked from commit 078229a5e4)

Also has a backport of https://codeberg.org/forgejo/forgejo/pulls/3465/files to ensure the test fails.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3451
Reviewed-by: oliverpool <oliverpool@noreply.codeberg.org>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2024-04-25 21:46:25 +00:00
Nicolas CARPi f2628f91fe docs: contributing: avoid information duplication (#3454)
The file CONTRIBUTING.md contains a list of links that points to
different parts of the developer documentation.

Unfortunately, this list is now incomplete and contains a dead link for the
Developer Workflow.

Given that a more complete similar list is present at:
https://forgejo.org/docs/latest/developer/, this patch removes the
duplication of information, which leads to dead links and
maintenance burden, and replaces the list with simply a link to the page
that has all the current links.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3454
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Nicolas CARPi <nico-git@deltablot.email>
Co-committed-by: Nicolas CARPi <nico-git@deltablot.email>
(cherry picked from commit ad9872d884)
2024-04-25 19:13:36 +00:00
Earl Warren 5f0ae00efc Merge pull request '[v7.0/forgejo] Fix Repository icon, name and label not centered vertically' (#3453) from bp-v7.0/forgejo-a278e92 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3453
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-04-25 17:15:20 +00:00
Beowulf cbc9567f1d Fix Repository icon, name and label not centered vertically
Readded correct tailwind class for vertical centering

Regression introduced by 65e190ae8b

Fixes #3428.

(cherry picked from commit a278e925a1)
2024-04-25 16:23:36 +00:00
Earl Warren 7e3ff68ba9 Merge pull request '[v7.0/forgejo] fix(cli): admin user create first user never require a password change' (#3435) from bp-v7.0/forgejo-ec33423-b9424e6-eb74846 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3435
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-04-24 23:19:39 +00:00
Earl Warren a1f29d9a0e fix(cli): admin user create first user never require a password change
Fixes: https://codeberg.org/forgejo/forgejo/issues/3399
(cherry picked from commit ec334239e0)
2024-04-24 22:26:37 +00:00
Earl Warren 21a853aac7 test(cli): admin user change-password --must-change-password
(cherry picked from commit b9424e634f)
2024-04-24 22:26:37 +00:00
Earl Warren 8b4ca4501a test(cli): admin user create and must change password value
(cherry picked from commit eb74846d7d)
2024-04-24 22:26:37 +00:00
Earl Warren c932519946 Merge pull request '[v7.0/forgejo] fix(docs): v7.0.0 admin user create regression (take2)' (#3420) from bp-v7.0/forgejo-b127b24 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3420
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-04-24 22:06:46 +00:00
0ko b248181a99 Merge pull request '[v7.0/forgejo] UI: fix rounding of vertical menus on /issues, /pulls' (#3422) from bp-v7.0/forgejo-0956415 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3422
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Reviewed-by: Otto <otto@codeberg.org>
2024-04-24 18:44:39 +00:00
0ko 87545c721b UI: fix rounding of vertical menus on /issues, /pulls
(cherry picked from commit 0956415707)
2024-04-24 15:39:52 +00:00
Earl Warren b47f7a80cf fix(docs): v7.0.0 admin user create regression (take2)
The scope of the regression is limited to the first created user when
it is not an admin.

Refs: https://codeberg.org/forgejo/forgejo/issues/3399
(cherry picked from commit b127b24f02)
2024-04-24 15:05:42 +00:00
Earl Warren d01fc3e2f5 Merge pull request '[v7.0/forgejo] fix(docs): v7.0.0 admin user create regression' (#3417) from bp-v7.0/forgejo-4b57362 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3417
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-04-24 15:04:12 +00:00
Earl Warren bdfca7c00d fix(docs): v7.0.0 admin user create regression
The tests in Forgejo extensively rely on admin user create to create
the first admin user. This regression was not noticed because it
is an exception and a password change will not be required.

Refs: https://codeberg.org/forgejo/forgejo/issues/3399
(cherry picked from commit 4b57362056)
2024-04-24 14:05:12 +00:00
Earl Warren f341942feb Merge pull request '[v7.0/forgejo] feat(docs): 7.0.1 release notes template' (#3408) from bp-v7.0/forgejo-a760278 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3408
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-04-24 08:18:47 +00:00
Earl Warren 85a73553c9 feat(docs): 7.0.1 release notes template
so that individual commits can include additions to the release notes
when relevant.

(cherry picked from commit a7602781c4)
2024-04-24 07:26:20 +00:00
Earl Warren a134c0f172 Merge pull request 'fix(docs): backport v7.0.0 release notes' (#3405) from earl-warren/forgejo:wip-release-notes-v7.0.1 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3405
2024-04-24 07:17:11 +00:00
Earl Warren f5d9d8cbd4
fix(docs): backport v7.0.0 release notes
The v7.0 branch should have the v7.0 release notes.
2024-04-24 08:24:28 +02:00
Earl Warren 73c190af4c Merge pull request '[v7.0/forgejo] Fix the WIP prefix toggling on the sidebar' (#3390) from bp-v7.0/forgejo-a93a99e into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3390
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-04-23 08:42:03 +00:00
Gergely Nagy e947fa7acc Fix the WIP prefix toggling on the sidebar
The WIP prefix toggling link on the sidebar only supported toggling
the *first* prefix specified in
`[repository.pullrequest].WORK_IN_PROGRESS_PREFIXES`. If the pull
request had a title with any other prefix, the first prefix listed in
the config was added (and then removed on toggling it off).

This little change makes all of the prefixes available for the
JavaScript function that does the toggling, and changes said function to
find the used prefix first, and toggle that.

When adding the prefix, it will still default to adding the first one
listed in the configuration, but it will happily remove any others if
those are present.

Fixes #3377.

Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
(cherry picked from commit a93a99eef3)
2024-04-23 08:01:58 +00:00
Earl Warren bbd204c30c Merge pull request '[v7.0/forgejo] fix(incoming): allow replies to comments' (#3382) from bp-v7.0/forgejo-5428531 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3382
2024-04-22 23:46:52 +00:00
Earl Warren f58e0d8617 fix(incoming): allow replies to comments
- allow attachments to code comments
- incoming mails from issue comments are now identified as comments

Fixes: https://codeberg.org/forgejo/forgejo/issues/3374
(cherry picked from commit 54285319f6)
2024-04-22 22:43:16 +00:00
Earl Warren 9eaabc077a Merge pull request '[v7.0/forgejo] Fix dropdown text ellipsis (#30628) (#30633)' (#3373) from bp-v7.0/forgejo-112df5a into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3373
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-04-22 20:12:25 +00:00
wxiaoguang 196cef0221 Fix dropdown text ellipsis (#30628)
Follow
https://github.com/go-gitea/gitea/pull/30547#discussion_r1573866519

Fix #30624

The Fomantic UI Dropdown wasn't designed to work that way, its "text"
element might contain images. So the "overflow" shouldn't be added to
any general dropdown text.

![image](https://github.com/go-gitea/gitea/assets/2114189/f6ceaabd-bc89-4bf2-baa2-a6f0324c1962)

(cherry picked from commit 1e4867730b261352d63098b85cf53ca05867c8c2)
(cherry picked from commit 112df5a3fe)
2024-04-22 19:31:26 +00:00
Earl Warren 8859a7f1a7 Merge pull request '[v7.0/forgejo] Accessibility improvements to code review' (#3368) from bp-v7.0/forgejo-87d4746-187e10d into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3368
Reviewed-by: Otto <otto@codeberg.org>
2024-04-22 17:00:42 +00:00
Earl Warren 7316f23265 Merge pull request '[v7.0/forgejo] s/Gitea/Forgejo in various log messages and comments' (#3367) from bp-v7.0/forgejo-469c214 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3367
2024-04-22 15:37:10 +00:00
Otto Richter 4eefb64b12 Rename button to "Finish Review"
Motivation: The meaning of the button is apparent from the visual
position and the number icon. This is not exposed to a screenreader.
Naming it to "Finish Review" helps with to provide the meaning of the
button as well as the number in the label.

(cherry picked from commit 87d4746f5e)
2024-04-22 14:54:19 +00:00
Otto Richter 81cc944cda Fix unlabelled button in code review
(cherry picked from commit 187e10d8c9)
2024-04-22 14:54:19 +00:00
0ko c7ba51518c s/Gitea/Forgejo in various log messages and comments
(cherry picked from commit 469c214ec8)
2024-04-22 14:41:17 +00:00
Earl Warren 4433cd9793 Merge pull request '[v1.22/gitea] week 2024-17 cherry pick v7.0' (#3354) from earl-warren/forgejo:wip-v7.0-gitea-cherry-pick into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3354
Reviewed-by: Gergely Nagy <algernon@noreply.codeberg.org>
2024-04-22 09:55:54 +00:00
Earl Warren 792764456c Merge pull request '[v7.0/forgejo] [PORT] gitea#30546: Add form field id generation, remove duplicated ids' (#3362) from bp-v7.0/forgejo-a01387f into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3362
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-04-22 08:15:26 +00:00
silverwind 2072ff75e8 Add form field id generation, remove duplicated ids (#30546)
Fixes: https://github.com/go-gitea/gitea/issues/30384

On repo settings page, there id `repo_name` was used 5 times on the same
page, some in modal and such. I think we are better off just
auto-generating these IDs in the future so that labels link up with
their form element.

Ideally this id generation would be done in backend in a subtemplate,
but seeing that we already have similar JS patches for checkboxes, I
took the easy path for now.

I also checked that these `#repo_name` were not in use in JS and the
only case where this id appears in JS is on the migration page where
it's still there.

---------

Co-authored-by: Giteabot <teabot@gitea.io>
(cherry picked from commit d4ec6b3d16496ce3b479d5a08f79823122dc2b7b)

Conflicts:
	- templates/repo/settings/options.tmpl
	  Conflict resolved by manually removing all `id` and `for`
	  attributes from elements that had `repo_name` as their id.
(cherry picked from commit a01387f5b1)
2024-04-22 07:46:30 +00:00
Earl Warren eefa820874
[DEADCODE] update 2024-04-21 18:44:11 +02:00
Giteabot 4777ba210f
Fix package list performance (#30520) (#30616)
Backport #30520 by @KN4CK3R

Fixes #28255

The new query uses the id field to sort by "newer". This most not be
correct (usually it is) but it's faster (see #28255).
If someone has a better idea, please propose changes.

Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
(cherry picked from commit ea2ea8ef28b6a2207ec00bafaf42d428612d69eb)
2024-04-21 18:19:06 +02:00
yp05327 0a9bbdcfef
Use action user as the trigger user of schedules (#30581)
Follow https://github.com/go-gitea/gitea/pull/30357

When user push to default branch, the schedule trigger user will be the
user.
When disable then enable action units in settings, the schedule trigger
user will be action user.
When repo is a mirror, the schedule trigger user will be action user. (
before it will return error, fixed by #30357)

As scheduled job is a cron, the trigger user should be action user from
Gitea, not a real user.

---------

Co-authored-by: Giteabot <teabot@gitea.io>
(cherry picked from commit cb6814adad4dc81a683b50826a211ce7bce731d7)

Conflicts:
	- services/actions/notifier_helper.go
	  Conflict resolved by keeping Forgejo's version of the line.
(cherry picked from commit 829c3c6838)
2024-04-21 18:17:35 +02:00
Giteabot d802a8c0cf
Fix HEAD method for robots.txt (#30603) (#30605)
Backport #30603 by @wxiaoguang

Fix #30601

```
~$ curl --head localhost:3000/robots.txt
HTTP/1.1 200 OK
Accept-Ranges: bytes
Cache-Control: max-age=0, private, must-revalidate
Content-Length: 5
Content-Type: text/plain; charset=utf-8
Last-Modified: Wed, 19 Jul 2023 04:56:12 GMT
X-Gitea-Debug: RUN_MODE=dev
Date: Fri, 19 Apr 2024 12:59:44 GMT
```

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
(cherry picked from commit 7eaf7907d7f71e103baced018e6eeb271085789d)
2024-04-21 18:16:38 +02:00
Giteabot 0412657132
Avoid importing `modules/web/middleware` in `modules/session` (#30584) (#30589)
Backport #30584 by @wolfogre

Related to #30375.

It doesn't make sense to import `modules/web/middleware` and
`modules/setting` in `modules/web/session` since the last one is more
low-level.

And it looks like a workaround to call `DeleteLegacySiteCookie` in
`RegenerateSession`, so maybe we could reverse the importing by
registering hook functions.

Co-authored-by: Jason Song <i@wolfogre.com>
(cherry picked from commit 199397a852ec2d45524cefcc3c119fce4710560e)
2024-04-21 18:16:09 +02:00
Giteabot f31879069f
Improve "Reference in new issue" modal (#30547) (#30574)
Backport #30547 by @silverwind

Fixes: https://github.com/go-gitea/gitea/issues/29994

Also some misc enhancements done to the form in the modal.

<img width="840" alt="Screenshot 2024-04-17 at 23 02 55"
src="https://github.com/go-gitea/gitea/assets/115237/e71fba55-55cd-4e48-a497-6b1025c36a43">

Co-authored-by: silverwind <me@silverwind.io>
(cherry picked from commit 42019677e6cce6ae44a922e68b91d2a002450fa0)
2024-04-21 18:15:19 +02:00
Jerry Jacobs 6ad7758117
Fixup app.example.ini for task section, which is now queue.task (#30555)
Config section `[task]` has been deprecated in favor of `[queue.task]`

---------

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

Conflicts:
	- docs/content/administration/config-cheat-sheet.en-us.md
	- docs/content/administration/config-cheat-sheet.zh-cn.md
	  Removed, they're Gitea specific.
(cherry picked from commit 5271792666)
2024-04-21 18:14:45 +02:00
Giteabot 1d8316f278
Fix border-radius on view, blame and code search (#30545) (#30560)
Backport #30545 by @silverwind

Fixes: https://github.com/go-gitea/gitea/issues/30540

1. Fix all these boxes by adding `bottom attached` and removing a
problematic CSS rule:

<img width="1319" alt="Screenshot 2024-04-17 at 22 25 31"
src="https://github.com/go-gitea/gitea/assets/115237/346445a4-4944-4003-a1ef-6f5b0eda624e">
<img width="643" alt="Screenshot 2024-04-17 at 22 21 18"
src="https://github.com/go-gitea/gitea/assets/115237/10f17ed3-9ad6-48de-92fa-bac6621815b9">

2. Change the "last commit" box to `ui segment` which has correct
border-radius. Also included is a tiny tweak to make author name ellipse
instead of wrap.

<img width="1331" alt="Screenshot 2024-04-17 at 22 23 23"
src="https://github.com/go-gitea/gitea/assets/115237/285fbd45-ced0-4d33-abe3-7384ffa03188">

Co-authored-by: silverwind <me@silverwind.io>
(cherry picked from commit b4a38318c333519b1008d03fd01e14a803363498)
2024-04-21 18:11:36 +02:00
Giteabot cb4246ed57
Disable enter key for accepting code completion in Monaco (#30548) (#30559)
Backport #30548 by @silverwind

Fixes https://github.com/go-gitea/gitea/issues/28114 and behaviour
matches vscode on desktop as well.

Co-authored-by: silverwind <me@silverwind.io>
(cherry picked from commit c9633f2d74490211ffd9fd6b3a17180e86fa1fb9)
2024-04-21 18:11:02 +02:00