1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-11-24 08:57:03 -05:00
Commit graph

19120 commits

Author SHA1 Message Date
Codeberg Translate
91dc82b44c [v7.0/forgejo] i18n: Translations update from Weblate
Backport of https://codeberg.org/forgejo/forgejo/pulls/4568.

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)
(cherry picked from commit 6108a979e5)
2024-08-08 13:15:33 +05:00
Earl Warren
875f123671 Merge pull request '[v7.0/forgejo] [BUG] Render references to cross-repo issues with external issues' (#4863) from bp-v7.0/forgejo-05e163a into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4863
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-08-07 06:24:39 +00:00
Gusted
cb9c0eb8ca [BUG] Render references to cross-repo issues with external issues
- If you have the external issue setting enabled, any reference would
have been rendered as an external issue, however this shouldn't be
happening to references that refer to issues in other repositories.
- Unit test added.

(cherry picked from commit 05e163aaf3)
2024-08-07 05:43:12 +00:00
Earl Warren
ee89c482c6 Merge pull request '[v7.0/forgejo] [CHORE] Remove SSH DSA tests' (#4833) from bp-v7.0/forgejo-eb8c125 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4833
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-08-05 21:42:42 +00:00
Gusted
151c2941f4 [CHORE] Remove SSH DSA tests
- Partially resolves #4659
- Fixes CI.

(cherry picked from commit eb8c125788)
2024-08-05 21:04:07 +00:00
forgejo-backport-action
0f7cd8d46a [v7.0/forgejo] fix(ui): handle out-of-bounds end line in code selection (#4820)
Backport of https://codeberg.org/forgejo/forgejo/pulls/4788.

- fallback to the last line, preventing TypeError
- add E2E test

Co-authored-by: Solomon Victorino <git@solomonvictorino.com>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4820
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-08-05 05:56:37 +00:00
Earl Warren
ae2312b767 Merge pull request '[gitea] week 2024-32-v7.0 cherry pick (release/v1.22 -> v7.0/forgejo)' (#4804) from earl-warren/wcp/2024-32-v7.0 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4804
Reviewed-by: thefox <thefox@noreply.codeberg.org>
2024-08-04 13:04:53 +00:00
Earl Warren
4ad168c2fe
chore(lint): make testifylint happy 2024-08-04 12:35:20 +02:00
TheFox0x7
072dd9f8bc enable linter testifylint on v7 (#4572)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4572
Co-authored-by: TheFox0x7 <thefox0x7@gmail.com>
Co-committed-by: TheFox0x7 <thefox0x7@gmail.com>
2024-07-30 19:42:06 +00:00
Earl Warren
c47bdf436b Merge pull request '[v7.0/forgejo] [UI] Show AGit label on merged PR' (#4731) from bp-v7.0/forgejo-358ec80 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4731
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-07-29 15:32:51 +00:00
Gusted
bcc1e17775 [UI] Show AGit label on merged PR
- The label wasn't show on merged PRs.
- Integration test added

(cherry picked from commit 358ec8002e)
2024-07-29 14:23:45 +00:00
Earl Warren
8453b563a9 Merge pull request '[gitea] week 2024-31-v7.0 cherry pick (release/v1.22 -> v7.0/forgejo)' (#4717) from earl-warren/wcp/2024-31-v7.0 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4717
Reviewed-by: thefox <thefox@noreply.codeberg.org>
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2024-07-28 09:56:41 +00:00
Giteabot
91d3a15766
Enable direnv (#31672) (#31679)
Backport #31672 by @techknowlogick

This lets developers who have direnv enabled to load our nix flake
automatically when entering it

Co-authored-by: techknowlogick <techknowlogick@gitea.com>
(cherry picked from commit 17b04644edb4fd1ba6ef4698868f321fc11c4f4d)
2024-07-28 08:40:19 +02:00
Earl Warren
227d3f42bf Merge pull request '[v7.0/forgejo] fix(api): issue state change is not idempotent' (#4688) from bp-v7.0/forgejo-e9e3b8c into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4688
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-25 14:59:44 +00:00
Earl Warren
9f1302f685 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:00 +00:00
Earl Warren
7dfc938e82 Merge pull request '[v7.0/forgejo] [CHORE] Don't bundle elkjs' (#4679) from bp-v7.0/forgejo-510cbe2 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4679
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-25 05:55:45 +00:00
Gusted
97e25d10b8 [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:10 +00:00
Earl Warren
7956c3890e Merge pull request '[v7.0/forgejo] Replace Gitea with Forgejo' (#4674) from bp-v7.0/forgejo-9ad23f9 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4674
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-24 22:57:30 +00:00
Earl Warren
68ceacfdfa Merge pull request '[v7.0/forgejo] [UI] Fix scoped-access-token' (#4671) from bp-v7.0/forgejo-aa5163d into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4671
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-24 22:42:43 +00:00
yonas
24ea13a684 Replace Gitea with Forgejo
(cherry picked from commit 9ad23f9ede)
2024-07-24 21:40:48 +00:00
Gusted
88426b578f [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:35:59 +00:00
Gusted
d7686aabee Merge pull request '[v7.0/forgejo] Reserve the devtest username' (#4647) from bp-v7.0/forgejo-859cc23-90c0e9d-93d0836 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4647
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-07-23 14:43:19 +00:00
Ikuyo
19dd7e9ebc Add missing trailing comma
(cherry picked from commit 859cc23dc2)
2024-07-23 13:01:36 +00:00
Ikuyo
422fe11271 Add devtest in reserved usernames test
(cherry picked from commit 90c0e9dace)
2024-07-23 13:01:36 +00:00
Ikuyo
9d0f632977 Reserve devtest username
(cherry picked from commit 93d0836241)
2024-07-23 13:01:36 +00:00
Earl Warren
bcb9088b0f Merge pull request '[v7.0/forgejo] Fix label selector popup width (issue creation)' (#4636) from gusted/forgejo-bp-labels into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4636
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2024-07-23 06:00:02 +00:00
Earl Warren
79a7a34f89 Merge pull request '[v7.0/forgejo] [I18N] Add common section to new translation files' (#4639) from bp-v7.0/forgejo-a67e420 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4639
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2024-07-23 05:27:00 +00:00
Gusted
f314af9d79 [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:25:47 +00:00
forgejo-backport-action
42bcf310b4 [v7.0/forgejo] i18n: restore Malayalam and Serbian files, remove ml-IN from the language selector (#4626)
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/4626
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:37 +00:00
Beowulf
f7499dd7c4
[v7.0/forgejo] Fix label selector popup width (issue creation)
**Backport:** https://codeberg.org/forgejo/forgejo/pulls/4551

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.)

This is a follow-up to https://codeberg.org/forgejo/forgejo/pulls/4546

(cherry picked from commit b32a03531c)
2024-07-23 00:55:27 +02:00
0ko
2dc87d389d
[v7.0/forgejo] ui: fix issue labels
* Fixes https://codeberg.org/forgejo/forgejo/issues/4522
* Fixes https://codeberg.org/forgejo/forgejo/issues/4522#issuecomment-2095542
* Fixes https://codeberg.org/forgejo/forgejo/issues/4544
* Fixes regression of https://codeberg.org/forgejo/forgejo/pulls/4486
* Fixes regression of some cherry-pick
* Fixes an overflow that wasn't even reported

* Revert changes done in https://codeberg.org/forgejo/forgejo/pulls/4486.
* Apply changes proposed in https://codeberg.org/forgejo/forgejo/issues/3875#issuecomment-1840611.
* Introduce new label `ugc-labels` to mark ui labels that are named by
users and therefore need special care. Currently the generic label
classes are used for too many things to work with them directly without
affecting other UI.
2024-07-23 00:53:32 +02:00
Gusted
8d8cd3aad8 Merge pull request '[v7.0/forgejo] Fix panic on too high page number' (#4623) from gusted/forgejo-commit-panic-bp-bp into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4623
Reviewed-by: twenty-panda <twenty-panda@noreply.codeberg.org>
2024-07-22 21:58:25 +00:00
Gusted
57bd557369 Merge pull request '[v7.0/forgejo] Don't panic on empty blockquote' (#4624) from gusted/forgejo-commit-panic-bp-bp-bp into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4624
Reviewed-by: twenty-panda <twenty-panda@noreply.codeberg.org>
2024-07-22 21:47:52 +00:00
Gusted
ff4662be92
[v7.0/forgejo] Don't panic on empty blockquote
- 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:35:09 +02:00
Earl Warren
67805d3e25 Merge pull request '[v7.0/forgejo] fix(actions): no edited event triggered when a title is changed' (#4620) from bp-v7.0/forgejo-f6000c3 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4620
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-22 12:32:18 +00:00
Gusted
2eac7b1402
[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.

(cherry picked from commit 6a49e3f468)

Co-authored-by: Gergely Nagy <forgejo@gergo.csillger.hu>
2024-07-22 14:31:05 +02:00
Twenty Panda
14b37bb607 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:38 +00:00
Gusted
1f9c3040dc Merge pull request '[v7.0/forgejo] Remove APA as cite format' (#4600) from beowulf/v7.0/forgejo into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4600
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-07-20 18:08:28 +00:00
0ko
bf336895cb Merge pull request '[v7.0/forgejo] Update of translations from Weblate' (#4594) from 0ko/forgejo:i18n-backport-20240720 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4594
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-20 16:06:59 +00:00
Beowulf
e45c409c20
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:57:21 +02:00
Gusted
7c434c4e27 Merge pull request '[v7.0/forgejo] [UI] Replace vue-bar-graph with chart.js' (#4593) from gusted/forgejo-bp-2-license into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4593
Reviewed-by: Beowulf <beowulf@noreply.codeberg.org>
2024-07-20 15:11:47 +00:00
Codeberg Translate
3b10a3bff7 [v7.0/forgejo] i18n: update of translations from Weblate
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)
(cherry picked from commit c21ca66867)
2024-07-20 18:36:38 +05:00
Gusted
f45928e608
[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:56:25 +02:00
0ko
ddc7d62afc Merge pull request '[v7] i18n(*): freeze translations of register_notify' (#4566) from 0ko/forgejo:i18n-backport-20240718-freeze into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4566
Reviewed-by: twenty-panda <twenty-panda@noreply.codeberg.org>
2024-07-19 09:48:07 +00:00
0ko
15dd004f43 [v7] i18n(*): freeze translations of register_notify
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>
(cherry picked from commit f07d1aed2e)
2024-07-18 12:57:01 +05:00
Earl Warren
59a8bed2a2 Merge pull request '[v7.0/forgejo] Load attachments for /issues/comments/{id}' (#4528) from bp-v7.0/forgejo-fc4f914 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4528
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-16 13:49:59 +00:00
Earl Warren
c95c5f1f50 Merge pull request '[v7.0/forgejo] Fix user search paging' (#4526) from bp-v7.0/forgejo-9b85f97 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4526
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Gergely Nagy <algernon@noreply.codeberg.org>
2024-07-16 12:45:41 +00:00
Gergely Nagy
9f592578f4 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:44:47 +00:00
Gergely Nagy
61f36020cd Fix user search paging
When searching for users, page the results by default, and respect the
default paging limits.

This makes queries like '/api/v1/users/search?limit=1' actually work.

Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
(cherry picked from commit 9b85f97835)
2024-07-16 10:50:36 +00:00
Earl Warren
1711ebe372 Merge pull request '[v7.0/forgejo] Fix CI status link in dashboard' (#4500) from bp-v7.0/forgejo-1088c05 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4500
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Otto <otto@codeberg.org>
Reviewed-by: Beowulf <beowulf@noreply.codeberg.org>
2024-07-15 16:35:52 +00:00