]> source.dussan.org Git - gitea.git/log
gitea.git
8 months agoCheck for sha256 support to use --object-format flag (#28928)
John Olheiser [Thu, 25 Jan 2024 18:04:50 +0000 (12:04 -0600)]
Check for sha256 support to use --object-format flag (#28928)

This should fix https://github.com/go-gitea/gitea/issues/28927

Technically older versions of Git would support this flag as well, but
per https://github.com/go-gitea/gitea/pull/28466 that's the version
where using it (object-format=sha256) left "experimental" state.

`sha1` is (currently) the default, so older clients should be unaffected
in either case.

Signed-off-by: jolheiser <john.olheiser@gmail.com>
8 months agofix: update enable_prune even if mirror_interval is not provided (#28905) 24212/head
Anthony Quéré [Thu, 25 Jan 2024 12:51:32 +0000 (13:51 +0100)]
fix: update enable_prune even if mirror_interval is not provided (#28905)

Currently, the `updateMirror` function which update the mirror interval
and enable prune properties is only executed by the `Edit` function. But
it is only triggered if `opts.MirrorInterval` is not null, even if
`opts.EnablePrune` is not null.

With this patch, it is now possible to update the enable_prune property
with a patch request without modifying the mirror_interval.

## Example request with httpie

### Currently:
**Does nothing**
```bash
http PATCH https://gitea.your-server/api/v1/repos/myOrg/myRepo "enable_prune:=false" -A bearer -a $gitea_token
```

**Updates both properties**
```bash
http PATCH https://gitea.your-server/api/v1/repos/myOrg/myRepo "enable_prune:=false" "mirror_interval=10m" -A bearer -a $gitea_token
```

### With the patch
**Updates enable_prune only**
```bash
http PATCH https://gitea.your-server/api/v1/repos/myOrg/myRepo "enable_prune:=false" -A bearer -a $gitea_token
```

8 months agoImplement `MigrateRepository` for the actions notifier (#28920)
Zettat123 [Thu, 25 Jan 2024 12:06:29 +0000 (20:06 +0800)]
Implement `MigrateRepository` for the actions notifier (#28920)

Fixes #28699

This PR implements the `MigrateRepository` method for `actionsNotifier`
to detect the schedules from the workflow files in the migrated
repository.

8 months agoRespect branch info for relative links (#28909)
KN4CK3R [Thu, 25 Jan 2024 08:54:44 +0000 (09:54 +0100)]
Respect branch info for relative links (#28909)

Fix #28904

Co-authored-by: Giteabot <teabot@gitea.io>
8 months ago[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 25 Jan 2024 00:25:21 +0000 (00:25 +0000)]
[skip ci] Updated translations via Crowdin

8 months agoShow in Web UI if file is vendored and generated (#28620)
JakobDev [Wed, 24 Jan 2024 05:51:37 +0000 (06:51 +0100)]
Show in Web UI if file is vendored and generated (#28620)

This simple shows in the Web UI is a file is vendored and/or generated.

![grafik](https://github.com/go-gitea/gitea/assets/15185051/bfe45fcc-cfec-4ba1-8d93-c0a262c3ae1c)

![grafik](https://github.com/go-gitea/gitea/assets/15185051/9f222a49-e7bf-4540-ba64-43dcc5767b76)

---------

Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
8 months agoDon't reload timeline page when (un)resolving or replying conversation (#28654)
Jimmy Praet [Wed, 24 Jan 2024 03:26:28 +0000 (04:26 +0100)]
Don't reload timeline page when (un)resolving or replying conversation (#28654)

Fixes #15981

8 months agoAllow to sync tags from admin dashboard (#28045)
JakobDev [Wed, 24 Jan 2024 03:02:04 +0000 (04:02 +0100)]
Allow to sync tags from admin dashboard (#28045)

Inspired by #28043

This PR adds a option to the Admin Dashboard to sync all tags to the
database.

![grafik](https://github.com/go-gitea/gitea/assets/15185051/26ac51ef-82a4-4fd9-a6a6-5aefec612ff6)

8 months agoDon't run push mirrors for archived repos (#27140)
JakobDev [Wed, 24 Jan 2024 02:32:57 +0000 (03:32 +0100)]
Don't run push mirrors for archived repos (#27140)

Fixes https://codeberg.org/forgejo/forgejo/issues/612

At the moment push mirrors are still run if a repo is archived. This PR
fixes this.

8 months agoOnly migrate the first 255 chars of a Github issue title (#28902)
JakobDev [Wed, 24 Jan 2024 02:09:08 +0000 (03:09 +0100)]
Only migrate the first 255 chars of a Github issue title (#28902)

Fixes #28846

8 months agoFix hardcoded GitHub icon used as migrated release avatar (#28910)
wackbyte [Wed, 24 Jan 2024 01:07:13 +0000 (20:07 -0500)]
Fix hardcoded GitHub icon used as migrated release avatar (#28910)

8 months ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 24 Jan 2024 00:25:44 +0000 (00:25 +0000)]
[skip ci] Updated translations via Crowdin

8 months agoUpdate go dependencies and fix go-git (#28893)
wxiaoguang [Tue, 23 Jan 2024 05:40:00 +0000 (13:40 +0800)]
Update go dependencies and fix go-git (#28893)

More details are in the comment of repo_base_gogit.go

And ref: https://github.com/go-git/go-git/issues/1006

8 months agoFix sort bug on repository issues list (#28897)
Lunny Xiao [Tue, 23 Jan 2024 01:17:42 +0000 (09:17 +0800)]
Fix sort bug on repository issues list (#28897)

Fix #28896

8 months agoUpgrade xorm to v1.3.7 to fix a resource leak problem caused by Iterate (#28891)
Lunny Xiao [Mon, 22 Jan 2024 10:24:55 +0000 (18:24 +0800)]
Upgrade xorm to v1.3.7 to fix a resource leak problem caused by Iterate (#28891)

Mainly fix an error https://gitea.com/xorm/xorm/issues/2393

8 months agoAdd missing exclusive in advanced label options (#28322)
Luca Zulberti [Mon, 22 Jan 2024 07:56:17 +0000 (08:56 +0100)]
Add missing exclusive in advanced label options (#28322)

Hi, I think these changes could be useful for default labels when
creating new repos.

The PR includes the following changes:
 - Add missing exclusive flag for Kind/ scope in labels.
 - Move Breaking label into new Compat/ scope.

8 months agoFix `DeleteCollaboration` transaction behaviour (#28886)
KN4CK3R [Mon, 22 Jan 2024 07:19:56 +0000 (08:19 +0100)]
Fix `DeleteCollaboration` transaction behaviour (#28886)

The method can't be called with an outer transaction because if the user
is not a collaborator the outer transaction will be rolled back even if
the inner transaction uses the no-error path.

`has == 0` leads to `return nil` which cancels the transaction. A
standalone call of this method does nothing but if used with an outer
transaction, that will be canceled.

8 months agoFix schedule not trigger bug because matching full ref name with short ref name ...
Lunny Xiao [Mon, 22 Jan 2024 02:13:24 +0000 (10:13 +0800)]
Fix schedule not trigger bug because matching full ref name with short ref name (#28874)

Fix #28533

Caused by #28691

8 months ago[skip ci] Updated licenses and gitignores
GiteaBot [Mon, 22 Jan 2024 00:26:33 +0000 (00:26 +0000)]
[skip ci] Updated licenses and gitignores

8 months agoPrevent anonymous container access if `RequireSignInView` is enabled (#28877)
KN4CK3R [Sun, 21 Jan 2024 16:31:29 +0000 (17:31 +0100)]
Prevent anonymous container access if `RequireSignInView` is enabled (#28877)

Fixes #28875

If `RequireSignInView` is enabled, the ghost user has no access rights.

8 months agoDon't show new pr button when page is not compare pull (#26431)
yp05327 [Sun, 21 Jan 2024 15:13:00 +0000 (00:13 +0900)]
Don't show new pr button when page is not compare pull (#26431)

Before:

![image](https://github.com/go-gitea/gitea/assets/18380374/ba69252f-3582-414a-9d62-b2b78d7035dd)
After:

![image](https://github.com/go-gitea/gitea/assets/18380374/71b8587c-b96e-48fb-b3e5-1a2a8b5d06fa)
(TestOrg:test is a tag not branch)

Problem:
In the template, we will not add `compare pull` class when
`PageIsComparePull` is false.

https://github.com/go-gitea/gitea/blob/a370efc13f0e1ea309e324639832832bc14cb6dc/templates/repo/diff/compare.tmpl#L2
But in the js, we are using `.repository.compare.pull` to find the
button:

https://github.com/go-gitea/gitea/blob/a370efc13f0e1ea309e324639832832bc14cb6dc/web_src/js/features/repo-legacy.js#L552-L563
So, if `PageIsComparePull` is false, the `New Pull Request` button will
be there, but has no response when we click it.

8 months agoAvoid duplicate JS error messages on UI (#28873)
wxiaoguang [Sun, 21 Jan 2024 14:23:08 +0000 (22:23 +0800)]
Avoid duplicate JS error messages on UI (#28873)

Gitea treat JS errors seriously, so sometimes the JS errors caused by
3rdparty code (eg: browser extensions) would also be reported on Gitea
UI: TypeError: WeakMap key undefined (caused by extension DarkReader's
bug) #28861

To avoid fill the user's screen with a lot of error messages, this PR
merges the same error messages into one, like this:

```js
<div class="page-content">
  <div class="... js-global-error" data-global-error-msg-compact="testmsg1" data-global-error-msg-count="2">test msg 1 (2)</div>
  <div class="... js-global-error" data-global-error-msg-compact="testmsg2" data-global-error-msg-count="1">test msg 2</div>
</div>
```

8 months agoFix branch list bug which displayed default branch twice (#28878)
Lunny Xiao [Sun, 21 Jan 2024 14:08:31 +0000 (22:08 +0800)]
Fix branch list bug which displayed default branch twice (#28878)

Fix #28876

8 months agoRevert adding htmx until we finaly decide to add it (#28879)
6543 [Sun, 21 Jan 2024 13:42:35 +0000 (14:42 +0100)]
Revert adding htmx until we finaly decide to add it (#28879)

8 months agoDon't do a full page load when clicking the follow button (#28872)
Yarden Shoham [Sat, 20 Jan 2024 22:37:22 +0000 (00:37 +0200)]
Don't do a full page load when clicking the follow button (#28872)

- Use htmx to perform the button request
- `hx-headers='{"x-csrf-token": "{{.CsrfToken}}"}'` to authenticate (we
should probably learn to reuse this)
- `hx-post="{{.ContextUser.HomeLink}}?action=follow"` to send a POST
request to follow the user
- `hx-target="#profile-avatar-card"` to target the card div for
replacement
- `hx-swap="outerHTML"` to replace the card (as opposed to its inner
content) with the new card that shows the new follower count and button
color
- Change the backend response to return a `<div>` tag (the card) instead
of a redirect to the user page

# Before

![before](https://github.com/go-gitea/gitea/assets/20454870/86899d15-41c9-42ed-bd85-253b9caac7f8)

# After

![after](https://github.com/go-gitea/gitea/assets/20454870/59455d96-548c-4a81-a5b0-fab1dc1e87ef)

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
8 months agoDon't do a full page load when clicking the subscribe button (#28871)
Yarden Shoham [Sat, 20 Jan 2024 19:44:51 +0000 (21:44 +0200)]
Don't do a full page load when clicking the subscribe button (#28871)

- Refactor the form around the subscribe button into its own template
- Use htmx to perform the form submission
- `hx-boost="true"` to prevent the default form submission behavior of a
full page load
- `hx-sync="this:replace"` to replace the current request (in case the
button is clicked again before the response is returned)
  - `hx-target="this"` to replace the form tag with the new form tag
  - `hx-push-url="false"` to disable a change to the URL
  - `hx-swap="show:no-scroll"` to preserve the scroll position
- Change the backend response to return a `<form>` tag instead of a
redirect to the issue page
- Include `htmx.org` in javascript imports

This change introduces htmx with the hope we could use it to make Gitea
more reactive while keeping our "HTML rendered on the server" approach.

# Before

![before](https://github.com/go-gitea/gitea/assets/20454870/4ec3e81e-4dbf-4338-9968-b0655c276d4c)

# After

![after](https://github.com/go-gitea/gitea/assets/20454870/8c8841af-9bfe-40b2-b1cd-cd1f3c90ba4d)

---------

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
8 months agoFix incorrect PostgreSQL connection string for Unix sockets (#28865)
sdvcrx [Sat, 20 Jan 2024 16:04:47 +0000 (00:04 +0800)]
Fix incorrect PostgreSQL connection string for Unix sockets (#28865)

Fix #28864

8 months agoRun `npm audit fix` (#28866)
Yarden Shoham [Sat, 20 Jan 2024 15:37:32 +0000 (17:37 +0200)]
Run `npm audit fix` (#28866)

8 months agoFix migrate storage bug (#28830)
Lunny Xiao [Sat, 20 Jan 2024 15:27:31 +0000 (23:27 +0800)]
Fix migrate storage bug (#28830)

8 months agoSet the `isPermaLink` attribute to `false` in the `guid` sub-element (#28860)
Yarden Shoham [Sat, 20 Jan 2024 02:38:16 +0000 (04:38 +0200)]
Set the `isPermaLink` attribute to `false` in the `guid` sub-element (#28860)

Our `guid` is not a valid URL so according to the RSS spec the
`isPermaLink` attribute needs to be set to `false`.

Example:
```diff
<item>
  <title>yardenshoham opened issue &lt;a href=&#34;https://3000-yardenshoham-gitea-jqlxjixsez9.ws-us107.gitpod.io/yardenshoham/test/issues/2&#34;&gt;yardenshoham/test#2&lt;/a&gt;</title>
  <link>https://3000-yardenshoham-gitea-jqlxjixsez9.ws-us107.gitpod.io/yardenshoham/test/issues/2</link>
  <description>2#hey</description>
  <content:encoded><![CDATA[2#hey]]></content:encoded>
  <author>yardenshoham</author>
- <guid>355: https://3000-yardenshoham-gitea-jqlxjixsez9.ws-us107.gitpod.io/yardenshoham/test/issues/2</guid>
+ <guid isPermaLink="false">355: https://3000-yardenshoham-gitea-jqlxjixsez9.ws-us107.gitpod.io/yardenshoham/test/issues/2</guid>
  <pubDate>Tue, 16 Jan 2024 18:54:36 +0000</pubDate>
</item>
```

References:
-
https://www.rssboard.org/rss-specification#ltguidgtSubelementOfLtitemgt
- Fixes https://github.com/go-gitea/gitea/issues/28734
- https://github.com/gorilla/feeds/issues/78
- https://github.com/go-gitea/gitea/pull/21550
- https://github.com/gorilla/feeds/pull/107

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
8 months agoIn administration documentation about environment variables, point to those for the...
Mechiel Lukkien [Sat, 20 Jan 2024 02:12:20 +0000 (03:12 +0100)]
In administration documentation about environment variables, point to those for the Go runtime instead of Go compiler (#28859)

The previous variables are used by the compiler and aren't too useful
for non-developers. The newly listed variables are more likely to be of
interest.

Apologies for this drive-by PR, I probably missed instructions from the
contributors guide. The patch can be regarded as a simple way to explain
the problem and solution. Feel free to close and possibly create a new
PR that does adhere to the contributors guide.

8 months agoMove doctor package from modules to services (#28856)
Lunny Xiao [Sat, 20 Jan 2024 02:07:31 +0000 (10:07 +0800)]
Move doctor package from modules to services (#28856)

8 months agoAdd support for sha256 repositories (#23894)
Adam Majer [Fri, 19 Jan 2024 16:05:02 +0000 (16:05 +0000)]
Add support for sha256 repositories (#23894)

Currently only SHA1 repositories are supported by Gitea. This adds
support for alternate SHA256 with the additional aim of easier support
for additional hash types in the future.

Fixes: #13794
Limited by: https://github.com/go-git/go-git/issues/899
Depend on: #28138

<img width="776" alt="图片" src="https://github.com/go-gitea/gitea/assets/81045/5448c9a7-608e-4341-a149-5dd0069c9447">

---------

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: 6543 <6543@obermui.de>
8 months agoFix incorrect action duration time when rerun the job before executed once (#28364)
yp05327 [Fri, 19 Jan 2024 14:05:49 +0000 (23:05 +0900)]
Fix incorrect action duration time when rerun the job before executed once (#28364)

Fix #28323
Reason was mentioned here:
https://github.com/go-gitea/gitea/issues/28323#issuecomment-1841867298

### Changes: (maybe breaking)
We can rerun jobs in Gitea, so there will be some problems in
calculating duration time.
In this PR, I use the exist `Started` and `Stopped` column to record the
last run time instead of the total time,
and add a new `PreviousDuration` column to record the previous duration
time.
You can also check the cost time of last run:

![image](https://github.com/go-gitea/gitea/assets/18380374/2ca39145-2c92-401a-b78b-43164f7ae061)

8 months agoFix some RPM registry flaws (#28782)
KN4CK3R [Fri, 19 Jan 2024 11:37:10 +0000 (12:37 +0100)]
Fix some RPM registry flaws (#28782)

Related #26984
(https://github.com/go-gitea/gitea/pull/26984#issuecomment-1889588912)

Fix admin cleanup message.
Fix models `Get` not respecting default values.
Rebuild RPM repository files after cleanup.
Do not add RPM group to package version name.
Force stable sorting of Alpine/Debian/RPM repository data.
Fix missing deferred `Close`.
Add tests for multiple RPM groups.
Removed non-cached `ReplaceAllStringRegex`.

If there are multiple groups available, it's stated in the package
installation screen:

![grafik](https://github.com/go-gitea/gitea/assets/1666336/8f132760-882c-4ab8-9678-77e47dfc4415)

8 months agotests: missing refs/ in bare repositories (#28844)
Adam Majer [Fri, 19 Jan 2024 07:12:21 +0000 (07:12 +0000)]
tests: missing refs/ in bare repositories (#28844)

Git 2.43.0 will not detect a git repository as valid without refs/
subdirectory present. `git gc` cleans this up and puts it in
packed-refs. We must keep refs/ non-empty.

8 months agoFix archive creating LFS hooks and breaking pull requests (#28848)
Brecht Van Lommel [Fri, 19 Jan 2024 05:49:18 +0000 (06:49 +0100)]
Fix archive creating LFS hooks and breaking pull requests (#28848)

When LFS hooks are present in gitea-repositories, operations like git
push for creating a pull request fail. These repositories are not meant
to include LFS files or git push them, that is handled separately. And
so they should not have LFS hooks.

Installing git-lfs on some systems (like Debian Linux) will
automatically set up /etc/gitconfig to create LFS hooks in repositories.
For most git commands in Gitea this is not a problem, either because
they run on a temporary clone or the git command does not create LFS
hooks.

But one case where this happens is git archive for creating repository
archives. To fix that, add a GIT_CONFIG_NOSYSTEM=1 to disable using the
system configuration for that command.

According to a comment, GIT_CONFIG_NOSYSTEM is not used for all git
commands because the system configuration can be intentionally set up
for Gitea to use.

Resolves #19810, #21148

8 months agoReturn `responseText` instead of string in some functions (#28836)
yp05327 [Fri, 19 Jan 2024 02:45:23 +0000 (11:45 +0900)]
Return `responseText` instead of string in some functions (#28836)

Follow
https://github.com/go-gitea/gitea/pull/28796#issuecomment-1891727591

8 months agoFix display latest sync time for pull mirrors on the repo page (#28841)
yp05327 [Thu, 18 Jan 2024 10:27:07 +0000 (19:27 +0900)]
Fix display latest sync time for pull mirrors on the repo page (#28841)

Follow #28712

1. Missing Locale word `mirror_sync`
2. Maybe forgot checking the conflict from #27760

Before:

![image](https://github.com/go-gitea/gitea/assets/18380374/6100d35b-7fe3-4095-9c24-7875568f7380)

After:

![image](https://github.com/go-gitea/gitea/assets/18380374/69647169-b812-45bc-a267-ab28f2df6ef6)

9 months agoAdd testing for CalcCommitStatus (#28823)
Lunny Xiao [Wed, 17 Jan 2024 13:27:59 +0000 (21:27 +0800)]
Add testing for CalcCommitStatus (#28823)

9 months agoRemove duplicated checkinit on git module (#28824)
Lunny Xiao [Wed, 17 Jan 2024 09:56:00 +0000 (17:56 +0800)]
Remove duplicated checkinit on git module (#28824)

`checkInit` has been invoked in `InitSimple`. So it's unnecessary to
invoke it twice in `InitFull`.

9 months agoAdd missing migration (#28827)
Lunny Xiao [Wed, 17 Jan 2024 09:26:45 +0000 (17:26 +0800)]
Add missing migration (#28827)

Missed from #28498

9 months agoFix uploaded artifacts should be overwritten (#28726)
FuXiaoHei [Wed, 17 Jan 2024 03:21:16 +0000 (11:21 +0800)]
Fix uploaded artifacts should be overwritten (#28726)

Fix `Uploaded artifacts should be overwritten`
https://github.com/go-gitea/gitea/issues/28549

When upload different content to uploaded artifact, it checks that
content size is not match in db record with previous artifact size, then
the new artifact is refused.

Now if it finds uploading content size is not matching db record when
receiving chunks, it updates db records to follow the latest size value.

9 months agoRetarget depending pulls when the parent branch is deleted (#28686)
Viktor Kuzmin [Wed, 17 Jan 2024 00:44:56 +0000 (03:44 +0300)]
Retarget depending pulls when the parent branch is deleted (#28686)

Sometimes you need to work on a feature which depends on another (unmerged) feature.
In this case, you may create a PR based on that feature instead of the main branch.
Currently, such PRs will be closed without the possibility to reopen in case the parent feature is merged and its branch is deleted.
Automatic target branch change make life a lot easier in such cases.
Github and Bitbucket behave in such way.

Example:
$PR_1$: main <- feature1
$PR_2$: feature1 <- feature2

Currently, merging $PR_1$ and deleting its branch leads to $PR_2$ being closed without the possibility to reopen.
This is both annoying and loses the review history when you open a new PR.

With this change, $PR_2$ will change its target branch to main ($PR_2$: main <- feature2) after $PR_1$ has been merged and its branch has been deleted.

This behavior is enabled by default but can be disabled.
For security reasons, this target branch change will not be executed when merging PRs targeting another repo.

Fixes #27062
Fixes #18408

---------

Co-authored-by: Denys Konovalov <kontakt@denyskon.de>
Co-authored-by: delvh <dev.lh@web.de>
9 months agoBump `@github/relative-time-element` to 4.3.1 (#28819)
Yarden Shoham [Tue, 16 Jan 2024 21:52:19 +0000 (23:52 +0200)]
Bump `@github/relative-time-element` to 4.3.1 (#28819)

- Fixes https://github.com/go-gitea/gitea/issues/28747

# Before

![image](https://github.com/go-gitea/gitea/assets/20454870/65d8dc84-680f-4c16-9aa1-b5986102e4e7)

# After

![image](https://github.com/go-gitea/gitea/assets/20454870/7cb288e7-ebde-4e94-a10a-cac28d6bdcfd)

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
9 months agoFix reverting a merge commit failing (#28794)
Mihir Joshi [Tue, 16 Jan 2024 15:06:51 +0000 (20:36 +0530)]
Fix reverting a merge commit failing (#28794)

Fixes #22236

---
Error occurring currently while trying to revert commit using read-tree
-m approach:
> 2022/12/26 16:04:43 ...rvices/pull/patch.go:240:AttemptThreeWayMerge()
[E] [63a9c61a] Unable to run read-tree -m! Error: exit status 128 -
fatal: this operation must be run in a work tree
>   - fatal: this operation must be run in a work tree

We need to clone a non-bare repository for `git read-tree -m` to work.

https://github.com/go-gitea/gitea/commit/bb371aee6ecf5e570cdf7b5f7f0d6f47a607a325
adds support to create a non-bare cloned temporary upload repository.

After cloning a non-bare temporary upload repository, we [set default
index](https://github.com/go-gitea/gitea/blob/main/services/repository/files/cherry_pick.go#L37)
(`git read-tree HEAD`).
This operation ends up resetting the git index file (see investigation
details below), due to which, we need to call `git update-index
--refresh` afterward.

Here's the diff of the index file before and after we execute
SetDefaultIndex: https://www.diffchecker.com/hyOP3eJy/

Notice the **ctime**, **mtime** are set to 0 after SetDefaultIndex.

You can reproduce the same behavior using these steps:
```bash
$ git clone https://try.gitea.io/me-heer/test.git -s -b main
$ cd test
$ git read-tree HEAD
$ git read-tree -m 1f085d7ed8 1f085d7ed8 9933caed00
error: Entry '1' not uptodate. Cannot merge.
```

After which, we can fix like this:
```
$ git update-index --refresh
$ git read-tree -m 1f085d7ed8 1f085d7ed8 9933caed00
```

9 months agoRender code block in activity tab (#28816)
JakobDev [Tue, 16 Jan 2024 14:38:09 +0000 (15:38 +0100)]
Render code block in activity tab (#28816)

This is a little bugfix. Inline code is usually rendered in issue
titles, but it is missing in the activity tab.

Before:
![Screenshot 2024-01-16 at 14-20-51
Test](https://github.com/go-gitea/gitea/assets/15185051/383370f3-0fb2-49de-81cc-014e5cf86727)
After:

![grafik](https://github.com/go-gitea/gitea/assets/15185051/83eaf973-ce9a-44ce-beea-2db49fc8bd73)

9 months agoRemove trust model selection from repository creation on web page because it can...
Lunny Xiao [Tue, 16 Jan 2024 12:54:48 +0000 (20:54 +0800)]
Remove trust model selection from repository creation on web page because it can be changed in settings later (#28814)

As more and more options can be set for creating the repository, I don't
think we should put all of them into the creation web page which will
make things look complicated and confusing.

And I think we need some rules about how to decide which should/should
not be put in creating a repository page. One rule I can imagine is if
this option can be changed later and it's not a MUST on the creation,
then it can be removed on the page. So I found trust model is the first
one.

This PR removed the trust model selections on creating a repository web
page and kept others as before.
This is also a preparation for #23894 which will add a choice about SHA1
or SHA256 that cannot be changed once the repository created.

9 months agoUse refname:strip-2 instead of refname:short when syncing tags (#28797)
Lunny Xiao [Tue, 16 Jan 2024 07:13:07 +0000 (15:13 +0800)]
Use refname:strip-2 instead of refname:short when syncing tags (#28797)

Fix #28694

Generally, `refname:short` should be equal to `refname:lstrip=2` except
`core.warnAmbiguousRefs is used to select the strict abbreviation mode.`

ref:
https://git-scm.com/docs/git-for-each-ref#Documentation/git-for-each-ref.txt-refname

9 months agoAdd gist to comparison (#28809)
crapStone [Mon, 15 Jan 2024 22:37:32 +0000 (22:37 +0000)]
Add gist to comparison (#28809)

This PR adds a section to the documentation that links to the project
[Opengist](https://github.com/thomiceli/opengist) on GitHub.

The feature was proposed in #16670 but didn't resonate well with the
maintainers.

9 months agoFix links in issue card (#28806)
Denys Konovalov [Mon, 15 Jan 2024 20:38:13 +0000 (21:38 +0100)]
Fix links in issue card (#28806)

Fixes_
https://github.com/go-gitea/gitea/issues/23318#issuecomment-1611086747

9 months agoShow latest commit for file (#28067)
JakobDev [Mon, 15 Jan 2024 16:42:15 +0000 (17:42 +0100)]
Show latest commit for file (#28067)

If you view a file, you can now see the latest commit that changed that file.

![grafik](https://github.com/go-gitea/gitea/assets/15185051/272c3120-6db7-4f88-86e1-60080c9aabe5)

---------

Co-authored-by: Denys Konovalov <kontakt@denyskon.de>
9 months agoAdd ability to see open and closed issues at the same time (#28757)
Gwyneth Morgan [Mon, 15 Jan 2024 15:07:22 +0000 (07:07 -0800)]
Add ability to see open and closed issues at the same time (#28757)

By clicking the currently active "Open" or "Closed" filter button in the
issue list, the user can toggle that filter off in order to see all
issues regardless of state. The URL "state" parameter will be set to
"all" and the "Open"/"Closed" button will not show as active.

9 months agoDisplay latest sync time for pull mirrors on the repo page (#28712)
Dmitry Sharshakov [Mon, 15 Jan 2024 14:37:14 +0000 (17:37 +0300)]
Display latest sync time for pull mirrors on the repo page (#28712)

Fixes #25168

---------

Co-authored-by: delvh <dev.lh@web.de>
9 months agoFix `GetCommitStatuses` (#28787)
KN4CK3R [Mon, 15 Jan 2024 14:07:32 +0000 (15:07 +0100)]
Fix `GetCommitStatuses` (#28787)

Fixes #28764.

9 months agoCaller should check the ResponseExtra.HasError() first to see whether the request...
wxiaoguang [Mon, 15 Jan 2024 11:15:31 +0000 (19:15 +0800)]
Caller should check the ResponseExtra.HasError() first to see whether the request fails (#28796)

`resp != nil` doesn't mean the request really succeeded. Add a comment
for requestJSONResp to clarify the behavior.

9 months agoRework markup link rendering (#26745)
KN4CK3R [Mon, 15 Jan 2024 08:49:24 +0000 (09:49 +0100)]
Rework markup link rendering (#26745)

Fixes #26548

This PR refactors the rendering of markup links. The old code uses
`strings.Replace` to change some urls while the new code uses more
context to decide which link should be generated.

The added tests should ensure the same output for the old and new
behaviour (besides the bug).

We may need to refactor the rendering a bit more to make it clear how
the different helper methods render the input string. There are lots of
options (resolve links / images / mentions / git hashes / emojis / ...)
but you don't really know what helper uses which options. For example,
we currently support images in the user description which should not be
allowed I think:

<details>
  <summary>Profile</summary>

https://try.gitea.io/KN4CK3R

![grafik](https://github.com/go-gitea/gitea/assets/1666336/109ae422-496d-4200-b52e-b3a528f553e5)

</details>

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
9 months agoFix nil pointer panic when exec some gitea cli command (#28791)
yp05327 [Mon, 15 Jan 2024 07:43:53 +0000 (16:43 +0900)]
Fix nil pointer panic when exec some gitea cli command (#28791)

panic:

![image](https://github.com/go-gitea/gitea/assets/18380374/7fcde2ad-1d42-4b60-b120-3b60a8926e8e)

After:

![image](https://github.com/go-gitea/gitea/assets/18380374/49d9f0ca-e590-4a35-8ca2-1317d1b7c939)

9 months agoAdd branch protection setting for ignoring stale approvals (#28498)
Jimmy Praet [Mon, 15 Jan 2024 07:20:01 +0000 (08:20 +0100)]
Add branch protection setting for ignoring stale approvals (#28498)

Fixes #27114.

* In Gitea 1.12 (#9532), a "dismiss stale approvals" branch protection
setting was introduced, for ignoring stale reviews when verifying the
approval count of a pull request.
* In Gitea 1.14 (#12674), the "dismiss review" feature was added.
* This caused confusion with users (#25858), as "dismiss" now means 2
different things.
* In Gitea 1.20 (#25882), the behavior of the "dismiss stale approvals"
branch protection was modified to actually dismiss the stale review.

For some users this new behavior of dismissing the stale reviews is not
desirable.

So this PR reintroduces the old behavior as a new "ignore stale
approvals" branch protection setting.

---------

Co-authored-by: delvh <dev.lh@web.de>
9 months agoForbid removing the last admin user (#28337)
yp05327 [Mon, 15 Jan 2024 06:51:43 +0000 (15:51 +0900)]
Forbid removing the last admin user (#28337)

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
9 months agoFix when private user following user, private user will not be counted in his own...
yp05327 [Mon, 15 Jan 2024 05:43:14 +0000 (14:43 +0900)]
Fix when private user following user, private user will not be counted in his own view (#28037)

Doer: asdasasdasasdasasdasasdasasdasasdasasdas (private user)
Followed: TestUser (public user)

Before:
(From doer's view)

![image](https://github.com/go-gitea/gitea/assets/18380374/9ba16b3b-068c-43c5-a3dd-e3343b5b32f2)
(From followed user's view, can see doer)

![image](https://github.com/go-gitea/gitea/assets/18380374/dfd1b564-d689-4393-b3d3-1e6bf52c94ba)

After:
(From doer's view)

![image](https://github.com/go-gitea/gitea/assets/18380374/1c85c1d1-c9f7-40c8-948c-145f7cae9a04)

9 months agoUpdate github.com/cloudflare/circl (#28789)
Chongyi Zheng [Mon, 15 Jan 2024 03:14:26 +0000 (11:14 +0800)]
Update github.com/cloudflare/circl (#28789)

cloudflare/circl: https://github.com/advisories/GHSA-9763-4f94-gfch

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
9 months agoMove more functions to db.Find (#28419)
Lunny Xiao [Mon, 15 Jan 2024 02:19:25 +0000 (10:19 +0800)]
Move more functions to db.Find (#28419)

Following #28220

This PR move more functions to use `db.Find`.

---------

Co-authored-by: delvh <dev.lh@web.de>
9 months agoAdd non-JS fallback for reaction tooltips (#28785)
Gwyneth Morgan [Mon, 15 Jan 2024 01:42:59 +0000 (17:42 -0800)]
Add non-JS fallback for reaction tooltips (#28785)

When JavaScript is not loaded, fall back to displaying reaction tooltips
with the default browser `title` attribute. An element with a present
but empty `data-tooltip-content` will use the `title` attribute for its
tippy.js tooltip content, so when JavaScript is enabled, this functions
the same as the current behavior.

9 months agoModernize merge button (#28140)
Earl Warren [Sun, 14 Jan 2024 22:00:47 +0000 (23:00 +0100)]
Modernize merge button (#28140)

- Make use of the `form-fetch-action` for the merge button, which will
automatically prevent the action from happening multiple times and show
a nice loading indicator as user feedback while the merge request is
being processed by the server.
- Adjust the merge PR code to JSON response as this is required for the
`form-fetch-action` functionality.
- Resolves https://codeberg.org/forgejo/forgejo/issues/774
- Likely resolves the cause of
https://codeberg.org/forgejo/forgejo/issues/1688#issuecomment-1313044

(cherry picked from commit 4ec64c19507caefff7ddaad722b1b5792b97cc5a)

Co-authored-by: Gusted <postmaster@gusted.xyz>
9 months agoWarn that `DISABLE_QUERY_AUTH_TOKEN` is false only if it's explicitly defined (#28783)
Yarden Shoham [Sun, 14 Jan 2024 20:20:18 +0000 (22:20 +0200)]
Warn that `DISABLE_QUERY_AUTH_TOKEN` is false only if it's explicitly defined (#28783)

So we don't warn on default behavior

- Fixes https://github.com/go-gitea/gitea/issues/28758
- Follows https://github.com/go-gitea/gitea/pull/28390

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
9 months agoSpeed up loading the dashboard on mysql/mariadb (#28546)
Lunny Xiao [Sun, 14 Jan 2024 14:34:25 +0000 (22:34 +0800)]
Speed up loading the dashboard on mysql/mariadb (#28546)

Fixes #28155

9 months agoFix schedule tasks bugs (#28691)
Lunny Xiao [Fri, 12 Jan 2024 21:50:38 +0000 (05:50 +0800)]
Fix schedule tasks bugs (#28691)

Fix #28157

This PR fix the possible bugs about actions schedule.

## The Changes

- Move `UpdateRepositoryUnit` and `SetRepoDefaultBranch` from models to
service layer
- Remove schedules plan from database and cancel waiting & running
schedules tasks in this repository when actions unit has been disabled
or global disabled.
- Remove schedules plan from database and cancel waiting & running
schedules tasks in this repository when default branch changed.

9 months agoAdd tests for #28765 (#28773)
Jack Hay [Fri, 12 Jan 2024 17:15:42 +0000 (12:15 -0500)]
Add tests for #28765 (#28773)

Adds tests to cover changes made in #28765

9 months agoFix issue dependencies (#27736)
Nanguan Lin [Fri, 12 Jan 2024 16:49:02 +0000 (00:49 +0800)]
Fix issue dependencies (#27736)

Fix #27722
Fix #27357
Fix #25837
1. Fix the typo `BlockingByDependenciesNotPermitted`, which causes the
`not permitted message` not to show. The correct one is `Blocking` or
`BlockedBy`
2. Rewrite the perm check. The perm check uses a very tricky way to
avoid duplicate checks for a slice of issues, which is confusing. In
fact, it's also the reason causing the bug. It uses `lastRepoID` and
`lastPerm` to avoid duplicate checks, but forgets to assign the
`lastPerm` at the end of the code block. So I rewrote this to avoid this
trick.
![I U1AT{GNFY3
1HZ`6L{(2L](https://github.com/go-gitea/gitea/assets/70063547/79acd02a-a567-4316-ae0d-11c6461becf1)
3. It also reuses the `blocks` slice, which is even more confusing. So I
rewrote this too.

![UARFPXRGGZQFB7J$2`R}5_R](https://github.com/go-gitea/gitea/assets/70063547/f21cff0f-d9ac-4ce4-ae4d-adffc98ecd99)

9 months agoAssign pull request to project during creation (#28227)
Denys Konovalov [Fri, 12 Jan 2024 15:25:15 +0000 (16:25 +0100)]
Assign pull request to project during creation (#28227)

When creating a pull request, allow directly assigning it to a project,
as it is already possible for issues.

After:

![grafik](https://github.com/go-gitea/gitea/assets/47871822/01dc2b3d-d56a-4053-b2fc-138725d7633a)

9 months agoFix button size in "attached header right" (#28770)
wxiaoguang [Fri, 12 Jan 2024 14:43:40 +0000 (22:43 +0800)]
Fix button size in "attached header right" (#28770)

Before:

<details>

![image](https://github.com/go-gitea/gitea/assets/2114189/c82f8615-04d4-408f-95bf-689c227a8814)

![image](https://github.com/go-gitea/gitea/assets/2114189/d01d05a7-09ca-48f3-a0e7-fec48119b426)

</details>

After:

![image](https://github.com/go-gitea/gitea/assets/2114189/e560398e-2fa4-4f46-9229-f6acc70e32ab)

![image](https://github.com/go-gitea/gitea/assets/2114189/bd18961d-0636-4584-b893-c465daaf40af)

9 months agoImprove CSS helper naming (#28769)
wxiaoguang [Fri, 12 Jan 2024 12:28:01 +0000 (20:28 +0800)]
Improve CSS helper naming (#28769)

* `gt-w-100` => `gt-w-full` to match tailwind
* clarify `gt-hidden` priority

9 months agoRevamp repo header (#27760)
Denys Konovalov [Fri, 12 Jan 2024 03:44:06 +0000 (04:44 +0100)]
Revamp repo header (#27760)

Redesign repo header with following new aspects:
- responsive & better-looking repo title
- hide repo button text instead of icons in mobile view
- use same tab style as on explore and org page

<details>
<summary>Before:</summary>

![grafik](https://github.com/go-gitea/gitea/assets/47871822/57360b77-d43c-49ac-b798-2363c03da7ec)

![grafik](https://github.com/go-gitea/gitea/assets/47871822/d4117f79-a5f5-4f36-bf65-bbada3e7e73b)

![grafik](https://github.com/go-gitea/gitea/assets/47871822/e26f967f-e264-4337-9925-3d942e04fd6d)

![grafik](https://github.com/go-gitea/gitea/assets/47871822/b4683c8d-9c6a-4089-afa7-8dd219e43a46)

</details>

<details>
<summary>After:</summary>

![grafik](https://github.com/go-gitea/gitea/assets/47871822/8ddbc9f6-53c7-4e4e-bea9-704fd93524ca)

![grafik](https://github.com/go-gitea/gitea/assets/47871822/c0588aa9-788d-469c-98a0-81484fbd220c)

![grafik](https://github.com/go-gitea/gitea/assets/47871822/206e931e-404d-4d1b-92ce-908698addfcc)

![grafik](https://github.com/go-gitea/gitea/assets/47871822/a508f9c8-fadc-4a85-94ba-18796f77e07b)

9 months agoSupport for grouping RPMs using paths (#26984)
Exploding Dragon [Fri, 12 Jan 2024 03:16:05 +0000 (11:16 +0800)]
Support for grouping RPMs using paths (#26984)

The current rpm repository places all packages in the same repository,
and different systems (el7,f34) may hit packages that do not belong to
this distribution ( #25304 ) , which now supports grouping of rpm.

![图片](https://github.com/go-gitea/gitea/assets/33776693/d1e1d99f-7799-4b2b-a19b-cb2a5c692914)

Fixes #25304 .
Fixes #27056 .

Refactor: [#25866](https://github.com/go-gitea/gitea/pull/25866)

9 months agoRequire token for GET subscription endpoint (#28765)
Jack Hay [Fri, 12 Jan 2024 01:57:58 +0000 (20:57 -0500)]
Require token for GET subscription endpoint (#28765)

Fixes  #28756

## Changes
- Require and check API token for `GET
/repos/{owner}/{repo}/subscription` in order to populate `ctx.Doer`.

9 months agoFix `convert.ToTeams` on empty input (#28426)
KN4CK3R [Thu, 11 Jan 2024 22:12:08 +0000 (23:12 +0100)]
Fix `convert.ToTeams` on empty input (#28426)

Fixes #28420

Don't return `nil` if the input was empty.

9 months agoShow description as tooltip instead of title for labels (#28754)
delvh [Thu, 11 Jan 2024 16:21:52 +0000 (17:21 +0100)]
Show description as tooltip instead of title for labels (#28754)

Follow GitHubs behavior of showing the label description as a tooltip
instead of the browser native title.

## Before

![grafik](https://github.com/go-gitea/gitea/assets/51889757/70448327-467b-4bee-b799-40a442a5ce16)

## After

![grafik](https://github.com/go-gitea/gitea/assets/51889757/abe7d700-148b-4cef-a487-6b0f8f20b212)

9 months agoIntegration Test for Commit Search containing Square Brackets (#28751)
Mihir Joshi [Thu, 11 Jan 2024 03:04:45 +0000 (08:34 +0530)]
Integration Test for Commit Search containing Square Brackets (#28751)

Integration test for #28744

Change keywords commit search flag from `-F` to `--fixed-strings` for
readability

9 months agoHide code related setting options in repository when code unit is disabled (#28631)
Lunny Xiao [Wed, 10 Jan 2024 11:55:59 +0000 (19:55 +0800)]
Hide code related setting options in repository when code unit is disabled (#28631)

Since #20805, code can be hidden.
However, the related settings are still shown even though they don't
have any meaning then.

https://github.com/go-gitea/gitea/assets/81045/5fdee54d-ac81-418a-82f7-eadff048cedd

9 months agoAdd -F to commit search to treat keywords as strings (#28744)
Mihir Joshi [Wed, 10 Jan 2024 11:28:20 +0000 (16:58 +0530)]
Add -F to commit search to treat keywords as strings (#28744)

Fixes #28269

The [default
behavior](https://git-scm.com/docs/git-log#Documentation/git-log.txt---basic-regexp)
of --grep in git log is to interpret the keyword as a regular
expression. This causes the search to fail in the cases where the search
keyword contains a `[`, since `[` is a special character used in grep.

If we want our keywords to be interpreted as 'strings', we should use
[-F
flag](https://git-scm.com/docs/git-log#Documentation/git-log.txt---basic-regexp).

9 months agoRecommend/convert to use case-sensitive collation for MySQL/MSSQL (#28662)
wxiaoguang [Wed, 10 Jan 2024 11:03:23 +0000 (19:03 +0800)]
Recommend/convert to use case-sensitive collation for MySQL/MSSQL (#28662)

Mainly for MySQL/MSSQL.

It is important for Gitea to use case-sensitive database charset
collation. If the database is using a case-insensitive collation, Gitea
will show startup error/warning messages, and show the errors/warnings
on the admin panel's Self-Check page.

Make `gitea doctor convert` work for MySQL to convert the collations of
database & tables & columns.

* Fix #28131

## :warning: BREAKING :warning:

It is not quite breaking, but it's highly recommended to convert the
database&table&column to a consistent and case-sensitive collation.

9 months agoAdd download attribute to release attachments (#28739)
JakobDev [Tue, 9 Jan 2024 08:51:20 +0000 (09:51 +0100)]
Add download attribute to release attachments (#28739)

Fixes #28736

9 months agoConcatenate error in `checkIfPRContentChanged` (#28731)
Earl Warren [Tue, 9 Jan 2024 02:32:14 +0000 (03:32 +0100)]
Concatenate error in `checkIfPRContentChanged` (#28731)

- If there's a error with the Git command in `checkIfPRContentChanged`
the stderr wasn't concatendated to the error, which results in still not
knowing why an error happend.
- Adds concatenation for stderr to the returned error.
- Ref: https://codeberg.org/forgejo/forgejo/issues/2077

Co-authored-by: Gusted <postmaster@gusted.xyz>
9 months ago[skip ci] Updated licenses and gitignores
GiteaBot [Mon, 8 Jan 2024 00:26:06 +0000 (00:26 +0000)]
[skip ci] Updated licenses and gitignores

9 months agoMove the captcha script loader to the template which really needs it (#28718)
wxiaoguang [Sun, 7 Jan 2024 15:41:46 +0000 (23:41 +0800)]
Move the captcha script loader to the template which really needs it (#28718)

It improves the maintainability for the templates.

Now `base/footer.tmpl` doesn't need to depend on "captcha" feature.

9 months agoSuggest to use Type=simple for systemd service (#28717)
wxiaoguang [Sun, 7 Jan 2024 15:18:04 +0000 (23:18 +0800)]
Suggest to use Type=simple for systemd service (#28717)

Although the systemd notify support was added, it seems that there are
some problems (#28553, for the "non-installed" instance)

9 months agoFix incorrect URL for "Reference in New Issue" (#28716)
wxiaoguang [Sun, 7 Jan 2024 10:50:03 +0000 (18:50 +0800)]
Fix incorrect URL for "Reference in New Issue" (#28716)

Gitea prefers to use relative URLs in code (to make multiple domain work
for some users)

So it needs to use `toAbsoluteUrl` to generate a full URL when click
"Reference in New Issues"

And add some comments in the test code

9 months agoAvoid unnecessary 500 panic when a commit doesn't exist (#28719)
wxiaoguang [Sun, 7 Jan 2024 10:20:22 +0000 (18:20 +0800)]
Avoid unnecessary 500 panic when a commit doesn't exist (#28719)

In #26851, it assumed that `Commit` always exists when
`PageIsDiff==true`.

But for a 404 page, the `Commit` doesn't exist, so the following code
would cause panic because nil value can't be passed as string parameter
to `IsMultilineCommitMessage(string)` (or the StringUtils.Cut in later
PRs)

9 months ago[skip ci] Updated translations via Crowdin
GiteaBot [Sun, 7 Jan 2024 00:27:22 +0000 (00:27 +0000)]
[skip ci] Updated translations via Crowdin

9 months agoImprove frontend guideline (#28711)
wxiaoguang [Sat, 6 Jan 2024 17:14:10 +0000 (01:14 +0800)]
Improve frontend guideline (#28711)

It has been a consensus for long time during reviewing: "avoiding inline
styles as much as possible".

9 months agoFix panic when parsing empty pgsql host (#28708)
wxiaoguang [Sat, 6 Jan 2024 09:30:03 +0000 (17:30 +0800)]
Fix panic when parsing empty pgsql host (#28708)

Regression of #27723
Fix #28705

9 months agoAdd merge arrow direction and update styling (#28523)
Kyle D [Fri, 5 Jan 2024 17:38:56 +0000 (09:38 -0800)]
Add merge arrow direction and update styling (#28523)

Close https://github.com/go-gitea/gitea/issues/28522

~Adds some [negative
margin](https://tailwindcss.com/docs/margin#using-negative-values)
helper css classes using tailwind's [prefix
syntax](https://tailwindcss.com/docs/configuration#prefix)~

### Before

![image](https://github.com/go-gitea/gitea/assets/12700993/5bdabf91-facd-41c8-8e36-e1535beb9409)

### After

![image](https://github.com/go-gitea/gitea/assets/12700993/a6f11f6f-9e64-45b6-b9d7-dfea53fbc6d7)

9 months agoAdd links to owner home page in explore (#28341)
yp05327 [Fri, 5 Jan 2024 03:34:35 +0000 (11:34 +0800)]
Add links to owner home page in explore (#28341)

User can select access repo or owner's home page.

Before:

![image](https://github.com/go-gitea/gitea/assets/18380374/f40a833f-8560-4585-b047-3a225be2e6ee)

After:

![image](https://github.com/go-gitea/gitea/assets/18380374/7893bf3a-5050-4bcb-af99-d56d6c7925f8)

9 months agoApply min-height in wiki only on preview pane (#28687)
Earl Warren [Thu, 4 Jan 2024 02:48:55 +0000 (03:48 +0100)]
Apply min-height in wiki only on preview pane (#28687)

In the commit 5a56f9699c (3.) the min-height was applied to all wiki
elements. This resulted in huge blank spaces when viewing the wiki.

This fixes this by only applying the min-height to the preview when
editing.

Refs: https://codeberg.org/forgejo/forgejo/pulls/2080

(cherry picked from commit 8f0baefe5dadc929fe7456c36c8b205e96f228f0)

Co-authored-by: Fl1tzi <git@fl1tzi.com>
9 months agoNormalize oauth email username (#28561)
Kyle D [Thu, 4 Jan 2024 00:48:20 +0000 (16:48 -0800)]
Normalize oauth email username (#28561)

9 months agoFix wrapping of label list (#28684)
Denys Konovalov [Wed, 3 Jan 2024 12:33:55 +0000 (13:33 +0100)]
Fix wrapping of label list (#28684)

The label list needs to wrap the items to avoid unnecessary overflow / incorrect text wrapping.

9 months agoFix grammar in `actions.variables.id_not_exist` (en-US) (#28680)
wackbyte [Wed, 3 Jan 2024 10:43:38 +0000 (05:43 -0500)]
Fix grammar in `actions.variables.id_not_exist` (en-US) (#28680)

Fixes the capitalization and grammar of the key.

9 months agoFix grammar issues on the repository Actions page (en-US) (#28679)
wackbyte [Wed, 3 Jan 2024 10:42:56 +0000 (05:42 -0500)]
Fix grammar issues on the repository Actions page (en-US) (#28679)

Fixes a few grammar issues in the en-US localization of the repository
Actions page.

9 months agoFix tooltip of variable edit button (#28681)
wackbyte [Wed, 3 Jan 2024 06:25:19 +0000 (01:25 -0500)]
Fix tooltip of variable edit button (#28681)

The `variables.edit` key does not exist.

![image](https://github.com/go-gitea/gitea/assets/29505620/462a1c6c-775c-466a-8398-37115b2af47a)