forgejo/modules
Gergely Nagy d87c526d2a
Allow changing the repo Wiki branch to main
Previously, the repo wiki was hardcoded to use `master` as its branch,
this change makes it possible to use `main` (or something else, governed
by `[repository].DEFAULT_BRANCH`, a setting that already exists and
defaults to `main`).

The way it is done is that a new column is added to the `repository`
table: `wiki_branch`. The migration will make existing repositories
default to `master`, for compatibility's sake, even if they don't have a
Wiki (because it's easier to do that). Newly created repositories will
default to `[repository].DEFAULT_BRANCH` instead.

The Wiki service was updated to use the branch name stored in the
database, and fall back to the default if it is empty.

Old repositories with Wikis using the older `master` branch will have
the option to do a one-time transition to `main`, available via the
repository settings in the "Danger Zone". This option will only be
available for repositories that have the internal wiki enabled, it is
not empty, and the wiki branch is not `[repository].DEFAULT_BRANCH`.

When migrating a repository with a Wiki, Forgejo will use the same
branch name for the wiki as the source repository did. If that's not the
same as the default, the option to normalize it will be available after
the migration's done.

Additionally, the `/api/v1/{owner}/{repo}` endpoint was updated: it will
now include the wiki branch name in `GET` requests, and allow changing
the wiki branch via `PATCH`.

Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
2024-01-31 11:43:23 +01:00
..
actions [ACTIONS] on.schedule: the event is always "schedule" 2024-01-28 11:05:33 +01:00
activitypub
analyze
assetfs
auth [GITEA] Drop sha256-simd in favor of stdlib 2024-01-28 10:48:05 +01:00
avatar [GITEA] Drop sha256-simd in favor of stdlib 2024-01-28 10:48:05 +01:00
base [GITEA] Drop sha256-simd in favor of stdlib 2024-01-28 10:48:05 +01:00
cache Always enable caches (#28527) 2023-12-19 09:29:05 +00:00
charset Preserve BOM in web editor (#28935) 2024-01-27 18:02:51 +00:00
container
context Allow changing the repo Wiki branch to main 2024-01-31 11:43:23 +01:00
contexttest Simplify how git repositories are opened (#28937) 2024-01-27 21:09:51 +01:00
csv
emoji
eventsource
generate [GITEA] Refactor generation of JWT secret 2024-01-28 11:06:48 +01:00
git [GITEA] Improved Linguist compatibility 2024-01-28 11:01:16 +01:00
gitgraph
gitrepo Simplify how git repositories are opened (#28937) 2024-01-27 21:09:51 +01:00
graceful Suggest to use Type=simple for systemd service (#28717) 2024-01-07 15:18:04 +00:00
hcaptcha
highlight Add option to disable ambiguous unicode characters detection (#28454) 2023-12-17 14:38:54 +00:00
hostmatcher
html
httpcache
httplib
indexer [GITEA] Vendor rupture dependency 2024-01-28 08:54:31 +01:00
issue/template
json
label
lfs [GITEA] Drop sha256-simd in favor of stdlib 2024-01-28 10:48:05 +01:00
log
markup [GITEA] Add footnote testing 2024-01-28 10:54:59 +01:00
mcaptcha
metrics
migration
nosql
options
packages [GITEA] feat(nuget): basic manifest download 2024-01-28 08:54:31 +01:00
paginator
pprof
private [CLI] implement forgejo-cli 2024-01-28 07:47:32 +01:00
process
proxy
proxyprotocol
public Refactor CORS handler (#28587) 2023-12-25 20:13:18 +08:00
queue [CI] disable redis test, no redis server yet in CI 2024-01-28 07:47:32 +01:00
recaptcha
references Add support for sha256 repositories (#23894) 2024-01-19 17:05:02 +01:00
regexplru
repository Allow changing the repo Wiki branch to main 2024-01-31 11:43:23 +01:00
secret [GITEA] Drop sha256-simd in favor of stdlib 2024-01-28 10:48:05 +01:00
session
setting [GITEA] Add slow SQL query warning (squash) Fix setting typo 2024-01-28 11:07:32 +01:00
sitemap
ssh
storage [CI] Forgejo Actions based CI for PR & branches 2024-01-28 07:47:32 +01:00
structs Allow changing the repo Wiki branch to main 2024-01-31 11:43:23 +01:00
svg
sync
system
templates [FEAT] Repository flags 2024-01-28 10:58:28 +01:00
test [TESTS] add log.Level to test.NewLogChecker 2024-01-28 11:07:43 +01:00
testlogger
timeutil Make template DateTime show proper tooltip (#28677) 2024-01-02 20:09:18 +01:00
translation [I18N] add [common] as first line 2024-01-28 08:54:31 +01:00
turnstile
typesniffer
updatechecker
upload
uri
user
util [GITEA] Drop sha256-simd in favor of stdlib 2024-01-28 10:48:05 +01:00
validation [GITEA] add option for banning dots in usernames 2024-01-28 09:22:15 +01:00
web [GITEA] Configurable clone methods 2024-01-28 10:55:00 +01:00
webhook [ACTIONS] on.schedule: the event is always "schedule" 2024-01-28 11:05:33 +01:00