]> source.dussan.org Git - gitea.git/log
gitea.git
2 months agoFix: database not update release when using `git push --tags --force` (#32040)
Exploding Dragon [Wed, 18 Sep 2024 20:15:03 +0000 (04:15 +0800)]
Fix: database not update release when using `git push --tags --force` (#32040)

link: https://codeberg.org/forgejo/forgejo/issues/4274
---------

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2 months agoResolve duplicate local string key related to PR comments (#32073)
Kemal Zebari [Wed, 18 Sep 2024 19:46:41 +0000 (12:46 -0700)]
Resolve duplicate local string key related to PR comments (#32073)

A regression in #31924 caused there to be two `issues.review.comment`
keys in the English language locale file, leading to a problem when
reading PR review histories that contain comments.

This snapshot addresses this by making the newer key unique.

2 months agoRefactor CSRF protector (#32057)
wxiaoguang [Wed, 18 Sep 2024 07:17:25 +0000 (15:17 +0800)]
Refactor CSRF protector (#32057)

Remove unused CSRF options, decouple "new csrf protector" and "prepare"
logic, do not redirect to home page if CSRF validation falis (it
shouldn't happen in daily usage, if it happens, redirecting to home
doesn't help either but just makes the problem more complex for "fetch")

2 months agoAdd missing comment reply handling (#32050)
KN4CK3R [Tue, 17 Sep 2024 20:56:26 +0000 (22:56 +0200)]
Add missing comment reply handling (#32050)

Fixes #31937

- Add missing comment reply handling
- Use `onGiteaRun` in the test because the fixtures are not present
otherwise (did this behaviour change?)

Compare without whitespaces.

2 months agoFix CI (#32062)
Lunny Xiao [Tue, 17 Sep 2024 19:35:59 +0000 (03:35 +0800)]
Fix CI (#32062)

2 months agoLazy load avatar images (#32051)
hiifong [Tue, 17 Sep 2024 19:02:48 +0000 (03:02 +0800)]
Lazy load avatar images (#32051)

2 months agoIncluded tag search capabilities (#32045)
Bruno Sofiato [Tue, 17 Sep 2024 18:33:11 +0000 (15:33 -0300)]
Included tag search capabilities (#32045)

Resolves #31998

The first screenshot shows the tag page without any filter being
applied:

![image](https://github.com/user-attachments/assets/eac0e51c-9e48-42b2-bb1c-a25896ca40cb)

The second one, shows the page when the given filter returns no tag:

![image](https://github.com/user-attachments/assets/98df191e-1a7b-4947-b0ef-4987a0293c3e)

The last one shows a single tag being filtered:

![image](https://github.com/user-attachments/assets/79c7e05e-8c86-4f06-b17e-15818b7b9291)

Signed-off-by: Bruno Sofiato <bruno.sofiato@gmail.com>
2 months agoDo not escape relative path in RPM primary index (#32038)
KN4CK3R [Mon, 16 Sep 2024 21:10:33 +0000 (23:10 +0200)]
Do not escape relative path in RPM primary index (#32038)

Fixes #32021

Do not escape the relative path.

2 months agofeat(#31666): Set the columns height to hug all its contents (#31726)
Simon Pistache [Mon, 16 Sep 2024 20:41:46 +0000 (22:41 +0200)]
feat(#31666): Set the columns height to hug all its contents (#31726)

In Projects, columns heights are defined by the sum of all contents
height of the biggest column, rather than a fraction of the viewport
height. It default to 60vh when there is no cards to display.

Fix #31666

2 months ago[skip ci] Updated translations via Crowdin
GiteaBot [Mon, 16 Sep 2024 00:31:40 +0000 (00:31 +0000)]
[skip ci] Updated translations via Crowdin

2 months ago[skip ci] Updated translations via Crowdin
GiteaBot [Sun, 15 Sep 2024 00:34:01 +0000 (00:34 +0000)]
[skip ci] Updated translations via Crowdin

2 months agoUse a common message template instead of a special one (#31878)
Lunny Xiao [Sat, 14 Sep 2024 17:17:49 +0000 (01:17 +0800)]
Use a common message template instead of a special one (#31878)

2 months agoCheck if the `due_date` is nil when editing issues (#32035)
Zettat123 [Sat, 14 Sep 2024 16:40:36 +0000 (00:40 +0800)]
Check if the `due_date` is nil when editing issues (#32035)

2 months agoHandle invalid target when creating releases using API (#31841)
Kemal Zebari [Thu, 12 Sep 2024 07:47:31 +0000 (00:47 -0700)]
Handle invalid target when creating releases using API (#31841)

A 500 status code was thrown when passing a non-existent target to the
create release API. This snapshot handles this error and instead throws
a 404 status code.

Discovered while working on #31840.

2 months agoAdd option to filter board cards by labels and assignees (#31999)
Lauris BH [Thu, 12 Sep 2024 03:53:40 +0000 (06:53 +0300)]
Add option to filter board cards by labels and assignees (#31999)

Works in both organization and repository project boards

Fixes #21846

Replaces #21963
Replaces #27117

![image](https://github.com/user-attachments/assets/1837ace8-3de2-444f-a153-e166bd0da2c0)

**Note** that implementation was made intentionally to work same as in
issue list so that URL can be bookmarked for quick access with
predefined filters in URL

2 months ago[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 12 Sep 2024 00:30:02 +0000 (00:30 +0000)]
[skip ci] Updated translations via Crowdin

2 months ago Failed authentications are logged to level Warning (#32016)
Daniel [Wed, 11 Sep 2024 17:58:45 +0000 (19:58 +0200)]
 Failed authentications are logged to level Warning (#32016)

PR for issue #31968
Replaces PR #31983 to comply with gitea's error definition

Failed authentications are now logged to level `Warning` instead of
`Info`.

2 months agoFix `/repos/{owner}/{repo}/pulls/{index}/files` endpoint not populating `previous_fil...
charles-plutohealth [Wed, 11 Sep 2024 17:29:27 +0000 (13:29 -0400)]
Fix `/repos/{owner}/{repo}/pulls/{index}/files` endpoint not populating `previous_filename` (#32017)

---
`status == "rename"` should have read `status == "renamed"`. The typo
means that file.PreviousFilename would never be populated, which e.g.
breaks usage of the Github Action at
https://github.com/dorny/paths-filter.

2 months agoSupport allowed hosts for migrations to work with proxy (#32025)
Jason Song [Wed, 11 Sep 2024 05:47:00 +0000 (13:47 +0800)]
Support allowed hosts for migrations to work with proxy (#32025)

2 months agoSupport migration from AWS CodeCommit (#31981)
Zettat123 [Tue, 10 Sep 2024 23:49:42 +0000 (07:49 +0800)]
Support migration from AWS CodeCommit (#31981)

This PR adds support for migrating repos from [AWS
CodeCommit](https://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html).

The access key ID and secret access key are required to get repository
information and pull requests. And [HTTPS Git
credentials](https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-gc.html)
are required to clone the repository.

<img
src="https://github.com/user-attachments/assets/82ecb2d0-8d43-42b0-b5af-f5347a13b9d0"
width="680" />

The AWS CodeCommit icon is from [AWS Architecture
Icons](https://aws.amazon.com/architecture/icons/).

<img
src="https://github.com/user-attachments/assets/3c44d21f-d753-40f5-9eae-5d3589e0d50d"
width="320" />

2 months agobump to go 1.23 (#31855)
techknowlogick [Tue, 10 Sep 2024 02:23:07 +0000 (22:23 -0400)]
bump to go 1.23 (#31855)

2 months agoEnable compression for Actions logs by default (#32013)
Jason Song [Mon, 9 Sep 2024 21:34:42 +0000 (05:34 +0800)]
Enable compression for Actions logs by default (#32013)

Close #31801. Follow #31761.

Since there are so many benefits of compression and there are no reports
of related issues after weeks, it should be fine to enable compression
by default.

2 months agoSave initial signup information for users to aid in spam prevention (#31852)
techknowlogick [Mon, 9 Sep 2024 21:05:16 +0000 (17:05 -0400)]
Save initial signup information for users to aid in spam prevention (#31852)

This will allow instance admins to view signup pattern patterns for
public instances. It is modelled after discourse, mastodon, and
MediaWiki's approaches.

Note: This has privacy implications, but as the above-stated open-source
projects take this approach, especially MediaWiki, which I have no doubt
looked into this thoroughly, it is likely okay for us, too. However, I
would be appreciative of any feedback on how this could be improved.

---------

Co-authored-by: Giteabot <teabot@gitea.io>
2 months agoIncrease `cacheContextLifetime` to reduce false reports (#32011)
Jason Song [Mon, 9 Sep 2024 04:51:25 +0000 (12:51 +0800)]
Increase `cacheContextLifetime` to reduce false reports (#32011)

Replace #32001.

To prevent the context cache from being misused for long-term work
(which would result in using invalid cache without awareness), the
context cache is designed to exist for a maximum of 10 seconds. This
leads to many false reports, especially in the case of slow SQL.

This PR increases it to 5 minutes to reduce false reports.

5 minutes is not a very safe value, as a lot of changes may have
occurred within that time frame. However, as far as I know, there has
not been a case of misuse of context cache discovered so far, so I think
5 minutes should be OK.

Please note that after this PR, if warning logs are found again, it
should get attention, at that time it can be almost 100% certain that it
is a misuse.

2 months ago[skip ci] Updated licenses and gitignores
GiteaBot [Mon, 9 Sep 2024 00:31:04 +0000 (00:31 +0000)]
[skip ci] Updated licenses and gitignores

2 months ago[skip ci] Updated translations via Crowdin
GiteaBot [Sun, 8 Sep 2024 00:32:28 +0000 (00:32 +0000)]
[skip ci] Updated translations via Crowdin

2 months agoRemove SHA1 for support for ssh rsa signing (#31857)
Wim [Sat, 7 Sep 2024 22:05:18 +0000 (00:05 +0200)]
Remove SHA1 for support for ssh rsa signing (#31857)

https://github.com/go-fed/httpsig seems to be unmaintained.

Switch to github.com/42wim/httpsig which has removed deprecated crypto
and default sha256 signing for ssh rsa.

No impact for those that use ed25519 ssh certificates.

This is a breaking change for:
- gitea.com/gitea/tea (go-sdk) - I'll be sending a PR there too
- activitypub using deprecated crypto (is this actually used?)

2 months agoUpgrade cache to v0.2.1 (#32003)
Lunny Xiao [Sat, 7 Sep 2024 17:12:37 +0000 (01:12 +0800)]
Upgrade cache to v0.2.1 (#32003)

Fix #31757

2 months agoAdd automatic light/dark option for the colorblind theme (#31997)
Luca Söthe [Sat, 7 Sep 2024 03:09:40 +0000 (05:09 +0200)]
Add automatic light/dark option for the colorblind theme (#31997)

The normal themes already have a variant which automatically chooses
light/dark mode based on the browser.
This PR adds the same variant, but for the colorblind themes.

2 months ago[skip ci] Updated translations via Crowdin
GiteaBot [Sat, 7 Sep 2024 00:29:09 +0000 (00:29 +0000)]
[skip ci] Updated translations via Crowdin

2 months agoUse global lock instead of NewExclusivePool to allow distributed lock between multipl...
Lunny Xiao [Fri, 6 Sep 2024 10:12:41 +0000 (18:12 +0800)]
Use global lock instead of NewExclusivePool to allow distributed lock between multiple Gitea instances (#31813)

Replace #26486
Fix #19620

---------

Co-authored-by: Jason Song <i@wolfogre.com>
2 months agoUse forum.gitea.com instead of old URL (#31989)
Lunny Xiao [Fri, 6 Sep 2024 07:20:30 +0000 (15:20 +0800)]
Use forum.gitea.com instead of old URL (#31989)

2 months agoDistinguish official vs non-official reviews, add tool tips, and upgr… (#31924)
william-allspice [Fri, 6 Sep 2024 06:40:02 +0000 (01:40 -0500)]
Distinguish official vs non-official reviews, add tool tips, and upgr… (#31924)

This Pull Request is a follow up to
https://github.com/go-gitea/gitea/pull/31886:

1. Adds a UI indicator between official (green) and unofficial (grey)
approved pull requests on the Pull Request page (as suggested by
@kdumontnu )
2. Adds tooltips adding clarity to the type and status of a review on
the Pull Request page (as suggested by @kdumontnu)
3. Updates text adding more clarity to required approvals (as suggested
by @kdumontnu)
4. Updates text on the branch settings page explaining what branch
approval limitations (as suggested by @yp05327)

Official approval:
<img width="376" alt="Screenshot 2024-08-26 at 1 03 52 PM"
src="https://github.com/user-attachments/assets/500f083d-bfc0-45c5-82b7-b98e20495696">

Unofficial approval:
<img width="442" alt="Screenshot 2024-08-26 at 12 53 15 PM"
src="https://github.com/user-attachments/assets/e8c565ff-5886-4ce1-8b79-a0fa26c282f7">

Rejected approval:
<img width="452" alt="Screenshot 2024-08-26 at 12 53 06 PM"
src="https://github.com/user-attachments/assets/aebc0e2f-7052-4dea-8098-7caa0db86617">

Stale approval:
<img width="546" alt="Screenshot 2024-08-26 at 1 07 59 PM"
src="https://github.com/user-attachments/assets/da599ff3-e35c-4fa3-8141-ed80b738dd77">

Requested review tooltip:
<img width="434" alt="Screenshot 2024-08-26 at 12 53 22 PM"
src="https://github.com/user-attachments/assets/460d163e-8724-43b6-8760-34b285da8fe2">

Updated text for approvals:
<img width="991" alt="Screenshot 2024-08-26 at 12 54 00 PM"
src="https://github.com/user-attachments/assets/ab3ff012-9742-4c1b-933d-21addcb89f2c">

Updated text for allowlisted/whitelisted approvals:
<img width="990" alt="Screenshot 2024-08-26 at 1 01 40 PM"
src="https://github.com/user-attachments/assets/1a5bae61-d9e0-4d96-b86f-92610b0940d1">

Protected branch settings text:
<img width="1022" alt="Screenshot 2024-08-26 at 1 01 14 PM"
src="https://github.com/user-attachments/assets/892ce208-e1c2-41f7-8fec-46d5a0e7e776">

Comments list:
<img width="1048" alt="Screenshot 2024-08-28 at 9 25 31 AM"
src="https://github.com/user-attachments/assets/9c5c00c5-06cf-43b3-b413-4f7f673609b2">

---------

Co-authored-by: Kyle D. <kdumontnu@gmail.com>
2 months agoReturn 404 instead of error when commit not exist (#31977)
Adam Majer [Thu, 5 Sep 2024 18:39:23 +0000 (20:39 +0200)]
Return 404 instead of error when commit not exist (#31977)

Fix #31976

2 months agoFor consistency make repo search sort options case sensitive (#31951)
6543 [Thu, 5 Sep 2024 10:53:30 +0000 (12:53 +0200)]
For consistency make repo search sort options case sensitive (#31951)

2 months agoFix nuget/conan/container packages upload bugs (#31967)
Lunny Xiao [Thu, 5 Sep 2024 07:05:42 +0000 (15:05 +0800)]
Fix nuget/conan/container packages upload bugs (#31967)

2 months ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 4 Sep 2024 06:28:39 +0000 (06:28 +0000)]
[skip ci] Updated translations via Crowdin

2 months ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 4 Sep 2024 05:30:04 +0000 (05:30 +0000)]
[skip ci] Updated translations via Crowdin

2 months agoRemove html tags from create tag and branch translation (#31973)
Lunny Xiao [Wed, 4 Sep 2024 04:53:55 +0000 (12:53 +0800)]
Remove html tags from create tag and branch translation (#31973)

Follow #31950 and Fix the display bug of #31966 .

This will only fix the English version. I will update all these
translation files in crowdin after this merged so that all the languages
can be fixed.

And all these files should be backported together.

This PR remove the bold effect around the name when creating a new tag
or branch.

2 months agoReplace v-html with v-text in search inputbox (#31966)
Lunny Xiao [Wed, 4 Sep 2024 02:52:00 +0000 (10:52 +0800)]
Replace v-html with v-text in search inputbox (#31966)

Credit for @techknowlogick

Co-authored-by: techknowlogick <techknowlogick@noreply.gitea.com>
2 months ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 4 Sep 2024 00:29:09 +0000 (00:29 +0000)]
[skip ci] Updated translations via Crowdin

2 months ago[skip ci] Updated translations via Crowdin
GiteaBot [Tue, 3 Sep 2024 00:29:33 +0000 (00:29 +0000)]
[skip ci] Updated translations via Crowdin

2 months agoImprove get feed with pagination (#31821)
Lunny Xiao [Mon, 2 Sep 2024 19:05:09 +0000 (03:05 +0800)]
Improve get feed with pagination (#31821)

Fix #31752

@somera

---------

Co-authored-by: delvh <dev.lh@web.de>
2 months agoRemove urls from translations (#31950)
Denys Konovalov [Mon, 2 Sep 2024 18:36:24 +0000 (20:36 +0200)]
Remove urls from translations (#31950)

Part of #27700

Removes all URLs from translation strings to easy up changing them in
the future and to exclude people injecting malicious URLs through
translations. First measure as long as #24402 is out of scope.

2 months agoPrevent update pull refs manually and will not affect other refs update (#31931)
Lunny Xiao [Mon, 2 Sep 2024 07:38:27 +0000 (15:38 +0800)]
Prevent update pull refs manually and will not affect other refs update (#31931)

All refs under `refs/pull` should only be changed from Gitea inside but
not by pushing from outside of Gitea.
This PR will prevent the pull refs update but allow other refs to be
updated on the same pushing with `--mirror` operations.

The main changes are to add checks on `update` hook but not
`pre-receive` because `update` will be invoked by every ref but
`pre-receive` will revert all changes once one ref update fails.

2 months ago[skip ci] Updated translations via Crowdin
GiteaBot [Mon, 2 Sep 2024 00:30:20 +0000 (00:30 +0000)]
[skip ci] Updated translations via Crowdin

2 months agonix wording nit in todo code comment
6543 [Sun, 1 Sep 2024 18:25:02 +0000 (20:25 +0200)]
nix wording nit in todo code comment

2 months agoFix 500 error when `state` params is set when editing issue/PR by API (#31880)
yp05327 [Sun, 1 Sep 2024 18:08:27 +0000 (03:08 +0900)]
Fix 500 error when `state` params is set when editing issue/PR by API (#31880)

A quick fix for #31871

2 months agoFix sort order for organization home and user profile page (#31921)
yp05327 [Sun, 1 Sep 2024 16:55:05 +0000 (01:55 +0900)]
Fix sort order for organization home and user profile page (#31921)

Fix #31916

In #30876, `sortOrder` has been changed into a map, but it is only
implemented in explore.
~~But it seems that size sort order has no effect from long long ago,~~
not directly caused by the PR above.

I think it is still caused by #29231.
In #29231, it merged the sort orders from
`templates/explore/repo_search.tmpl` and
`templates/admin/repo/search.tmpl`.
In `templates/admin/repo/search.tmpl`, it contains size sort orders, but
not in `templates/explore/repo_search.tmpl`, which is used in non-admin
pages.
So `order by size` is added from #29231, but the handler was not added.

---------

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2 months agoImprove textarea paste (#31948)
silverwind [Sun, 1 Sep 2024 15:15:29 +0000 (17:15 +0200)]
Improve textarea paste (#31948)

- When pasting a URL over another URL, replace the URL instead of
creating a useless `[url](url)`. This is the 1-line change
[here](https://github.com/go-gitea/gitea/pull/31948/files#diff-be8e94d7e3da33b187381f53d28095107bd0cf29ae9a9e997e4f422f4a54479cR122).
- Always run `initTextareaEvents`, previously it was not run when
`dropzoneEl` was not present like when attachements are disabled on the
server. Refactored the function to gracefully handle absent `dropzoneEl`
and rename the function to a better name.

2 months agoFix index too many file names bug (#31903)
Lunny Xiao [Sun, 1 Sep 2024 05:57:31 +0000 (13:57 +0800)]
Fix index too many file names bug (#31903)

Try to fix #31884
Fix #28584

2 months ago[skip ci] Updated translations via Crowdin
GiteaBot [Sun, 1 Sep 2024 00:35:09 +0000 (00:35 +0000)]
[skip ci] Updated translations via Crowdin

2 months agoMove web globals to `web_src/js/globals.d.ts` (#31943)
silverwind [Fri, 30 Aug 2024 07:36:53 +0000 (09:36 +0200)]
Move web globals to `web_src/js/globals.d.ts` (#31943)

This file serves exclusively to support `web_src/js`, so move it there.

2 months ago[skip ci] Updated translations via Crowdin
GiteaBot [Fri, 30 Aug 2024 00:29:03 +0000 (00:29 +0000)]
[skip ci] Updated translations via Crowdin

2 months agoUpdate JS and PY dependencies (#31940)
silverwind [Thu, 29 Aug 2024 14:51:51 +0000 (16:51 +0200)]
Update JS and PY dependencies (#31940)

- `stylelint` is excluded because of deprecation warnings added in
16.8.2, depending on
https://github.com/AndyOGo/stylelint-declaration-strict-value/issues/379
- `eslint-plugin-sonarjs@2` adds a lot of new rules, but I have not
gotten around to reviewing them yet, so rule config is unchanged.
- Fixes https://github.com/go-gitea/gitea/security/dependabot/70
- Tested code editor and contributor graph

2 months agoFix search team (#31923)
Lunny Xiao [Thu, 29 Aug 2024 13:26:25 +0000 (21:26 +0800)]
Fix search team (#31923)

Fix #20658

2 months agoUpgrade micromatch to 4.0.8 (#31939)
Lunny Xiao [Thu, 29 Aug 2024 04:54:38 +0000 (12:54 +0800)]
Upgrade micromatch to 4.0.8 (#31939)

2 months agoRefactor globallock (#31933)
Jason Song [Thu, 29 Aug 2024 03:48:21 +0000 (11:48 +0800)]
Refactor globallock (#31933)

Follow #31908. The main refactor is that it has removed the returned
context of `Lock`.

The returned context of `Lock` in old code is to provide a way to let
callers know that they have lost the lock. But in most cases, callers
shouldn't cancel what they are doing even it has lost the lock. And the
design would confuse developers and make them use it incorrectly.

See the discussion history:
https://github.com/go-gitea/gitea/pull/31813#discussion_r1732041513 and
https://github.com/go-gitea/gitea/pull/31813#discussion_r1734078998

It's a breaking change, but since the new module hasn't been used yet, I
think it's OK to not add the `pr/breaking` label.

## Design principles

It's almost copied from #31908, but with some changes.

### Use spinlock even in memory implementation (unchanged)

In actual use cases, users may cancel requests. `sync.Mutex` will block
the goroutine until the lock is acquired even if the request is
canceled. And the spinlock is more suitable for this scenario since it's
possible to give up the lock acquisition.

Although the spinlock consumes more CPU resources, I think it's
acceptable in most cases.

### Do not expose the mutex to callers (unchanged)

If we expose the mutex to callers, it's possible for callers to reuse
the mutex, which causes more complexity.

For example:
```go
lock := GetLocker(key)
lock.Lock()
// ...
// even if the lock is unlocked, we cannot GC the lock,
// since the caller may still use it again.
lock.Unlock()
lock.Lock()
// ...
lock.Unlock()

// callers have to GC the lock manually.
RemoveLocker(key)
```

That's why
https://github.com/go-gitea/gitea/pull/31813#discussion_r1721200549

In this PR, we only expose `ReleaseFunc` to callers. So callers just
need to call `ReleaseFunc` to release the lock, and do not need to care
about the lock's lifecycle.
```go
release, err := locker.Lock(ctx, key)
if err != nil {
    return err
}
// ...
release()

// if callers want to lock again, they have to re-acquire the lock.
release, err := locker.Lock(ctx, key)
// ...
```

In this way, it's also much easier for redis implementation to extend
the mutex automatically, so that callers do not need to care about the
lock's lifecycle. See also
https://github.com/go-gitea/gitea/pull/31813#discussion_r1722659743

### Use "release" instead of "unlock" (unchanged)

For "unlock", it has the meaning of "unlock an acquired lock". So it's
not acceptable to call "unlock" when failed to acquire the lock, or call
"unlock" multiple times. It causes more complexity for callers to decide
whether to call "unlock" or not.

So we use "release" instead of "unlock" to make it clear. Whether the
lock is acquired or not, callers can always call "release", and it's
also safe to call "release" multiple times.

But the code DO NOT expect callers to not call "release" after acquiring
the lock. If callers forget to call "release", it will cause resource
leak. That's why it's always safe to call "release" without extra
checks: to avoid callers to forget to call it.

### Acquired locks could be lost, but the callers shouldn't stop

Unlike `sync.Mutex` which will be locked forever once acquired until
calling `Unlock`, for distributed lock, the acquired lock could be lost.

For example, the caller has acquired the lock, and it holds the lock for
a long time since auto-extending is working for redis. However, it lost
the connection to the redis server, and it's impossible to extend the
lock anymore.

In #31908, it will cancel the context to make the operation stop, but
it's not safe. Many operations are not revert-able. If they have been
interrupted, then the instance goes corrupted. So `Lock` won't return
`ctx` anymore in this PR.

### Multiple ways to use the lock

1. Regular way

```go
release, err := Lock(ctx, key)
if err != nil {
    return err
}
defer release()
// ...
```

2. Early release

```go
release, err := Lock(ctx, key)
if err != nil {
    return err
}
defer release()
// ...
// release the lock earlier
release()
// continue to do something else
// ...
```

3. Functional way

```go
if err := LockAndDo(ctx, key, func(ctx context.Context) error {
    // ...
    return nil
}); err != nil {
    return err
}
```

2 months agoFix a number of Typescript issues (#31877)
silverwind [Wed, 28 Aug 2024 16:32:38 +0000 (18:32 +0200)]
Fix a number of Typescript issues (#31877)

Typescript error count is reduced from 633 to 540 with this. No runtime
changes except in test code.

2 months agoSplit org Propfile README to a new tab `overview` (#31373)
a1012112796 [Tue, 27 Aug 2024 02:54:12 +0000 (10:54 +0800)]
Split org Propfile README to a new tab `overview` (#31373)

like user profile, add a new overviw tab to show profile READEME when it
is exist.

replace #31349 (another solution option)

example view:
![屏幕截图 2024-06-14
094116](https://github.com/go-gitea/gitea/assets/25342410/3303a1f2-ae02-48e0-9519-7fa11e65657f)
![屏幕截图 2024-06-14
094101](https://github.com/go-gitea/gitea/assets/25342410/7a4a5a48-dc2b-4ad4-b2a2-9ea4ab5d5808)

---------

Signed-off-by: a1012112796 <1012112796@qq.com>
2 months ago[skip ci] Updated translations via Crowdin
GiteaBot [Tue, 27 Aug 2024 00:28:30 +0000 (00:28 +0000)]
[skip ci] Updated translations via Crowdin

2 months agoIntroduce globallock as distributed locks (#31908)
Jason Song [Mon, 26 Aug 2024 14:27:57 +0000 (22:27 +0800)]
Introduce globallock as distributed locks (#31908)

To help #31813, but do not replace it, since this PR just introduces the
new module but misses some work:

- New option in settings. `#31813` has done it.
- Use the locks in business logic. `#31813` has done it.

So I think the most efficient way is to merge this PR first (if it's
acceptable) and then finish #31813.

## Design principles

### Use spinlock even in memory implementation

In actual use cases, users may cancel requests. `sync.Mutex` will block
the goroutine until the lock is acquired even if the request is
canceled. And the spinlock is more suitable for this scenario since it's
possible to give up the lock acquisition.

Although the spinlock consumes more CPU resources, I think it's
acceptable in most cases.

### Do not expose the mutex to callers

If we expose the mutex to callers, it's possible for callers to reuse
the mutex, which causes more complexity.

For example:
```go
lock := GetLocker(key)
lock.Lock()
// ...
// even if the lock is unlocked, we cannot GC the lock,
// since the caller may still use it again.
lock.Unlock()
lock.Lock()
// ...
lock.Unlock()

// callers have to GC the lock manually.
RemoveLocker(key)
```

That's why
https://github.com/go-gitea/gitea/pull/31813#discussion_r1721200549

In this PR, we only expose `ReleaseFunc` to callers. So callers just
need to call `ReleaseFunc` to release the lock, and do not need to care
about the lock's lifecycle.
```go
_, release, err := locker.Lock(ctx, key)
if err != nil {
    return err
}
// ...
release()

// if callers want to lock again, they have to re-acquire the lock.
_, release, err := locker.Lock(ctx, key)
// ...
```

In this way, it's also much easier for redis implementation to extend
the mutex automatically, so that callers do not need to care about the
lock's lifecycle. See also
https://github.com/go-gitea/gitea/pull/31813#discussion_r1722659743

### Use "release" instead of "unlock"

For "unlock", it has the meaning of "unlock an acquired lock". So it's
not acceptable to call "unlock" when failed to acquire the lock, or call
"unlock" multiple times. It causes more complexity for callers to decide
whether to call "unlock" or not.

So we use "release" instead of "unlock" to make it clear. Whether the
lock is acquired or not, callers can always call "release", and it's
also safe to call "release" multiple times.

But the code DO NOT expect callers to not call "release" after acquiring
the lock. If callers forget to call "release", it will cause resource
leak. That's why it's always safe to call "release" without extra
checks: to avoid callers to forget to call it.

### Acquired locks could be lost

Unlike `sync.Mutex` which will be locked forever once acquired until
calling `Unlock`, in the new module, the acquired lock could be lost.

For example, the caller has acquired the lock, and it holds the lock for
a long time since auto-extending is working for redis. However, it lost
the connection to the redis server, and it's impossible to extend the
lock anymore.

If the caller don't stop what it's doing, another instance which can
connect to the redis server could acquire the lock, and do the same
thing, which could cause data inconsistency.

So the caller should know what happened, the solution is to return a new
context which will be canceled if the lock is lost or released:

```go
ctx, release, err := locker.Lock(ctx, key)
if err != nil {
    return err
}
defer release()
// ...
DoSomething(ctx)

// the lock is lost now, then ctx has been canceled.

// Failed, since ctx has been canceled.
DoSomethingElse(ctx)
```

### Multiple ways to use the lock

1. Regular way

```go
ctx, release, err := Lock(ctx, key)
if err != nil {
    return err
}
defer release()
// ...
```

2. Early release

```go
ctx, release, err := Lock(ctx, key)
if err != nil {
    return err
}
defer release()
// ...
// release the lock earlier and reset the context back
ctx = release()
// continue to do something else
// ...
```

3. Functional way

```go
if err := LockAndDo(ctx, key, func(ctx context.Context) error {
    // ...
    return nil
}); err != nil {
    return err
}
```

2 months ago[skip ci] Updated licenses and gitignores
GiteaBot [Mon, 26 Aug 2024 00:28:33 +0000 (00:28 +0000)]
[skip ci] Updated licenses and gitignores

2 months agoUpdate mermaid to v11 (#31913)
silverwind [Sun, 25 Aug 2024 17:23:13 +0000 (19:23 +0200)]
Update mermaid to v11 (#31913)

Update mermaid to
[v11](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) and
enable the new [`suppressErrorRendering`
option](https://github.com/mermaid-js/mermaid/pull/4359) to ensure
mermaid never renders error elements into the DOM (we have per-chart
error rendering, so don't need it). Tested various chart types.

BTW, I was unable to reproduce that error rendering from mermaid with
`suppressErrorRendering: false` and I thought we had some CSS to hide
the error element, but I could not find it, not even in git history.

2 months agoHandle "close" actionable references for manual merges (#31879)
Zettat123 [Sun, 25 Aug 2024 17:18:19 +0000 (01:18 +0800)]
Handle "close" actionable references for manual merges (#31879)

Fix #31743

2 months ago[skip ci] Updated translations via Crowdin
GiteaBot [Sun, 25 Aug 2024 00:30:57 +0000 (00:30 +0000)]
[skip ci] Updated translations via Crowdin

2 months agoRemove "dsa-1024" testcases from Test_SSHParsePublicKey and Test_calcFingerprint...
Saulius Gurklys [Sat, 24 Aug 2024 10:07:16 +0000 (13:07 +0300)]
Remove "dsa-1024" testcases from Test_SSHParsePublicKey and Test_calcFingerprint (#31905)

DSA is considered inherently insecure and is already disabled/removed in
OpenSSH 9.8.

Therefore "dsa-1024" tescases are failing.

```
--- FAIL: Test_calcFingerprint (0.02s)
    --- FAIL: Test_calcFingerprint/dsa-1024 (0.00s)
        --- FAIL: Test_calcFingerprint/dsa-1024/SSHKeygen (0.00s)
            ssh_key_test.go:196:
                        Error Trace:    /src/gitea/models/asymkey/ssh_key_test.go:196
                        Error:          Received unexpected error:
                                        Unable to verify key content [result: /tmp/gitea_keytest1239408114 is not a public key file.
                                        ]
                        Test:           Test_calcFingerprint/dsa-1024/SSHKeygen
            ssh_key_test.go:197:
                        Error Trace:    /src/gitea/models/asymkey/ssh_key_test.go:197
                        Error:          Not equal:
                                        expected: "SHA256:fSIHQlpKMDsGPVAXI8BPYfRp+e2sfvSt1sMrPsFiXrc"
                                        actual  : ""

                                        Diff:
                                        --- Expected
                                        +++ Actual
                                        @@ -1 +1 @@
                                        -SHA256:fSIHQlpKMDsGPVAXI8BPYfRp+e2sfvSt1sMrPsFiXrc
                                        +
                        Test:           Test_calcFingerprint/dsa-1024/SSHKeygen
FAIL
```

Fix #31624

3 months agoBump relative-time-element to v4.4.3 (#31910)
Yarden Shoham [Fri, 23 Aug 2024 17:22:36 +0000 (20:22 +0300)]
Bump relative-time-element to v4.4.3 (#31910)

All date-times work as before

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
3 months ago[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 22 Aug 2024 00:27:44 +0000 (00:27 +0000)]
[skip ci] Updated translations via Crowdin

3 months agoUse correct function name (#31887)
Lunny Xiao [Wed, 21 Aug 2024 21:05:48 +0000 (05:05 +0800)]
Use correct function name (#31887)

3 months agoMove lock icon position and add additional tooltips to branch list page (#31839)
william-allspice [Wed, 21 Aug 2024 05:40:18 +0000 (00:40 -0500)]
Move lock icon position and add additional tooltips to branch list page (#31839)

This Pull Request adds missing tool tips for the protected, copy, and rss icons on the branch list page. It also moved protected icon position after the branch name.

3 months agoDon't return 500 if mirror url contains special chars (#31859)
Lunny Xiao [Wed, 21 Aug 2024 01:54:55 +0000 (09:54 +0800)]
Don't return 500 if mirror url contains special chars (#31859)

Fix #31640

3 months ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 21 Aug 2024 00:27:45 +0000 (00:27 +0000)]
[skip ci] Updated translations via Crowdin

3 months agoRefactor the usage of batch catfile (#31754)
Lunny Xiao [Tue, 20 Aug 2024 17:04:57 +0000 (01:04 +0800)]
Refactor the usage of batch catfile (#31754)

When opening a repository, it will call `ensureValidRepository` and also
`CatFileBatch`. But sometimes these will not be used until repository
closed. So it's a waste of CPU to invoke 3 times git command for every
open repository.

This PR removed all of these from `OpenRepository` but only kept
checking whether the folder exists. When a batch is necessary, the
necessary functions will be invoked.

3 months agoFix agit automerge (#31207)
Lunny Xiao [Tue, 20 Aug 2024 06:17:21 +0000 (14:17 +0800)]
Fix agit automerge (#31207)

3 months agoadd CfTurnstileSitekey context data to all captcha templates (#31874)
Rowan Bohde [Mon, 19 Aug 2024 17:58:53 +0000 (12:58 -0500)]
add CfTurnstileSitekey context data to all captcha templates (#31874)

In the OpenID flows, the "CfTurnstileSitekey" wasn't populated, which
caused those flows to fail if using Turnstile as the Captcha
implementation.

This adds the missing context variables, allowing Turnstile to be used
in the OpenID flows.

3 months agoAdd tag name in the commits list (#31082)
Lunny Xiao [Mon, 19 Aug 2024 17:04:06 +0000 (01:04 +0800)]
Add tag name in the commits list (#31082)

Fix #10036

This PR adds some labels for tags of this commit after the commit
message on the commits table. The tag template is share as commit
graph's.

Desktop:
<img width="1302" alt="image"
src="https://github.com/go-gitea/gitea/assets/81045/ba94e1e6-2a3d-44f3-85a3-575fb5667c97">

Mobile:
<img width="370" alt="image"
src="https://github.com/go-gitea/gitea/assets/81045/e3eb1f44-3686-4012-aa9d-52cd88b22c0e">

3 months agoFix actions notify bug (#31866)
Lunny Xiao [Mon, 19 Aug 2024 16:25:41 +0000 (00:25 +0800)]
Fix actions notify bug (#31866)

Try to fix
https://github.com/go-gitea/gitea/issues/31757#issuecomment-2295131062

3 months agoActions support workflow dispatch event (#28163)
胖梁 [Mon, 19 Aug 2024 02:38:40 +0000 (10:38 +0800)]
Actions support workflow dispatch event (#28163)

fix #23668

My plan:
* In the `actions.list` method, if workflow is selected and IsAdmin,
check whether the on event contains `workflow_dispatch`. If so, display
a `Run workflow` button to allow the user to manually trigger the run.
* Providing a form that allows users to select target brach or tag, and
these parameters can be configured in yaml
* Simple form validation, `required` input cannot be empty
* Add a route `/actions/run`, and an `actions.Run` method to handle
* Add `WorkflowDispatchPayload` struct to pass the Webhook event payload
to the runner when triggered, this payload carries the `inputs` values
and other fields, doc: [workflow_dispatch
payload](https://docs.github.com/en/webhooks/webhook-events-and-payloads#workflow_dispatch)

Other PRs
* the `Workflow.WorkflowDispatchConfig()` method still return non-nil
when workflow_dispatch is not defined. I submitted a PR
https://gitea.com/gitea/act/pulls/85 to fix it. Still waiting for them
to process.

Behavior should be same with github, but may cause confusion. Here's a
quick reminder.
*
[Doc](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch)
Said: This event will `only` trigger a workflow run if the workflow file
is `on the default branch`.
* If the workflow yaml file only exists in a non-default branch, it
cannot be triggered. (It will not even show up in the workflow list)
* If the same workflow yaml file exists in each branch at the same time,
the version of the default branch is used. Even if `Use workflow from`
selects another branch

![image](https://github.com/go-gitea/gitea/assets/3114995/4bf596f3-426b-48e8-9b8f-0f6d18defd79)
```yaml
name: Docker Image CI

on:
  workflow_dispatch:
    inputs:
      logLevel:
        description: 'Log level'
        required: true
        default: 'warning'
        type: choice
        options:
        - info
        - warning
        - debug
      tags:
        description: 'Test scenario tags'
        required: false
        type: boolean
      boolean_default_true:
        description: 'Test scenario tags'
        required: true
        type: boolean
        default: true
      boolean_default_false:
        description: 'Test scenario tags'
        required: false
        type: boolean
        default: false
      environment:
        description: 'Environment to run tests against'
        type: environment
        required: true
        default: 'environment values'
      number_required_1:
        description: 'number '
        type: number
        required: true
        default: '100'
      number_required_2:
        description: 'number'
        type: number
        required: true
        default: '100'
      number_required_3:
        description: 'number'
        type: number
        required: true
        default: '100'
      number_1:
        description: 'number'
        type: number
        required: false
      number_2:
        description: 'number'
        type: number
        required: false
      number_3:
        description: 'number'
        type: number
        required: false

env:
  inputs_logLevel:              ${{ inputs.logLevel }}
  inputs_tags:                  ${{ inputs.tags }}
  inputs_boolean_default_true:  ${{ inputs.boolean_default_true }}
  inputs_boolean_default_false: ${{ inputs.boolean_default_false }}
  inputs_environment:           ${{ inputs.environment }}
  inputs_number_1:              ${{ inputs.number_1  }}
  inputs_number_2:              ${{ inputs.number_2  }}
  inputs_number_3:              ${{ inputs.number_3  }}
  inputs_number_required_1:     ${{ inputs.number_required_1  }}
  inputs_number_required_2:     ${{ inputs.number_required_2  }}
  inputs_number_required_3:     ${{ inputs.number_required_3  }}

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - run: ls -la
      - run: env | grep inputs
      - run: echo ${{ inputs.logLevel }}
      - run: echo ${{ inputs.boolean_default_false }}
```

![image](https://github.com/go-gitea/gitea/assets/3114995/a58a842d-a0ff-4618-bc6d-83a9596d07c8)

![image](https://github.com/go-gitea/gitea/assets/3114995/44a7cca5-7bd4-42a9-8723-91751a501c88)

---------

Co-authored-by: TKaxv_7S <954067342@qq.com>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Denys Konovalov <kontakt@denyskon.de>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
3 months ago[skip ci] Updated translations via Crowdin
GiteaBot [Mon, 19 Aug 2024 00:28:51 +0000 (00:28 +0000)]
[skip ci] Updated translations via Crowdin

3 months ago[skip ci] Updated translations via Crowdin
GiteaBot [Sun, 18 Aug 2024 00:30:09 +0000 (00:30 +0000)]
[skip ci] Updated translations via Crowdin

3 months agoFix overflowing content in action run log (#31842)
Adrian Hirt [Sat, 17 Aug 2024 03:34:27 +0000 (05:34 +0200)]
Fix overflowing content in action run log (#31842)

When a long line with characters such as dots is returned by a step in
an action (e.g. by the output of the Ruby on Rails test runner), it
overflows the log container, causing the page to scroll sideways.

This PR adds the CSS `overflow-wrap: anywhere;` to the
`.job-step-section .job-step-logs .job-log-line .log-msg` selector,
which causes such lines to wrap as well

3 months agoUpgrade `htmx` to `2.0.2` (#31847)
Yarden Shoham [Fri, 16 Aug 2024 17:48:54 +0000 (20:48 +0300)]
Upgrade `htmx` to `2.0.2` (#31847)

Tested `Follow`, `Star`, `Watch`, and the admin dashboard page. All
functionality remains unchanged.

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
3 months agofix the component of access token list not mounted (#31824)
sillyguodong [Fri, 16 Aug 2024 17:37:36 +0000 (01:37 +0800)]
fix the component of access token list not mounted (#31824)

try to fix #31771

3 months agoAvoid returning without written ctx when posting PR (#31843)
Jason Song [Fri, 16 Aug 2024 17:04:54 +0000 (01:04 +0800)]
Avoid returning without written ctx when posting PR (#31843)

Fix #31625.

If `pull_service.NewPullRequest` return an error which misses each `if`
check, `CompareAndPullRequestPost` will return immediately, since it
doesn't write the HTTP response, a 200 response with empty body will be
sent to clients.

```go
if err := pull_service.NewPullRequest(ctx, repo, pullIssue, labelIDs, attachments, pullRequest, assigneeIDs); err != nil {
if repo_model.IsErrUserDoesNotHaveAccessToRepo(err) {
ctx.Error(http.StatusBadRequest, "UserDoesNotHaveAccessToRepo", err.Error())
} else if git.IsErrPushRejected(err) {
// ...
ctx.JSONError(flashError)
} else if errors.Is(err, user_model.ErrBlockedUser) {
// ...
ctx.JSONError(flashError)
} else if errors.Is(err, issues_model.ErrMustCollaborator) {
// ...
ctx.JSONError(flashError)
}
return
}
```

Not sure what kind of error can cause it to happen, so this PR just
expose it. And we can fix it when users report that creating PRs failed
with error responses.

It's all my guess since I cannot reproduce the problem, but even if it's
not related, the code here needs to be improved.

3 months agoFix raw wiki links (#31825)
Zettat123 [Fri, 16 Aug 2024 12:40:51 +0000 (20:40 +0800)]
Fix raw wiki links (#31825)

Fix #31395

This regression is introduced by #30273. To find out how GitHub handles
this case, I did [some
tests](https://github.com/go-gitea/gitea/issues/31395#issuecomment-2278929115).

I use redirect in this PR instead of checking if the corresponding `.md`
file exists when rendering the link because GitHub also uses redirect.
With this PR, there is no need to resolve the raw wiki link when
rendering a wiki page. If a wiki link points to a raw file, access will
be redirected to the raw link.

3 months ago[skip ci] Updated translations via Crowdin
GiteaBot [Fri, 16 Aug 2024 00:27:28 +0000 (00:27 +0000)]
[skip ci] Updated translations via Crowdin

3 months agoAdd missing repository type filter parameters to pager (#31832)
yp05327 [Thu, 15 Aug 2024 16:34:24 +0000 (01:34 +0900)]
Add missing repository type filter parameters to pager  (#31832)

Fix #31807

ps: the newly added params's value will be changed.
When the first time you selected the filter, the values of params will
be `0` or `1`
But in pager it will be `true` or `false`.
So do we have `boolToInt` function?

3 months agoFix panic of ssh public key page after deletion of auth source (#31829)
Lunny Xiao [Thu, 15 Aug 2024 15:59:01 +0000 (23:59 +0800)]
Fix panic of ssh public key page after deletion of auth source (#31829)

Fix #31730

This PR rewrote the function `PublicKeysAreExternallyManaged` with a
simple test. The new function removed the loop to make it more readable.

3 months ago[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 15 Aug 2024 00:27:03 +0000 (00:27 +0000)]
[skip ci] Updated translations via Crowdin

3 months agorender plain text file if the LFS object doesn't exist (#31812)
Rowan Bohde [Wed, 14 Aug 2024 21:50:09 +0000 (16:50 -0500)]
render plain text file if the LFS object doesn't exist (#31812)

We had an issue where a repo was using LFS to store a file, but the user
did not push the file. When trying to view the file, Gitea returned a
500 HTTP status code referencing `ErrLFSObjectNotExist`. It appears the
intent was the render this file as plain text, but the conditional was
flipped. I've also added a test to verify that the file is rendered as
plain text.

3 months agoAdd spacing to global error message (#31826)
Sebastian Luino [Wed, 14 Aug 2024 01:58:26 +0000 (21:58 -0400)]
Add spacing to global error message (#31826)

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

Include Typescript files in Tailwind config so they can be
pre-processed.

![Screenshot from 2024-08-13
08-44-33](https://github.com/user-attachments/assets/196d7801-e299-4000-8b39-cd9f89917f17)

3 months ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 14 Aug 2024 00:28:12 +0000 (00:28 +0000)]
[skip ci] Updated translations via Crowdin

3 months agoFixes for unreachable project issues when transfer repository from organization ...
Edip Emre Bodur [Tue, 13 Aug 2024 02:53:43 +0000 (05:53 +0300)]
Fixes for unreachable project issues when transfer repository from organization (#31770)

When transferring repositories that have issues linked to a project
board to another organization, the issues remain associated with the
original project board. This causes the columns in the project board to
become bugged, making it difficult to move other issues in or out of the
affected columns. As a solution, I removed the issue relations since the
other organization does not have this project table.

Fix for #31538

Co-authored-by: Jason Song <i@wolfogre.com>
3 months ago[skip ci] Updated translations via Crowdin
GiteaBot [Tue, 13 Aug 2024 00:28:59 +0000 (00:28 +0000)]
[skip ci] Updated translations via Crowdin

3 months agoScroll images in project issues separately from the remaining issue (#31683)
Simon Priet [Mon, 12 Aug 2024 23:36:28 +0000 (01:36 +0200)]
Scroll images in project issues separately from the remaining issue (#31683)

As discussed in #31667 & #26561, when a card on a Project contains
images, they can overflow the card on its containing column. This aims
to fix this issue via snapping scrollbars.

---
Issue #31667 is open to discussion as there should be room for
improvement.

3 months agoSupport issue template assignees (#31083)
Zettat123 [Mon, 12 Aug 2024 08:00:40 +0000 (16:00 +0800)]
Support issue template assignees (#31083)

Resolve #13955

3 months agoAdd `:focus-visible` style to buttons (#31799)
silverwind [Mon, 12 Aug 2024 00:40:18 +0000 (02:40 +0200)]
Add `:focus-visible` style to buttons (#31799)

Buttons now show a focus style via
[`:focus-visible`](https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible)
when the browser deems the focus to be important, like for example when
the button is focused via keyboard navigation.

<img width="492" alt="Screenshot 2024-08-07 at 22 12 51"
src="https://github.com/user-attachments/assets/060568b1-1599-4c56-bafb-b36ebb1bec35">
<img width="479" alt="image"
src="https://github.com/user-attachments/assets/885f4e10-f496-47f0-8ae5-45827ded09f8">

3 months ago[skip ci] Updated licenses and gitignores
GiteaBot [Mon, 12 Aug 2024 00:29:12 +0000 (00:29 +0000)]
[skip ci] Updated licenses and gitignores

3 months agoShow lock owner instead of repo owner on LFS setting page (#31788)
Jason Song [Sun, 11 Aug 2024 14:48:20 +0000 (22:48 +0800)]
Show lock owner instead of repo owner on LFS setting page (#31788)

Fix #31784.

Before:

<img width="1648" alt="image"
src="https://github.com/user-attachments/assets/03f32545-4a85-42ed-bafc-2b193a5d8023">

After:

<img width="1653" alt="image"
src="https://github.com/user-attachments/assets/e5bcaf93-49cb-421f-aac1-5122bc488b02">