1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-11-30 09:41:11 -05:00
Commit graph

20010 commits

Author SHA1 Message Date
Earl Warren
533623b659 fix(api): issue state change is not idempotent
The PATCH if issue & pull request switched to use the service
functions instead. However, the service function changing the state is
not idempotent. Instead of doing nothing which changing from open to
open or close to close, it will fail with an error like:

 Issue [2472] 0 was already closed

Regression of: 6a4bc0289d

Fixes: https://codeberg.org/forgejo/forgejo/issues/4686
(cherry picked from commit e9e3b8c0f3)
2024-07-25 14:21:11 +00:00
forgejo-backport-action
887a914a7d [v8.0/forgejo] fix(ui): use right placeholder string in milestones search (#4682)
Backport of https://codeberg.org/forgejo/forgejo/pulls/4628.

This PR fixes a wrong placeholder for the search for milestones. I tested it locally (see attachments, below).

Before: https://codeberg.org/attachments/ba845ce1-1f20-4131-a74d-7220986a4acf
After: https://codeberg.org/attachments/0c4e32ee-b1a8-4472-837d-daa2a2a50121

Co-authored-by: Robert Wolff <mahlzahn@posteo.de>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4682
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
Co-committed-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
2024-07-25 08:00:09 +00:00
Earl Warren
4819c83a5c Merge pull request '[v8.0/forgejo] [CHORE] Don't bundle elkjs' (#4680) from bp-v8.0/forgejo-510cbe2 into v8.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4680
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-25 05:57:21 +00:00
Gusted
e362e0813d [CHORE] Don't bundle elkjs
- `elkjs` is a library that's imported by `mermaid`, although they have
seperated this package to it's own mermaid
package (https://github.com/mermaid-js/mermaid/pull/5654), the stable
version doesn't have this patch.
- `elkjs` is licensed under the EPL-2.0 license (copyleft), which isn't
compatible with GPL unless the license author explcitly allow this via a
so called "secondary license". At the end of the day it cannot be
released under a MIT or GPL license.
- Use webpack's `externals` option to avoid bundling `elkjs` and instead
leave it as a `require` code.
- This is a 'dirty' way to ensure elkjs isn't bundled and has to be
tested manually to ensure this for every release (via the
`webpack-bundle-analyzer` plugin). If someone tries to use the elkjs
render, it will result in a non-descriptive error being shown.

(cherry picked from commit 510cbe2c92)
2024-07-25 00:20:31 +00:00
Earl Warren
c8b6e07840 Merge pull request '[v8.0/forgejo] Replace Gitea with Forgejo' (#4675) from bp-v8.0/forgejo-9ad23f9 into v8.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4675
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-24 23:18:29 +00:00
Earl Warren
d24cd80f7a Merge pull request '[v8.0/forgejo] [UI] Fix scoped-access-token' (#4672) from bp-v8.0/forgejo-aa5163d into v8.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4672
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Beowulf <beowulf@noreply.codeberg.org>
2024-07-24 23:07:51 +00:00
yonas
bdc2041e92 Replace Gitea with Forgejo
(cherry picked from commit 9ad23f9ede)
2024-07-24 21:41:11 +00:00
Gusted
ed62409f63 [UI] Fix scoped-access-token
- Regression of #4571
- Refactor to not use the component API of Vue. The root cause is still
unknown.

(cherry picked from commit aa5163d5c4)
2024-07-24 21:36:12 +00:00
Earl Warren
1d230b0a31 Merge pull request '[v8.0/forgejo] [I18N] Translations update from Weblate' (#4661) from bp-v8.0/forgejo-7699d85 into v8.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4661
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2024-07-24 13:03:39 +00:00
Codeberg Translate
6108a979e5 [I18N] Translations update from Weblate (#4568)
Translations update from [Weblate](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)

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

## Draft release notes
<!--URL:https://codeberg.org/forgejo/forgejo-->
- Localization
  - [PR](https://codeberg.org/forgejo/forgejo/pulls/4568)</a>: <!--number 4568 --><!--line 0 --><!--description W0kxOE5dIFRyYW5zbGF0aW9ucyB1cGRhdGUgZnJvbSBXZWJsYXRl-->[I18N] Translations update from Weblate<!--description-->
<!--end release-notes-assistant-->

Co-authored-by: earl-warren <earl-warren@users.noreply.translate.codeberg.org>
Co-authored-by: 0ko <0ko@users.noreply.translate.codeberg.org>
Co-authored-by: mahlzahn <mahlzahn@posteo.de>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-authored-by: leana8959 <leana8959@users.noreply.translate.codeberg.org>
Co-authored-by: Fjuro <fjuro@alius.cz>
Co-authored-by: Wuzzy <Wuzzy@users.noreply.translate.codeberg.org>
Co-authored-by: meskobalazs <meskobalazs@users.noreply.translate.codeberg.org>
Co-authored-by: Bálint Gonda <balinteus@gmail.com>
Co-authored-by: Beowulf <Beowulf@users.noreply.translate.codeberg.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4568
Co-authored-by: Codeberg Translate <translate@noreply.codeberg.org>
Co-committed-by: Codeberg Translate <translate@noreply.codeberg.org>
(cherry picked from commit 7699d85f3b)
2024-07-24 12:05:57 +00:00
Earl Warren
4973f17c27 Merge pull request '[v8.0/forgejo] Reserve devtest username' (#4650) from gusted/v8-bp into v8.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4650
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-24 05:43:19 +00:00
Ikuyo
32ebadccd1
[v8.0/forgejo] Reserve devtest username
**Backport: #4638**

This PR reserves the devtest username. This is because /devtest is used
for testing various elements and layouts of the UI, and creating a user
or organisation with that name may cause problems and conflicts if the
RUN_MODE is set to dev
2024-07-23 17:05:01 +02:00
Earl Warren
2d75f6f0d3 Merge pull request '[v8.0/forgejo] [I18N] Add common section to new translation files' (#4640) from bp-v8.0/forgejo-a67e420 into v8.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4640
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2024-07-23 05:49:55 +00:00
Gusted
db4285a56f [I18N] Add common section to new translation files
- Follow up for #4576
- Weblate currently cannot parse ini files if they contain keys that
don't belong to a section.

(cherry picked from commit a67e420c38)
2024-07-23 04:26:25 +00:00
forgejo-backport-action
1bbe885b1b [v8.0/forgejo] i18n: restore Malayalam and Serbian files, remove ml-IN from the language selector (#4627)
Backport of https://codeberg.org/forgejo/forgejo/pulls/4576

* Closes #4563
* A followup to my 2024-February investigation in the Localization room

* Restore Malayalam and Serbian locales that were deleted in 067b0c2664 and f91092453e. Bulgarian was also deleted, but we already have better Bulgarian translation.
* Remove ml-IN from the language selector. It was not usable for 1.5 years, has ~18% completion and was not maintained in those ~1.5 years. It could also have placeholder bugs due to refactors.

Restoring files gives the translators a base to work with and makes the project advertised on Weblate homepage for logged in users in the Suggestions tab. Unlike Gitea, we store our current translations directly in the repo and not on a separate platform, so it makes sense to add these files back.
Removing selector entry avoids bugs and user confusion. I will make a followup for the documentation.

Reviewed-on: #4576
Reviewed-by: twenty-panda <twenty-panda@noreply.codeberg.org>
(cherry picked from commit e819c1622e)

Co-authored-by: 0ko <0ko@noreply.codeberg.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4627
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
Co-committed-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
2024-07-23 04:13:04 +00:00
Gusted
3962380a33 Merge pull request '[v8.0/forgejo] Don't panic on empty blockquote' (#4622) from gusted/forgejo-commit-panic-bp into v8.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4622
Reviewed-by: twenty-panda <twenty-panda@noreply.codeberg.org>
2024-07-22 18:17:29 +00:00
Earl Warren
b4dacce654 Merge pull request '[v8.0/forgejo] fix(actions): no edited event triggered when a title is changed' (#4621) from bp-v8.0/forgejo-f6000c3 into v8.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4621
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-22 12:58:47 +00:00
Gusted
bb9dcec39c
[v8.0/forgejo] Don't panic on empty blockquote
- Backport #4602
- On a empty blockquote the callout feature would panic, as it expects
to always have at least one child.
- This panic cannot result in a DoS, because any panic that happens
while rendering any markdown input will be recovered gracefully.
- Adds a simple condition to avoid this panic.

(cherry picked from commit efd63ec1d8)
2024-07-22 14:17:50 +02:00
Twenty Panda
05787c3809 fix(actions): no edited event triggered when a title is changed
When the title of an issue or a pull request is changed, the edited
event must be triggered, in the same way it is when the body of the
description is changed.

The web endpoints and the API endpoints for both pull requests and
issues rely on issue_service.ChangeTitle which calls
notify_service.IssueChangeTitle.

(cherry picked from commit f6000c3760)
2024-07-22 11:46:50 +00:00
Earl Warren
c65534ce02 Merge pull request '[v8.0/forgejo] [BUG] Fix panic on too high page number' (#4606) from bp-v8.0/forgejo-6a49e3f into v8.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4606
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-21 06:58:15 +00:00
Gusted
6837da596e [BUG] Fix panic on too high page number
- Fixes a panic where the file history router would panic if the page
number was set to a page where no commits would be returned. It now
returns a 404 in such case.
- Regresion of a5b1c1b0b3
- Panic log provided by @algernon.
- Minimal integration test added.

Co-authored-by: Gergely Nagy <forgejo@gergo.csillger.hu>
(cherry picked from commit 6a49e3f468)
2024-07-21 06:00:22 +00:00
Gusted
f385c66a47 Merge pull request '[v8.0/forgejo] Remove APA as cite format' (#4601) from beowulf/v8.0/forgejo into v8.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4601
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-07-20 18:08:16 +00:00
Beowulf
888250ea66
Remove APA as cite format
This removes APA as cite format, because it depends on an copyleft
dependency (https://github.com/Juris-M/citeproc-js).

(cherry picked from commit 7dc0b2bab6)
2024-07-20 17:58:56 +02:00
0ko
6c35127705 Merge pull request '[v8.0/forgejo] [UI] Replace vue-bar-graph with chart.js' (#4590) from gusted/forgejo-bp-licensed into v8.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4590
Reviewed-by: Beowulf <beowulf@noreply.codeberg.org>
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2024-07-20 13:27:40 +00:00
Gusted
a3fc16bb03
[UI] Replace vue-bar-graph with chart.js
- Backport of #4571
- The usage of the `vue-bar-graph` is complicated, because of the `GSAP`
dependency they pull in, the dependency uses a non-free license.
- The code is rewritten to use the `chart.js` library, which is already
used to draw other charts in the activity tab. Due to the limitation of
`chart.js`, we have to create a plugin in order to have images as labels
and do click handling for those images.
- The chart isn't the same as the previous one, once again simply due to
how `chart.js` works, the amount of commits isn't drawn anymore in the
bar, you instead have to hover over it or look at the y-axis.
- Resolves #4569

(cherry picked from commit a83002679d)
2024-07-20 14:42:14 +02:00
Earl Warren
57e69e56b4 Merge pull request '[v8.0/forgejo] [BUG] Add early-return to loading items from SpecList' (#4585) from bp-v8.0/forgejo-f7dac2c into v8.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4585
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-20 08:30:09 +00:00
Gusted
358be0a8dd [BUG] Add early-return to loading items from SpecList
- Add an early-return to `LoadSchedules` and `LoadRepos` of the
`SpecList` type, @Beowulf noticed that useless queries were being run
every 30 seconds. These stemmed from these two functions being run even
if there were no scheduled actions.
- No tests were added, because there is zero testing infrastructure or
fixtures for the actions specifications models. I feel these are trivial
enough to not require any tests.

(cherry picked from commit f7dac2c3d9)
2024-07-20 07:41:26 +00:00
0ko
0ed8aa276d Merge pull request '[v8/forgejo] i18n: update of translations from Weblate' (#4565) from 0ko/forgejo:i18n-backport-20240718 into v8.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4565
Reviewed-by: twenty-panda <twenty-panda@noreply.codeberg.org>
2024-07-19 09:46:42 +00:00
Codeberg Translate
c21ca66867 [v8/forgejo] i18n: update of translations from Weblate
Translations update from [Weblate](https://translate.codeberg.org) for [Forgejo/forgejo](https://translate.codeberg.org/projects/forgejo/forgejo/).

Co-authored-by: Wuzzy <Wuzzy@users.noreply.translate.codeberg.org>
Co-authored-by: earl-warren <earl-warren@users.noreply.translate.codeberg.org>
Co-authored-by: 0ko <0ko@users.noreply.translate.codeberg.org>
Co-authored-by: manolosd <manolosd@users.noreply.translate.codeberg.org>
Co-authored-by: Nifou <Nifou@users.noreply.translate.codeberg.org>
Co-authored-by: kdh8219 <kdh8219@monamo.dev>
Co-authored-by: Kita Ikuyo <searinminecraft@courvix.com>
Co-authored-by: Anonymous <anonymous@users.noreply.translate.codeberg.org>
Co-authored-by: Fjuro <fjuro@alius.cz>
Co-authored-by: ch0ccyra1n <ch0ccyra1n@users.noreply.translate.codeberg.org>
Co-authored-by: mahlzahn <mahlzahn@users.noreply.translate.codeberg.org>
Co-authored-by: emansije <emansije@users.noreply.translate.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-authored-by: Xinayder <Xinayder@users.noreply.translate.codeberg.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4451
Reviewed-by: Earl Warren <earl-warren@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 a9d32b588a)
2024-07-18 12:48:00 +05:00
0ko
f07d1aed2e [v7/v8] i18n(*): freeze translations of register_notify (#4562)
This string has been in v9 (c773ca37ad) and now includes a template for app name instead of hardcoded software name.
v7 and v8 do not expect this string to have any templates. Prevent breaking translations by backports by freezing translations of this string for v7 and v8.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4562
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-18 07:19:37 +00:00
Earl Warren
a31792b3d0 Merge pull request '[v8.0/forgejo] fix: label selector popup width (issue creation)' (#4561) from bp-v8.0/forgejo-b32a035 into v8.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4561
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-18 05:33:23 +00:00
Beowulf
767560dbef Fix label selector popup width (issue creation)
This aligns the popup width of the label selector during issue creation
to the width of the label selector in an already created issue.

(The inherited width from "ui form" is reset to prevent width: 100% on the
input element in the search box.)

(cherry picked from commit b32a03531c)
2024-07-18 04:35:34 +00:00
Earl Warren
b3f60875d2 Merge pull request '[v8.0/forgejo] fix: labels set during issue creation are not displayed' (#4547) from bp-v8.0/forgejo-3269583 into v8.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4547
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-17 13:33:23 +00:00
0ko
8b1027b9a9 ui: fix issue labels
(cherry picked from commit 326958316d)
2024-07-17 12:06:54 +00:00
Earl Warren
6bb8891067 Merge pull request '[v8.0/forgejo] Load attachments for /issues/comments/{id}' (#4529) from bp-v8.0/forgejo-fc4f914 into v8.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4529
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-16 15:05:54 +00:00
Gergely Nagy
dc075fc1c0 Load attachments for /issues/comments/{id}
The `/repos/{owner}/{repo}/issues/comments/{id}` API endpoint returns an
`assets` field, but the route handler did not load attachments, thus,
the field was never populated.

This patch fixes that, and adds a test to exercise it. The test fails
without the fix.

This addresses a bug discovered in Codeberg/Community#1607.

Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
(cherry picked from commit fc4f914e71)
2024-07-16 12:45:20 +00:00
Earl Warren
3e7c4f7d76 Merge pull request '[v8.0/forgejo] fix(ci): use 512MB for elasticsearch instead of 32GB' (#4527) from bp-v8.0/forgejo-d1dadf4 into v8.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4527
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-16 12:44:04 +00:00
Earl Warren
cb656c3309 fix(ci): use 512MB for elasticsearch instead of 32GB
It can be observed that when elasticsearch runs in the CI the process
uses 32GB of resident memory.

Set Xmx and Xms to no more than the threshold that the JVM uses for
compressed object pointers (compressed oops); the exact threshold
varies but is near 32 GB. You can verify that you are under the
threshold by looking for a line in the logs like the following:

Refs: https://www.elastic.co/guide/en/elasticsearch/reference/7.5/docker.html
Refs: https://www.elastic.co/guide/en/elasticsearch/reference/7.5/heap-size.html
(cherry picked from commit d1dadf4e06)
2024-07-16 11:01:31 +00:00
Earl Warren
75808d5ba9 Merge pull request '[v8.0/forgejo] [port] Use old behavior for telegram webhook (gitea#31588)' (#4505) from bp-v8.0/forgejo-38dce65 into v8.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4505
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-14 22:50:02 +00:00
wxiaoguang
c12857d5dd Use old behavior for telegram webhook (#31588)
Fix #31182

(cherry picked from commit 43c63c33aea1b0725ed1fe7b4a55dd85050f0beb)
(cherry picked from commit 38dce65dc1)
2024-07-14 20:26:54 +00:00
Otto
4f97baaec3 Merge pull request '[v8.0/forgejo] Fix CI status link in dashboard' (#4501) from bp-v8.0/forgejo-1088c05 into v8.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4501
Reviewed-by: Beowulf <beowulf@noreply.codeberg.org>
Reviewed-by: Otto <otto@codeberg.org>
2024-07-14 19:34:44 +00:00
Beowulf
d95ce0b6fb Fixed link to commit status and tooltip on dashboard
Regression introduced by 5a18b74632

(cherry picked from commit 1088c057e0)
2024-07-14 17:39:35 +00:00
Earl Warren
96d09860bd Merge pull request '[v8.0/forgejo] tests(e2e): only run one test, not all of them each time' (#4498) from bp-v8.0/forgejo-e3665c3 into v8.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4498
Reviewed-by: Otto <otto@codeberg.org>
2024-07-14 17:10:56 +00:00
Otto
9f7d1051a4 Merge pull request '[v8.0/forgejo] [UI] Remove unnecessary vertical space in empty labels list' (#4495) from bp-v8.0/forgejo-013b89e into v8.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4495
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Reviewed-by: Otto <otto@codeberg.org>
2024-07-14 16:17:09 +00:00
Earl Warren
f3c22b5be1 tests(e2e): only run one test, not all of them each time
(cherry picked from commit e3665c3042)
2024-07-14 15:32:18 +00:00
Gusted
5709359d55 [UI] Remove unnecessary vertical space in empty labels list
- Don't show the labels-list element, if no labels are selected.
- The labels-list was taking up vertical space, even if no labels were
selected which caused an inconsistency in how the sidebar looked.
- Adds integration test

(cherry picked from commit 013b89eb13)
2024-07-14 14:41:03 +00:00
Earl Warren
c5f84e4a93 Merge pull request '[v8.0/forgejo] Fix AGit pull request instructions' (#4479) from bp-v8.0/forgejo-0a5fa31 into v8.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4479
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-13 22:09:56 +00:00
Beowulf
cb297a6f6f Fix AGit checkout instruction
The checkout instruction for pull requests created with the AGit
workflow where incorrect.

(cherry picked from commit 0a5fa31edb)
2024-07-13 18:28:14 +00:00
Earl Warren
c304a16cf8 Merge pull request '[v8.0/forgejo] Fix: Name conan remote forgejo' (#4465) from bp-v8.0/forgejo-6efaf15 into v8.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4465
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-07-12 14:44:04 +00:00
Kwonunn
47d6edab16 Fix: Name conan remote forgejo
(cherry picked from commit 6efaf155d9)
2024-07-12 13:28:33 +00:00