Commit graph

19118 commits

Author SHA1 Message Date
Matthias Riße
4f3cfac274 Fix failing tests
Multiple tests that worked fine on v1.20.4-1 started to fail after the
rebase onto v1.20.5-1. These tests are:
- TestGitAnnexPermissions/Private/Owner/HTTP/Init
- TestGitAnnexPermissions/Private/Owner/HTTP/Download
- TestGitAnnexPermissions/Private/Writer/HTTP/Init
- TestGitAnnexPermissions/Private/Writer/HTTP/Download
- TestGitAnnexPermissions/Private/Reader/HTTP/Init
- TestGitAnnexPermissions/Private/Reader/HTTP/Download

What these tests have in common is that they all operate on a private
repository via http with authentication.

They broke at some point between v1.20.4-1 and v1.20.5-1, so I did a
bisect between these two points running the offending tests. This
brought me to the conclusion that
ee48c0d5ea introduced the issue.

The thing is, this commit does not change any code, it only changes the
test environment. Among other things that didn't look as suspicious, it
changes the container image from a bespoke test_env image based on
debian bullseye to a node image based on debian bookworm. Obviously,
this means that there are many version differences between the two.

The first one I looked at was git. The previous bullseye image used a
manually installed git version 2.40.0, while the bookworm image has
2.39.2 installed. Updating git in the new image did not fix the issue,
however.

The next thing I looked at was the git-annex version. Bullseye had
8.20210223 installed and worked, while bookworm used 10.20230126 when
the tests broke. So I tried my luck upgrading to a more recent version
via neurodebian (10.20240227-1~ndall+1). This still worked fine on
bullseye and now also works fine on bookworm.

I have no idea why this specific version of git-annex broke the tests,
but at least there was a commit to pinpoint this to, which isn't always
the case with docker images silently changing beneath you...

Below are the versions as they are reported by git and git-annex:

bullseye (works):

    git version 2.30.2
    git-annex version: 8.20210223
    build flags: Assistant Webapp Pairing Inotify DBus DesktopNotify TorrentParser MagicMime Feeds Testsuite S3 WebDAV
    dependency versions: aws-0.22 bloomfilter-2.0.1.0 cryptonite-0.26 DAV-1.3.4 feed-1.3.0.1 ghc-8.8.4 http-client-0.6.4.1 persistent-sqlite-2.10.6.2 torrent-10000.1.1 uuid-1.3.13 yesod-1.6.1.0
    key/value backends: SHA256E SHA256 SHA512E SHA512 SHA224E SHA224 SHA384E SHA384 SHA3_256E SHA3_256 SHA3_512E SHA3_512 SHA3_224E SHA3_224 SHA3_384E SHA3_384 SKEIN256E SKEIN256 SKEIN512E SKEIN512 BLAKE2B256E BLAKE2B256 BLAKE2B512E BLAKE2B512 BLAKE2B160E BLAKE2B160 BLAKE2B224E BLAKE2B224 BLAKE2B384E BLAKE2B384 BLAKE2BP512E BLAKE2BP512 BLAKE2S256E BLAKE2S256 BLAKE2S160E BLAKE2S160 BLAKE2S224E BLAKE2S224 BLAKE2SP256E BLAKE2SP256 BLAKE2SP224E BLAKE2SP224 SHA1E SHA1 MD5E MD5 WORM URL X*
    remote types: git gcrypt p2p S3 bup directory rsync web bittorrent webdav adb tahoe glacier ddar git-lfs httpalso borg hook external
    operating system: linux x86_64
    supported repository versions: 8
    upgrade supported from repository versions: 0 1 2 3 4 5 6 7

bullseye + git-annex from neurodebian (works):

    git version 2.30.2
    git-annex version: 10.20240227-1~ndall+1
    build flags: Assistant Webapp Pairing Inotify DBus DesktopNotify TorrentParser MagicMime Benchmark Feeds Testsuite S3 WebDAV
    dependency versions: aws-0.22.1 bloomfilter-2.0.1.0 cryptonite-0.29 DAV-1.3.4 feed-1.3.2.1 ghc-9.0.2 http-client-0.7.13.1 persistent-sqlite-2.13.1.0 torrent-10000.1.1 uuid-1.3.15 yesod-1.6.2.1
    key/value backends: SHA256E SHA256 SHA512E SHA512 SHA224E SHA224 SHA384E SHA384 SHA3_256E SHA3_256 SHA3_512E SHA3_512 SHA3_224E SHA3_224 SHA3_384E SHA3_384 SKEIN256E SKEIN256 SKEIN512E SKEIN512 BLAKE2B256E BLAKE2B256 BLAKE2B512E BLAKE2B512 BLAKE2B160E BLAKE2B160 BLAKE2B224E BLAKE2B224 BLAKE2B384E BLAKE2B384 BLAKE2BP512E BLAKE2BP512 BLAKE2S256E BLAKE2S256 BLAKE2S160E BLAKE2S160 BLAKE2S224E BLAKE2S224 BLAKE2SP256E BLAKE2SP256 BLAKE2SP224E BLAKE2SP224 SHA1E SHA1 MD5E MD5 WORM URL X*
    remote types: git gcrypt p2p S3 bup directory rsync web bittorrent webdav adb tahoe glacier ddar git-lfs httpalso borg hook external
    operating system: linux x86_64
    supported repository versions: 8 9 10
    upgrade supported from repository versions: 0 1 2 3 4 5 6 7 8 9 10

bookworm (fails):

    git version 2.39.2
    git-annex version: 10.20230126
    build flags: Assistant Webapp Pairing Inotify DBus DesktopNotify TorrentParser MagicMime Benchmark Feeds Testsuite S3 WebDAV
    dependency versions: aws-0.22.1 bloomfilter-2.0.1.0 cryptonite-0.29 DAV-1.3.4 feed-1.3.2.1 ghc-9.0.2 http-client-0.7.13.1 persistent-sqlite-2.13.1.0 torrent-10000.1.1 uuid-1.3.15 yesod-1.6.2.1
    key/value backends: SHA256E SHA256 SHA512E SHA512 SHA224E SHA224 SHA384E SHA384 SHA3_256E SHA3_256 SHA3_512E SHA3_512 SHA3_224E SHA3_224 SHA3_384E SHA3_384 SKEIN256E SKEIN256 SKEIN512E SKEIN512 BLAKE2B256E BLAKE2B256 BLAKE2B512E BLAKE2B512 BLAKE2B160E BLAKE2B160 BLAKE2B224E BLAKE2B224 BLAKE2B384E BLAKE2B384 BLAKE2BP512E BLAKE2BP512 BLAKE2S256E BLAKE2S256 BLAKE2S160E BLAKE2S160 BLAKE2S224E BLAKE2S224 BLAKE2SP256E BLAKE2SP256 BLAKE2SP224E BLAKE2SP224 SHA1E SHA1 MD5E MD5 WORM URL X*
    remote types: git gcrypt p2p S3 bup directory rsync web bittorrent webdav adb tahoe glacier ddar git-lfs httpalso borg hook external
    operating system: linux x86_64
    supported repository versions: 8 9 10
    upgrade supported from repository versions: 0 1 2 3 4 5 6 7 8 9 10

bookworm + git-annex from neurodebian (works):

    git version 2.39.2
    git-annex version: 10.20240227-1~ndall+1
    build flags: Assistant Webapp Pairing Inotify DBus DesktopNotify TorrentParser MagicMime Benchmark Feeds Testsuite S3 WebDAV
    dependency versions: aws-0.22.1 bloomfilter-2.0.1.0 cryptonite-0.29 DAV-1.3.4 feed-1.3.2.1 ghc-9.0.2 http-client-0.7.13.1 persistent-sqlite-2.13.1.0 torrent-10000.1.1 uuid-1.3.15 yesod-1.6.2.1
    key/value backends: SHA256E SHA256 SHA512E SHA512 SHA224E SHA224 SHA384E SHA384 SHA3_256E SHA3_256 SHA3_512E SHA3_512 SHA3_224E SHA3_224 SHA3_384E SHA3_384 SKEIN256E SKEIN256 SKEIN512E SKEIN512 BLAKE2B256E BLAKE2B256 BLAKE2B512E BLAKE2B512 BLAKE2B160E BLAKE2B160 BLAKE2B224E BLAKE2B224 BLAKE2B384E BLAKE2B384 BLAKE2BP512E BLAKE2BP512 BLAKE2S256E BLAKE2S256 BLAKE2S160E BLAKE2S160 BLAKE2S224E BLAKE2S224 BLAKE2SP256E BLAKE2SP256 BLAKE2SP224E BLAKE2SP224 SHA1E SHA1 MD5E MD5 WORM URL X*
    remote types: git gcrypt p2p S3 bup directory rsync web bittorrent webdav adb tahoe glacier ddar git-lfs httpalso borg hook external
    operating system: linux x86_64
    supported repository versions: 8 9 10
    upgrade supported from repository versions: 0 1 2 3 4 5 6 7 8 9 10
2024-08-01 10:28:36 +02:00
Matthias Riße
411b6b3ffe Install git-annex in the testing workflow 2024-08-01 10:28:35 +02:00
Matthias Riße
57946cc4df Adapt patch to upstream changes
A dead code check started to complain because FileCmp was only used in
tests. Moved the function to test_utils.
2024-08-01 10:28:35 +02:00
Matthias Riße
2448581e04 Adapt patch to upstream changes
Repository creation now expects an objectFormat to be specified for git.
2024-08-01 10:28:35 +02:00
Nick
fee5b80ffe git-annex tests (#13)
Fixes https://github.com/neuropoly/gitea/issues/11

Tests:

* `git annex init`
* `git annex copy --from origin`
* `git annex copy --to origin`

over:

* ssh

for:

* the owner
* a collaborator
* a read-only collaborator
* a stranger

in a

* public repo
* private repo

And then confirms:

* Deletion of the remote repo (to ensure lockdown isn't messing with us: https://git-annex.branchable.com/internals/lockdown/#comment-0cc5225dc5abe8eddeb843bfd2fdc382)

------

To support all this:

* Add util.FileCmp()
* Patch withKeyFile() so it can be nested in other copies of itself

-------

Many thanks to Mathieu for giving style tips and catching several bugs,
including a subtle one in util.filecmp() which neutered it.

Co-authored-by: Mathieu Guay-Paquet <mathieu.guay-paquet@polymtl.ca>
2024-08-01 10:28:35 +02:00
Nick Guenther
d838bc3665 git-annex support
[git-annex](https://git-annex.branchable.com/) is a more complicated cousin to
git-lfs, storing large files in an optional-download side content.  Unlike lfs,
it allows mixing and matching storage remotes, so the content remote(s) doesn't
need to be on the same server as the git remote, making it feasible to scatter
a collection across cloud storage, old harddrives, or anywhere else storage can
be scavenged.  Since this can get complicated, fast, it has a content-tracking
database (`git annex whereis`) to help find everything later.

The use-case we imagine for including it in Gitea is just the simple case, where
we're primarily emulating git-lfs: each repo has its large content at the same URL.

Our motivation is so we can self-host https://www.datalad.org/ datasets, which
currently are only hostable by fragilely scrounging together cloud storage --
and having to manage all the credentials associated with all the pieces -- or at
https://openneuro.org which is fragile in its own ways.

Supporting git-annex also allows multiple Gitea instance to be annex remotes for
each other, mirroring the content or otherwise collaborating the split up the
hosting costs.

Enabling
--------

TODO

HTTP
----

TODO

Permission Checking
-------------------

This tweaks the API in routers/private/serv.go to expose the calling user's
computed permission, instead of just returning HTTP 403.

This doesn't fit in super well. It's the opposite from how the git-lfs support is
done, where there's a complete list of possible subcommands and their matching
permission levels, and then the API compares the requested with the actual level
and returns HTTP 403 if the check fails.

But it's necessary. The main git-annex verbs, 'git-annex-shell configlist' and
'git-annex-shell p2pstdio' are both either read-only or read-write operations,
depending on the state on disk on either end of the connection and what the user
asked it to ask for, with no way to know before git-annex examines the situation.
So tell the level via GIT_ANNEX_READONLY and trust it to handle itself.

In the older Gogs version, the permission was directly read in cmd/serv.go:

```
mode, err = db.UserAccessMode(user.ID, repo)
```
- 966e925cf3/internal/cmd/serv.go (L334)

but in Gitea permission enforcement has been centralized in the API layer.
(perhaps so the cmd layer can avoid making direct DB connections?)

Deletion
--------

git-annex has this "lockdown" feature where it tries
really quite very hard to prevent you deleting its
data, to the point that even an rm -rf won't do it:
each file in annex/objects/ is nested inside a
folder with read-only permissions.

The recommended workaround is to run chmod -R +w when
you're sure you actually want to delete a repo. See
https://git-annex.branchable.com/internals/lockdown

So we edit util.RemoveAll() to do just that, so now
it's `chmod -R +w && rm -rf` instead of just `rm -rf`.
2024-08-01 10:28:35 +02:00
Matthias Riße
66c6b14f2c Fix name in package-lock.json
The frontend-checks job started failing because the declared name does
not match the repository name.
2024-08-01 10:28:35 +02: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
Beowulf
3018b8a07e
Remove e2e test in backport 2024-07-15 14:52:50 +02:00
Earl Warren
c95b676db4 Merge pull request '[gitea] week 2024-29-v7.0 cherry pick (release/v1.22 -> v7.0/forgejo)' (#4503) from earl-warren/wcp/2024-29-v7.0 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4503
Reviewed-by: Gergely Nagy <algernon@noreply.codeberg.org>
2024-07-15 05:30:24 +00:00