forgejo/routers
Gergely Nagy f8da672307
[FEAT]: Allow forking without a repo ID
Forking a repository via the web UI currently requires visiting a
`/repo/fork/{{repoid}}` URL. This makes it cumbersome to create a link
that starts a fork, because the repository ID is only available via the
API. While it *is* possible to create a link, doing so requires extra
steps.

To make it easier to have a "Fork me!"-style links, introduce the
`/{username}/{repo}/fork` route, which will start the forking process
based on the repository in context instead.

The old `/repo/fork/{repoid}` route (with a `GET` request) will remain
there for the sake of backwards compatibility, but will redirect to the
new URL instead. It's `POST` handler is removed.

Tests that used the old route are updated to use the new one, and new
tests are introduced to exercise the redirect.

Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
2024-02-10 09:14:14 +01:00
..
api Merge remote-tracking branch 'forgejo/forgejo-dependency' into wip-forgejo 2024-02-09 19:00:54 +01:00
common [BRANDING] Use forgejo binary name 2024-02-05 16:05:02 +01:00
install Merge branch 'rebase-forgejo-dependency' into wip-forgejo 2024-02-05 18:58:23 +01:00
private [CLI] implement forgejo-cli 2024-02-05 13:33:58 +01:00
utils Improve user search display name (#29002) 2024-02-01 17:10:16 +00:00
web [FEAT]: Allow forking without a repo ID 2024-02-10 09:14:14 +01:00
init.go [API] Forgejo API /api/forgejo/v1 2024-02-05 14:44:32 +01:00