Create 1.20.0 release blog post

The changelog has not been created yet as there's one PR missing
This commit is contained in:
delvh 2023-07-12 18:44:53 +02:00 committed by delvh
parent 0a9717cab9
commit 60fe5caf60
17 changed files with 396 additions and 0 deletions

View file

@ -0,0 +1,396 @@
---
date: "2023-06-07T23:00:00+02:00"
authors:
- "delvh"
- "yardenshoham"
- "denyskon"
- "lunny"
- "jolheiser"
title: "Gitea 1.20 is released"
tags: ["release"]
draft: false
---
Gitea 1.20.0 is now released.
It includes [1086](https://github.com/go-gitea/gitea/pulls?q=is%3Apr+milestone%3A1.20.0+is%3Amerged) pull requests, which makes it the largest release in Gitea's history!
<!-- Security Thanks! -->
You can download it for example from our [downloads page](https://dl.gitea.com/gitea/1.20.0/). Please read our [installation guide](https://docs.gitea.com/1.20/installation/install-from-binary) for more information on installation.
We would like to thank all of our supporters on [Open Collective](https://opencollective.com/gitea) who are helping to sustain us financially.
:exclamation: This release blog has a slightly new format:
The changes are sorted descending by what we deem most important for users and admins, so the most important change comes first.
<!--more-->
## Breaking Changes
### :warning: Refactored scoped tokens mechanism ([#24767](https://github.com/go-gitea/gitea/pull/24767))
<!-- Should we talk about security implications here, or down below in the new features? -->
As will be described down below in more detail, the permissions for _Personal Access Tokens_ (PATs) have changed.\
While we have migrated all old tokens to the new format as close as possible, there are edge cases where an old token now has more/less permissions than before as the two systems have a completely different design.\
If that's the case for you, please consider regenerating your token to prevent API calls from failing or your token having a too broad scope.
### :warning: Removed/changed config entries ([#25010](https://github.com/go-gitea/gitea/pull/25010), [#24958](https://github.com/go-gitea/gitea/pull/24958), [#24754](https://github.com/go-gitea/gitea/pull/24754), [#24628](https://github.com/go-gitea/gitea/pull/24628), [#24505](https://github.com/go-gitea/gitea/pull/24505), [#24430](https://github.com/go-gitea/gitea/pull/24430/files), [#24270](https://github.com/go-gitea/gitea/pull/24270), [#23798](https://github.com/go-gitea/gitea/pull/23798), [#23733](https://github.com/go-gitea/gitea/pull/23733), [#23333](https://github.com/go-gitea/gitea/pull/23333), [#25604](https://github.com/go-gitea/gitea/pull/25604))
- We've removed the service worker functionality as it didn't bring any noticeable benefit, mostly added bugs, and was disabled since 1.17 by default already.\
Removed config key: `[ui].USE_SERVICE_WORKER`
- The default value of `[server].LFS_HTTP_AUTH_EXPIRY` has been increased from `20m` to `24h`. \
If you want to use the previous value, please set the setting.
- As will be described below, you can now set any git config also in your `app.ini`.
As such, we removed the section `[git.reflog]` and its keys have been moved to the following replacements:
- `[git.reflog].ENABLED``[git.config].core.logAllRefUpdates`
- `[git.reflog].EXPIRATION``[git.config].gc.reflogExpire`
- In addition to the already deprecated options inside `[queue]`, many options have been dropped as well. \
Those are `WRAP_IF_NECESSARY`, `MAX_ATTEMPTS`, `TIMEOUT`, `WORKERS`, `BLOCK_TIMEOUT`, `BOOST_TIMEOUT`, `BOOST_WORKERS`. \
You can remove them from your `app.ini` now. \
Additionally, some default values have changed in this section.
- The setting `[time].FORMAT` is no longer used
- The setting `[other].SHOW_FOOTER_BRANDING` was removed, as its intended purpose was superseded by `[other].SHOW_FOOTER_VERSION`
- The default value of `[server].SSH_KEYGEN_PATH` has changed from `ssh-keygen` to ` ` (empty), meaning that Gitea parses public keys by default itself rather than passing it to the system as previously.
- `[repository].DEFAULT_REPO_UNITS` and `[repository].DISABLED_REPO_UNITS` accepted the key `actions.actions` for a short time.\
However, the correct key should be `repo.actions`.
- `[repository.editor].PREVIEWABLE_FILE_MODES` was buggy and didn't work.\
As such, it is now removed.
- `[actions].DEFAULT_ACTIONS_URL` could previously be set to any custom URLs like https://gitea.com or http://your-git-server, and the default value was https://gitea.com. But now, `DEFAULT_ACTIONS_URL` only supports `github` (https://github.com) or `self` (the root url of current Gitea instance), and the default value is `github`. This change was made to make action names globally resolvable in most cases.
### :warning: Publication of `README.md` in `.profile` repos ([#23260](https://github.com/go-gitea/gitea/pull/23260))
As will be discussed below in the new features, Gitea now displays user profile READMEs.\
The displayed content is that of the `README.md` of a `.profile` repo.\
If you already have a repo with that name, its `README.md` will be publically accessible, **even if the repo is private**.\
If you don't want to leak that information, consider renaming your existing repo.
### :warning: Any URL scheme may be used for links ([#24805](https://github.com/go-gitea/gitea/pull/24805))
Previously, we would not render non-standard URLs (like `matrix:`) by default. We allowed adding custom URLs by modifying `markdown.CUSTOM_URL_SCHEMES` and these would then render as links in markdown, but there was no option to allow all schemes.
With this change in place, if `markdown.CUSTOM_URL_SCHEMES` is not configured, we will render all explicit markdown links (`[label](URL)`) as links.
#### Before
The `matrix:` and `cbthunderlink://` didn't render as links.
![Special links are not rendered](/demos/24805/before.png)
#### After
The `matrix:` and `cbthunderlink://` render as links, when we use the `[label](URL)` form.
![Special links are rendered](/demos/24805/after.png)
### :warning: Newly reserved usernames ([#23992](https://github.com/go-gitea/gitea/pull/23992))
User and organization names can no longer end with `.png`.
### :warning: Changed access log format ([#24085](https://github.com/go-gitea/gitea/pull/24085))
Logs from the access logger were previously escaped in unnecessary places.
Now, they no longer are.\
Furthermore, the field `{{.Ctx.RemoteAddr}}` has been renamed to `{{.Ctx.RemoteHost}}` to omit the port.
### :warning: Correct pagination in API route `teams/{id}/members` ([#24754](https://github.com/go-gitea/gitea/pull/24754))
Previously, this endpoint was 0-based paginated unlike all other routes. \
This bug has now been fixed.
### :warning: Refactored path and config system ([#25416](https://github.com/go-gitea/gitea/pull/25416))
The Gitea path system has been fairly complicated for a long time:\
It tried to guess paths quite often, which lead to countless problems.\
Instead, Gitea now automatically tries to store the path inside the config.\
If it fails to do so, it won't start. In that case, please do what the error message in the logs tells you to do and the issue should be resolved.
### :warning: `actions` table metrics collector was removed ([#25062](https://github.com/go-gitea/gitea/pull/25062))
The statistic of how many entries are in the `actions` table has always been rather useless as this table will always be (ridiculuously) large.\
As such, we removed the metrics collector for it.\
Please do not rely on its output anymore.
### :warning: Rework storage settings ([#23911](https://github.com/go-gitea/gitea/pull/23911))
All storage settings should be stored in one section, and one section only.
You cannot use multiple sections anymore to override settings.\
The storage settings priority is now
1. `[attachment]`
2. `[storage.attachments]` | `[storage.<another>]`
3. `[storage]`
4. `default`
For extra override configuration items, currently only are `SERVE_DIRECT`, `MINIO_BASE_PATH`, `MINIO_BUCKET`, which could be configured in another section.
The prioioty of the override configuration is `[attachment]` > `[storage.attachments]` > `default`.
### :warning: Refactor ctx in templates ([#23105](https://github.com/go-gitea/gitea/pull/23105))
If you use custom templates, you may need to change them:\
We've changed all occurring `.ctx` inside parameters to `.ctxData`.\
Any custom template currently using `.ctx` will need to follow suit.
### :warning: Rewrite logger system ([#24726](https://github.com/go-gitea/gitea/pull/24726))
The `log.<mode>.<logger>` style config has been dropped. If you used it, please check the new config manual & app.example.ini to make your instance output logs as expected.
The SMTP logger is deleted because SMTP is not suitable to collect logs.
## Notable improvements
### :rocket: New package registries
Gitea now supports the following package registries as well:
- Alpine ([#23714](https://github.com/go-gitea/gitea/pull/23714))
- CRAN ([#22331](https://github.com/go-gitea/gitea/pull/22331))
- Debian ([#24426](https://github.com/go-gitea/gitea/pull/24426))
- Go ([#24687](https://github.com/go-gitea/gitea/pull/24687))
- RPM ([#23380](https://github.com/go-gitea/gitea/pull/23380))
- Swift ([#22404](https://github.com/go-gitea/gitea/pull/22404))
So,
<details><summary>the complete list of supported package registries is now</summary>
|Name |Language| Package client|
|-------|--------|----------------|
|Alpine|-|`apk`|
|Cargo|Rust|`cargo`|
|Chef|-|`knife`|
|Composer|PHP|`composer`|
|Conan|C++|`conan`|
|Conda|-|`conda`|
|Container|-|any OCI compliant client|
|CRAN|R|-|
|Debian|-|`apt`|
|Generic|-|any HTTP client|
|Go|Go|`go`|
|Helm|-|any HTTP client, `cm-push`|
|Maven|Java|`mvn`, `gradle`|
|npm|JavaScript|`npm`, `yarn`, `pnpm`|
|NuGet|.NET|`nuget`|
|Pub|Dart|`dart`, `flutter`|
|PyPI|Python|`pip`, `twine`|
|RPM|-|`yum`, `dnf`|
|RubyGems|Ruby|`gem`, `Bundler`|
|Swift|Swift|`swift`|
|Vagrant|-|`vagrant`|
</details>
### :rocket: Gitea Actions
Gitea Actions has seen quite a number of new features since its initial launch in 1.19.0.\
Nevertheless, it is still in an experimental state.\
Here's what's new **on Gitea's side**:
- Gitea no longer crashes on an invalid workflow file :smiley: ([#23972](https://github.com/go-gitea/gitea/pull/23972))
- More available variables ([#24356T](https://github.com/go-gitea/gitea/pull/24356))
- `needs` and `outputs` support ([#24230](https://github.com/go-gitea/gitea/pull/24230))
- Registering runner tokens from the CLI ([#23762](https://github.com/go-gitea/gitea/pull/23762))
- Require approval for PRs from forks ([#22803](https://github.com/go-gitea/gitea/pull/22803))
- Reworked UI
- Upload Actions Artifacts ([#22738](https://github.com/go-gitea/gitea/pull/22738))
### :rocket: New API endpoints
Gitea 1.20 ships with many new API endpoints, including
- activity feed ([#23494](https://github.com/go-gitea/gitea/pull/23494))
- admin: rename user ([#22789](https://github.com/go-gitea/gitea/pull/22789))
- admin: show user email addresses ([#22792](https://github.com/go-gitea/gitea/pull/22792))
- changing multiple files at once ([#24887](https://github.com/go-gitea/gitea/pull/24887))
- gitignore templates ([#22783](https://github.com/go-gitea/gitea/pull/22783))
- issue dependencies ([#17935](https://github.com/go-gitea/gitea/pull/17935))
- issue pinning ([#24406](https://github.com/go-gitea/gitea/pull/24406))
- label templates ([#24602](https://github.com/go-gitea/gitea/pull/24602))
- license templates ([#23009](https://github.com/go-gitea/gitea/pull/23009))
### :rocket: Issue config ([#20956](https://github.com/go-gitea/gitea/pull/20956))
It is now possible to create an issue config by creating one of the files
1. `.gitea/ISSUE_TEMPLATE/config.y(a)ml`
1. `.gitea/issue_template/config.y(a)ml`
1. `.github/ISSUE_TEMPLATE/config.y(a)ml`
1. `.github/issue_template/config.y(a)ml`
(the files are queried in exactly this prioritization order).\
The issue config can be used to influence how users open issues.\
With it, you can force users to open issues from a template, or to display additional links, i.e. to nudge users to use another workflow such as sending an email to report security issues instead of reporting it publically.
```yaml
blank_issues_enabled: false
contact_links:
- name: Gitea
url: https://gitea.io
about: Visit the Gitea Website
- name: Security issues
url: mailto:security@gitea.io
about: Mail us a security issue instead of opening a public issue
```
for example results in the following output on the `new issue` page (assuming there is a `Bug Report` issue template):
![issue config screenshot](/demos/20956/issue-config.png)
You can find more information in the [documentation](https://docs.gitea.com/1.20/usage/issue-pull-request-templates#syntax-for-issue-config).
### :rocket: Better editor text area ([#23876](https://github.com/go-gitea/gitea/pull/23876))
Previously, Gitea used a Pseudo-_What-you-see-is-what-you-get_ editor to display text areas.
This meant that you would immediately see how the text you're writing would be displayed.
However, this had many disadvantages:
- as mentioned, it didn't use the actual result but rather computed its own. That meant the result could still be (and often was) different.
- missing accessibility: This editor was absolutely unusable both on smartphones and for visually impaired users.
- Focus-wise, you were trapped inside the editor once you tabbed in.
- bugs: There were **many**.
So, Gitea changed it to the following mechanism now:
- It's a normal textarea by default, so no more syntax highlighting but full accessibility
- If you want to see how your text will be rendered, click on the `Preview` tab
- You can still switch to the old legacy editor in the button bar above the textarea
- New features will only be added to the normal textarea and not the legacy editor
- We don't fix any bugs for the legacy editor anymore
- We plan to remove the legacy text editor in a future release, i.e. in a year or two
### :rocket: Scoped PAT rework ([#24767](https://github.com/go-gitea/gitea/pull/24767))
We noticed that the existing approach to create scoped _Personal Access Tokens_ (PATs) was pretty confusing, even if you've created one previously.
Hence, we rewrote them so that they are much easier to use.\
This is the new design:
![screenshot of how to create a new scoped token](/demos/24767/scoped-access-token-creation.png)
Meanwhile, this is the API page:\
![screenshot of the API blocks](/demos/24767/api-scopes.png)
You can hopefully guess now what each of the new scopes mean.
### :rocket: User Profile README ([#23260](https://github.com/go-gitea/gitea/pull/23260))
If your user acount contains a `.profile` repository, its `README.md` file will be shown publically in your profile. This allows users to present more information about them on their profile page.
![Screenshot of a profile page with displayed profile README](/demos/23260/user-profile-page.png)
### :rocket: User webhooks ([#21563](https://github.com/go-gitea/gitea/pull/21563))
Now, you can not only add webhooks for organizations but also for users.
### :rocket: Archival date of a repo ([#22664](https://github.com/go-gitea/gitea/pull/22664))
Archived repos now store **when** they were archived:
![archival timestamp screenshot](/demos/22664/repo-archival-date.png)
### :rocket: Cancelable repository migrations ([#24605](https://github.com/go-gitea/gitea/pull/24605))
Then waiting for a repository migration to finish, there now is a button to cancel the process.
![screenshot of a migration page with cancel button](/demos/24605/cancelable-migration.png)
### :rocket: Issue pinning ([#24406](https://github.com/go-gitea/gitea/pull/24406))
Repository maintainers can now pin issues and pull requests, so that they always appear on top. The maximum number of pinned issues/pull requests per repo can be set in your `app.ini`.
![A screenshot of the issue page with pinned issues](/demos/24406/issue-pinning.png)
### :rocket: Latest commit status on dashboard ([#24638](https://github.com/go-gitea/gitea/pull/24638))
We now show the status of the latest commit of the default branch for each repository in the dashboard repository list.
![A list showing repositories and their latest status](/demos/24638/latest-commit-status-dashboard.png)
### :rocket: Vertical instead of horizontal settings ([#24246](https://github.com/go-gitea/gitea/pull/24246))
We ran out of space to add new settings categories:\
It is not usable if you need to scroll endlessly to find a category.\
Hence, we switched the settings order around, so that the settings categories are now displayed on the left instead of at the top:
![vertical settings appearance](/demos/24246/vertical-settings.png)
### :rocket: Expand/collapse all files of a PR ([#23639](https://github.com/go-gitea/gitea/pull/23639))
When reviewing the files of a PR, it is now possible to show or hide all changes.\
This is especially useful when revisiting a PR you already reviewed to look for something.
![screenshot of the three-dot-menu showing the new options](/demos/23639/expand-collapse-files.png)
### :rocket: Switch textarea to Monospace font ([#24034](https://github.com/go-gitea/gitea/pull/24034))
When using a textarea, you can now switch to monospace font if you want.
![hovering on the "switch font" button](/demos/24034/monospace-textarea.png)
### :rocket: Predictable release download URLs ([#23891](https://github.com/go-gitea/gitea/pull/23891))
Download URLs for release files now have a predictable structure:
`<repo>/releases/download/<tag>/<filename>`
For example `https://gitea.com/gitea/act_runner/releases/download/v0.2.3/act_runner-0.2.3-linux-amd64` gets you the file `act_runner-0.2.3-linux-amd64` from the tag `v0.2.3` of Act Runner.
If there are multiple files with the same name, the old UUID-based URLs will be used.
### :rocket: Auto-updating and localized time stamps ([#23988](https://github.com/go-gitea/gitea/pull/23988))
Previously each rendered timestamp would be static, now we show the real time since an event happend. If a comment was added 2 minutes before the page rendered it would show as "2 minutes ago" on the initial render and if another 8 minutes have passed, without a page refresh you'd see "10 minutes ago".
![Auto-updating duration timestamp](/demos/23988/auto-updating-timestamp.gif)
Previously all timestamps would render in English, we now render these according to the user's chosen locale.
![German](/demos/23988/german-timestamp.png)
![Spanish](/demos/23988/spanish-timestamp.png)
### :rocket: Wildcards for required status checks in branch protection ([#24633](https://github.com/go-gitea/gitea/pull/24633))
If a protected branch requires status checks to pass before merging, the required checks can now be specified using wildcard patterns.
![screenshot of the status check setting](/demos/24633/wildcards-for-required-status-checks.png)
### :rocket: Systemd-notify support ([#21151](https://github.com/go-gitea/gitea/pull/21151))
Gitea can now notify `systemd` whenever it is ready.\
To enable it, your systemd service file should contain the key `[Service].Type=notify`,\
as you can see for example in the [provided example file](https://github.com/go-gitea/gitea/blob/main/contrib/systemd/gitea.service).
Sidenote: We are aware that we should only have updated the [example file](https://github.com/go-gitea/gitea/blob/main/contrib/systemd/gitea.service) once the release was released.\
Many people complained that systemd keeps restarting their (pre-1.20.0) Gitea after a few seconds as it expected status reports which previous Gitea versions obviously couldn't do.\
Apologies for any headaches this may have caused.
### :rocket: Configure Git through your `app.ini` ([#24860](https://github.com/go-gitea/gitea/pull/24860))
Any entries in your`app.ini` in the `[git.config]` section will now be used to customize the git internal behavior for Gitea.\
In other words,
```ini
[git.config]
a.key=value1
b.key=value2
```
is equal to
```sh
git config a.key value1;
git config b.key value2;
```
for the gitconfig used by Gitea.\
This has the following benefits:
1. Gitea can set all options it needs itself
2. All config options declared in the config cheatsheet and example app.ini are values that Gitea will set itself if not overridden
3. You don't need to know where the gitconfig Gitea uses is, everything is done through the `app.ini`
4. Docker users don't need to mount a separate file for the gitconfig
### :rocket: Refactorings
Gitea 1.20 has underwent **a lot** of refactorings ([111](https://github.com/go-gitea/gitea/pulls?q=is%3Apr+milestone%3A1.20.0+label%3Akind%2Frefactor) to be precise).
This both reduces the amount of bugs as well as ensures that Gitea will continue to be able to add new features.
## Changelog
## [1.20.0](https://github.com/go-gitea/gitea/releases/tag/v1.20.0) - {{.DateShort}}
<!-- Changelog Details -->

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB