1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-21 12:44:49 -05:00
Commit graph

21225 commits

Author SHA1 Message Date
Earl Warren
a7165d1fb0 Merge pull request '[gitea] week 2024-41-v9.0 cherry pick (gitea/main -> v9.0/forgejo)' (#5480) from earl-warren/wcp/2024-41-v9.0 into v9.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5480
Reviewed-by: Otto <otto@codeberg.org>
2024-10-07 05:13:25 +00:00
Earl Warren
47b67fcafc
chore(release-notes): weekly cherry-pick week 2024-41-v9.0 2024-10-06 11:48:21 +02:00
Job
7d3a013e5e
Fix PR creation on forked repositories (#31863)
Resolves #20475

(cherry picked from commit 7e68bc88238104d2ee8b5a877fc1ad437f1778a4)

Conflicts:
	tests/integration/pull_create_test.go
  add missing testPullCreateDirectly from
  c63060b130d34e3f03f28f4dccbf04d381a95c17 Fix code owners will not be mentioned when a pull request comes from a forked repository (#30476)
2024-10-06 11:45:22 +02:00
Bruno Sofiato
4cb10ff28a
Fixed race condition when deleting documents by repoId in ElasticSearch (#32185)
Resolves #32184

---------

Signed-off-by: Bruno Sofiato <bruno.sofiato@gmail.com>
(cherry picked from commit d266d190bd744b7b6f572bf69a42013e21b9be62)
2024-10-06 11:45:22 +02:00
Earl Warren
00e5c68060
Fix the logic of finding the latest pull review commit ID (#32139) (followup)
Adjust the tests for review deletion to ignore a newly inserted
fixture. It is a review request and cannot be deleted.
2024-10-06 11:45:22 +02:00
Zettat123
700e9f027b
Fix the logic of finding the latest pull review commit ID (#32139)
Fix #31423

(cherry picked from commit f4b8f6fc40ce2869135372a5c6ec6418d27ebfba)

Conflicts:
	models/fixtures/comment.yml
  comment fixtures have to be shifted because there is one more in Forgejo
2024-10-06 11:34:08 +02:00
TimedIn
9ee88e965e #5324 Fix centered fork note
(cherry picked from commit 8cbb9f3116)
2024-10-06 01:57:24 +00:00
Earl Warren
0ae05e1000 Merge pull request '[v9.0/forgejo] i18n: update of translations from Codeberg Translate' (#5457) from bp-v9.0/forgejo-aca00fa into v9.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5457
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-10-04 06:39:20 +00:00
Codeberg Translate
2ff9e77dba i18n: update of translations from Codeberg Translate (#5413)
Translations update from [Codeberg Translate](https://translate.codeberg.org) for [Forgejo/forgejo](https://translate.codeberg.org/projects/forgejo/forgejo/).

Current translation status:

![Weblate translation status](https://translate.codeberg.org/widget/forgejo/forgejo/horizontal-auto.svg)

Co-authored-by: 0ko <0ko@users.noreply.translate.codeberg.org>
Co-authored-by: fnetX <otto@codeberg.org>
Co-authored-by: be4zad <be4zad@users.noreply.translate.codeberg.org>
Co-authored-by: Fjuro <fjuro@alius.cz>
Co-authored-by: hankskyjames777 <hankskyjames777@users.noreply.translate.codeberg.org>
Co-authored-by: kwoot <kwoot@users.noreply.translate.codeberg.org>
Co-authored-by: emansije <emansije@users.noreply.translate.codeberg.org>
Co-authored-by: xtex <xtexchooser@duck.com>
Co-authored-by: Outbreak2096 <Outbreak2096@users.noreply.translate.codeberg.org>
Co-authored-by: WithLithum <WithLithum@users.noreply.translate.codeberg.org>
Co-authored-by: yeziruo <yeziruo@users.noreply.translate.codeberg.org>
Co-authored-by: kecrily <kecrily@users.noreply.translate.codeberg.org>
Co-authored-by: overloop <overloop@users.noreply.translate.codeberg.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5413
Reviewed-by: Otto <otto@codeberg.org>
Co-authored-by: Codeberg Translate <translate@noreply.codeberg.org>
Co-committed-by: Codeberg Translate <translate@noreply.codeberg.org>
(cherry picked from commit aca00fa346)
2024-10-03 21:23:48 +00:00
Renovate Bot
4ddf4a8fd3 Update actions/setup-node action to v4 (v9.0/forgejo) (#5444)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5444
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>
2024-10-01 11:38:53 +00:00
Renovate Bot
4c7fef22f6 Update actions/checkout action to v4 (v9.0/forgejo) (#5443)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5443
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>
2024-10-01 11:36:57 +00:00
Renovate Bot
01e7095968 Update actions/cache action to v4 (v9.0/forgejo) (#5442)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5442
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>
2024-10-01 11:19:39 +00:00
Earl Warren
f1e413eb7c Merge pull request '[gitea] week 2024-40-v9.0 cherry pick (gitea/main -> v9.0/forgejo)' (#5418) from earl-warren/wcp/2024-40-v9.0 into v9.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5418
Reviewed-by: Otto <otto@codeberg.org>
2024-10-01 07:51:16 +00:00
Earl Warren
67b9b0c76e Merge pull request 'Lock file maintenance (v9.0/forgejo)' (#5432) from renovate/v9.0/forgejo-lock-file-maintenance into v9.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5432
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-09-30 19:00:12 +00:00
Earl Warren
56f9ddc9af Merge pull request '[v9.0/forgejo] fix: referenced sha256:* container images may be deleted' (#5433) from bp-v9.0/forgejo-0a5fd7f into v9.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5433
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-09-30 17:36:30 +00:00
Earl Warren
00749b3a8f fix: referenced sha256:* container images may be deleted
The inventory of the sha256:* images and the manifest index that
reference them is incomplete because it does not take into account any
image older than the expiration limit. As a result some sha256:* will
be considered orphaned although they are referenced from a manifest
index that was created more recently than the expiration limit.

There must not be any filtering based on the creation time when
building the inventory. The expiration limit must only be taken into
account when deleting orphaned images: those that are more recent than
the expiration limit must not be deleted.

This limit is specially important because it protects against a race
between a cleanup task and an ongoing mirroring task. A mirroring
task (such as skopeo sync) will first upload sha256:* images and then
create the corresponding manifest index. If a cleanup races against
it, the sha256:* images that are not yet referenced will be deleted
without skopeo noticing and the published index manifest that happens
at a later time will contain references to non-existent images.

(cherry picked from commit 0a5fd7fdb8)
2024-09-30 16:46:11 +00:00
Renovate Bot
8da48fead3 Lock file maintenance 2024-09-30 16:03:41 +00:00
forgejo-renovate-action
b835f0a1b0 Merge pull request 'Update dependency vue to v3.5.10 (v9.0/forgejo)' (#5419) from renovate/v9.0/forgejo-patch-vue-monorepo into v9.0/forgejo 2024-09-30 11:31:28 +00:00
Renovate Bot
f8c0a352ab Update dependency vue to v3.5.10 2024-09-29 18:02:49 +00:00
Earl Warren
859fa4e489 Merge pull request 'Update module github.com/minio/minio-go/v7 to v7.0.77 (v9.0/forgejo)' (#5420) from renovate/v9.0/forgejo-github.com-minio-minio-go-v7-7.x into v9.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5420
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-09-29 16:08:56 +00:00
Renovate Bot
e8a67571a1 Update module github.com/minio/minio-go/v7 to v7.0.77 2024-09-29 12:03:27 +00:00
Earl Warren
28c8a889bb Merge pull request 'Update dependency monaco-editor to v0.51.0 (v9.0/forgejo)' (#5399) from renovate/v9.0/forgejo-monaco-editor-0.x into v9.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5399
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-09-29 10:49:31 +00:00
Earl Warren
3003195ad7
chore(release-notes): weekly cherry-pick week 2024-40-v9.0 2024-09-29 11:58:17 +02:00
yp05327
c400f26e6c
Fix wrong status of Set up Job when first step is skipped (#32120)
Fix #32089

(cherry picked from commit 6fa962f409c84477a7a4cf35b4a38a4a93fc3224)
2024-09-29 11:52:09 +02:00
Lunny Xiao
0a0a3cea1b
Fix bug when deleting a migrated branch (#32075)
After migrating a repository with pull request, the branch is missed and
after the pull request merged, the branch cannot be deleted.

(cherry picked from commit 5a8568459d22e57cac506465463660526ca6a08f)

Conflicts:
	services/repository/branch.go
  conflict because of [GITEA] Fix typo in formatting error e71b5a038e
2024-09-29 11:51:47 +02:00
Lunny Xiao
cb88d55837
Include collaboration repositories on dashboard source/forks/mirrors list (#31946)
Fix #13489

In the original implementation, only `All` will display your owned and
collaborated repositories. For other filters like `Source`, `Mirrors`
and etc. will only display your owned repositories.

This PR removed the limitations. Now except `collbrations`, other
filters will always display your owned and collaborated repositories.

(cherry picked from commit 4947bec8360c152daca23e120eae1732d3848492)
2024-09-29 11:51:31 +02:00
Kemal Zebari
e1e7299bd9
Truncate commit message during Discord webhook push events (#31970)
Resolves #31668.

(cherry picked from commit aadbe0488f454b9f7f5a56765f4530f9d1e2c6ec)
2024-09-29 11:50:27 +02:00
Lunny Xiao
d8ae7d9e96
Fix panic when cloning with wrong ssh format. (#32076)
(cherry picked from commit 3f2d8f873035b614b4cdb447d8e16f5af82cefe8)
2024-09-29 11:48:56 +02:00
cloudchamb3r
b28a070a52
Fix Bug in Issue/pulls list (#32081)
fix #32080

## After
### for opened issues
<img width="1199" alt="Screenshot 2024-09-19 at 6 29 31 PM"
src="https://github.com/user-attachments/assets/86cf48ad-5e4b-4dcb-8abe-4d7fd74e0aec">

### for closed issues
<img width="1208" alt="Screenshot 2024-09-19 at 6 29 37 PM"
src="https://github.com/user-attachments/assets/a16bc545-bfcf-49a4-be52-3e7334910482">

### for all issues
<img width="1340" alt="Screenshot 2024-09-20 at 12 07 12 PM"
src="https://github.com/user-attachments/assets/b2309c8f-e59d-44e9-ae3b-bf54e1196169">

(cherry picked from commit e1f0598c8f5af5ac95f5e13b74fbab99506762db)
2024-09-29 11:46:14 +02:00
Earl Warren
b2483b2ae0
Fix artifact v4 upload above 8MB (#31664) (fix lint errors) 2024-09-29 11:43:20 +02:00
ChristopherHX
14c7055494
Fix artifact v4 upload above 8MB (#31664)
Multiple chunks are uploaded with type "block" without using
"appendBlock" and eventually out of order for bigger uploads.
8MB seems to be the chunk size

This change parses the blockList uploaded after all blocks to get the
final artifact size and order them correctly before calculating the
sha256 checksum over all blocks

Fixes #31354

(cherry picked from commit b594cec2bda6f861effedb2e8e0a7ebba191c0e9)

Conflicts:
	routers/api/actions/artifactsv4.go
  conflict because of Refactor AppURL usage (#30885) 67c1a07285008cc00036a87cef966c3bd519a50c
    that was not cherry-picked in Forgejo
    the resolution consist of removing the extra ctx argument
2024-09-29 11:43:18 +02:00
Earl Warren
81b9977540 Merge pull request 'Update dependency webpack to v5.95.0 (v9.0/forgejo)' (#5417) from renovate/v9.0/forgejo-webpack-5.x into v9.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5417
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-09-29 09:23:08 +00:00
Renovate Bot
a75862bd7d Update dependency webpack to v5.95.0 2024-09-29 08:03:17 +00:00
Otto
99baeb47e5 Merge pull request '[v9.0/forgejo] i18n: update of translations from Codeberg Translate' (#5412) from bp-v9.0/forgejo-e40554f into v9.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5412
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Reviewed-by: Otto <otto@codeberg.org>
2024-09-28 10:41:31 +00:00
Codeberg Translate
7d45c1c6c7 i18n: update of translations from Codeberg Translate (#5355)
Co-authored-by: earl-warren <earl-warren@users.noreply.translate.codeberg.org>
Co-authored-by: Vaclovas Intas <Gateway_31@protonmail.com>
Co-authored-by: Zughy <Zughy@users.noreply.translate.codeberg.org>
Co-authored-by: aleksi <aleksi@users.noreply.translate.codeberg.org>
Co-authored-by: Application-Maker <Application-Maker@users.noreply.translate.codeberg.org>
Co-authored-by: Salif Mehmed <mail@salif.eu>
Co-authored-by: 0ko <0ko@users.noreply.translate.codeberg.org>
Co-authored-by: Fjuro <fjuro@alius.cz>
Co-authored-by: Panagiotis \"Ivory\" Vasilopoulos <git@n0toose.net>
Co-authored-by: claudep <claudep@users.noreply.translate.codeberg.org>
Co-authored-by: vri <vri@users.noreply.translate.codeberg.org>
Co-authored-by: nicokaiser <nicokaiser@users.noreply.translate.codeberg.org>
Co-authored-by: Outbreak2096 <Outbreak2096@users.noreply.translate.codeberg.org>
Co-authored-by: robines <robines@users.noreply.translate.codeberg.org>
Co-authored-by: nazrin <nazrin@users.noreply.translate.codeberg.org>
Co-authored-by: Kaede Fujisaki <ledyba@users.noreply.translate.codeberg.org>

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5355
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>
(cherry picked from commit e40554f89b)
2024-09-28 09:41:02 +00:00
Earl Warren
5442b0a6b1 Merge pull request '[v9.0/forgejo] feat: add architecture-specific removal support for arch package' (#5407) from bp-v9.0/forgejo-89742c4 into v9.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5407
2024-09-27 12:09:01 +00:00
Earl Warren
da0c4ab199 Merge pull request '[v9.0/forgejo] [gitea] week 2024-39 cherry pick (gitea/main -> forgejo)' (#5406) from bp-v9.0/forgejo-e3deb88-2ffb08b-9d34731-f709de2-2675a24-5260543-6275d1b-1ae3b12-1bdf334-9d5f409-0cafec4-9617667 into v9.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5406
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-09-27 12:07:43 +00:00
Exploding Dragon
658ed564cb feat: add architecture-specific removal support for arch package (#5351)
- [x] add architecture-specific removal support
- [x] Fix upload competition
- [x] Fix not checking input when downloading

docs: https://codeberg.org/forgejo/docs/pulls/874

### Release notes

- [ ] I do not want this change to show in the release notes.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5351
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Exploding Dragon <explodingfkl@gmail.com>
Co-committed-by: Exploding Dragon <explodingfkl@gmail.com>
(cherry picked from commit 89742c4913)
2024-09-27 08:29:09 +00:00
Earl Warren
eb4f1de8ec chore(release-notes): weekly cherry-pick week 2024-39
(cherry picked from commit e3deb88a8d)
2024-09-27 08:13:30 +00:00
Lunny Xiao
ba7da0af31 Use camo.Always instead of camo.Allways (#32097)
Fix #31575

https://gitea.com/gitea/docs/pulls/73
(cherry picked from commit 8e2dd5d3ddfb442937c79f05df88d18b856952cb)
(cherry picked from commit 2ffb08bb88)
2024-09-27 08:13:30 +00:00
Jamie Schouten
74712e3400 Add bin to Composer Metadata (#32099)
This PR addresses the missing `bin` field in Composer metadata, which
currently causes vendor-provided binaries to not be symlinked to
`vendor/bin` during installation.

In the current implementation, running `composer install` does not
publish the binaries, leading to issues where expected binaries are not
available.

By properly declaring the `bin` field, this PR ensures that binaries are
correctly symlinked upon installation, as described in the [Composer
documentation](https://getcomposer.org/doc/articles/vendor-binaries.md).

(cherry picked from commit d351a42494e71b5e2da63302c2f9b46c78e6dbde)
(cherry picked from commit 9d34731198)
2024-09-27 08:13:30 +00:00
Lunny Xiao
6c16834d28 Fix wrong last modify time (#32102)
(cherry picked from commit a802508f88e546bf18990559e44bf27a09c869ee)
(cherry picked from commit f709de2403)
2024-09-27 08:13:30 +00:00
Timon van der Berg
81308159fd Repo Activity: count new issues that were closed (#31776)
I'm new to go and contributing to gitea, your guidance is much
appreciated.

This is meant to solve https://github.com/go-gitea/gitea/issues/13309

Previously, closed issues would not be shown under new issues in the
activity tab, even if they were newly created.

changes:
* Split out newlyCreatedIssues from issuesForActivityStatement to count
  both currently open and closed issues.
* Use a seperate function to count active issues to prevent
double-counting issues after the above change.

Result is that new issues that have been closed are shown both under
"new" and "closed".

Signed-off-by: Timon van der Berg <tmnvanderberg@gmail.com>
(cherry picked from commit ebfde845294cc681de6b1fe1adcf27e35f61b89b)
(cherry picked from commit 2675a24649)
2024-09-27 08:13:30 +00:00
KN4CK3R
2f1a737769 Fix incorrect /tokens api (#32085)
Fixes #32078

- Add missing scopes output.
- Disallow empty scope.

---------

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
(cherry picked from commit 08adbc468f8875fd4763c3656b334203c11adc0a)
(cherry picked from commit 526054332a)
2024-09-27 08:13:30 +00:00
Earl Warren
5b6d8a303d Refactor CSRF protector (#32057) (fix forgejo tests)
Fix the tests unique to Forgejo that are impacted by the refactor.

(cherry picked from commit 6275d1bc50)
2024-09-27 08:13:29 +00:00
wxiaoguang
d26b7902ec Refactor CSRF protector (#32057)
Remove unused CSRF options, decouple "new csrf protector" and "prepare"
logic, do not redirect to home page if CSRF validation falis (it
shouldn't happen in daily usage, if it happens, redirecting to home
doesn't help either but just makes the problem more complex for "fetch")

(cherry picked from commit 1fede04b83288d8a91304a83b7601699bb5cba04)

Conflicts:
	options/locale/locale_en-US.ini
	tests/integration/repo_branch_test.go
  trivial context conflicts
(cherry picked from commit 1ae3b127fc)
2024-09-27 08:13:29 +00:00
Earl Warren
1a8f1482af feat: add IfZero utility function
(cherry picked from commit 43de021ac1ca017212ec75fd88a8a80a9db27c4c)
(cherry picked from commit 1bdf334844)
2024-09-27 08:13:29 +00:00
hiifong
84718e7b17 Lazy load avatar images (#32051)
(cherry picked from commit f38e1014483b84f4541ffb354cd5dfdd7e000e2c)
(cherry picked from commit 9d5f409a5a)
2024-09-27 08:13:29 +00:00
KN4CK3R
232179aa3d Do not escape relative path in RPM primary index (#32038)
Fixes #32021

Do not escape the relative path.

(cherry picked from commit f528df944bb9436afcb9272add2ee0cccefbdb55)
(cherry picked from commit 0cafec4c7a)
2024-09-27 08:13:29 +00:00
Zettat123
300e01f733 Check if the due_date is nil when editing issues (#32035)
(cherry picked from commit 3a51c37672d2fbad1f222922e75ce704d5a1ac71)
(cherry picked from commit 961766744b)
2024-09-27 08:13:29 +00:00