]> source.dussan.org Git - gitea.git/log
gitea.git
7 months agoRemove jQuery AJAX from the notice selection deletion button (#29381)
Yarden Shoham [Sun, 25 Feb 2024 12:36:11 +0000 (14:36 +0200)]
Remove jQuery AJAX from the notice selection deletion button (#29381)

- Removed all jQuery AJAX calls and replaced with our fetch wrapper
- Tested the repo notice selection deletion button functionality and it
works as before

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
7 months agoRefactor Safe modifier (#29392)
wxiaoguang [Sun, 25 Feb 2024 10:45:56 +0000 (18:45 +0800)]
Refactor Safe modifier (#29392)

After this PR: no need to play with the Safe/Escape tricks anymore. See
the changes for more details.

7 months agoAdd attachment support for code review comments (#29220)
Jimmy Praet [Sun, 25 Feb 2024 06:00:55 +0000 (07:00 +0100)]
Add attachment support for code review comments (#29220)

Fixes #27960, #24411, #12183

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
7 months agoRefactor modules/git global variables (#29376)
wxiaoguang [Sun, 25 Feb 2024 05:35:47 +0000 (13:35 +0800)]
Refactor modules/git global variables (#29376)

Move some global variables into a struct to improve maintainability

7 months agoRemove jQuery from the code diff expansion buttons (#29385)
Yarden Shoham [Sun, 25 Feb 2024 05:07:23 +0000 (07:07 +0200)]
Remove jQuery from the code diff expansion buttons (#29385)

- Removed all jQuery AJAX calls and replaced with htmx
- Tested the code diff expansion buttons functionality and it works as
before plus a loading indicator

# Demo using `htmx` instead of jQuery AJAX

![action](https://github.com/go-gitea/gitea/assets/20454870/afba7442-ed56-4d39-b764-835d1f6c3a9c)

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
7 months agoRemove jQuery AJAX from the markdown editor preview (#29384)
Yarden Shoham [Sun, 25 Feb 2024 04:42:29 +0000 (06:42 +0200)]
Remove jQuery AJAX from the markdown editor preview (#29384)

- Removed all jQuery AJAX calls and replaced with our fetch wrapper
- Tested the markdown editor preview button functionality and it works
as before

# Demo using `fetch` instead of jQuery AJAX

![action](https://github.com/go-gitea/gitea/assets/20454870/3fc7abb8-4fdc-46e9-95f6-087d9526bb52)

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
7 months agoRefactor `copy` button event handler (#29379)
wxiaoguang [Sun, 25 Feb 2024 04:17:11 +0000 (12:17 +0800)]
Refactor `copy` button event handler (#29379)

Use "closest" instead of "for-loop"

7 months agoRemove jQuery AJAX from the repo commit graph (#29373)
Yarden Shoham [Sun, 25 Feb 2024 04:09:55 +0000 (06:09 +0200)]
Remove jQuery AJAX from the repo commit graph (#29373)

- Removed all jQuery AJAX calls and replaced with our fetch wrapper
- Tested the repo collaborator mode dropdown functionality and it works
as before

# Demo using `fetch` instead of jQuery AJAX

![action](https://github.com/go-gitea/gitea/assets/20454870/7e2f166e-9941-4f26-9666-d00cdf3d9f60)

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: Giteabot <teabot@gitea.io>
7 months agoMove citiation button to proper place (#29374)
wxiaoguang [Sun, 25 Feb 2024 00:13:04 +0000 (08:13 +0800)]
Move citiation button to proper place (#29374)

The citiation button shouldn't be controlled by
DisableDownloadSourceArchives (line 134)

So move it out of that "if" block.

Co-authored-by: Giteabot <teabot@gitea.io>
7 months agoRemove jQuery AJAX from repo collaborator mode dropdown (#29371)
Yarden Shoham [Sat, 24 Feb 2024 23:08:51 +0000 (01:08 +0200)]
Remove jQuery AJAX from repo collaborator mode dropdown (#29371)

- Removed all jQuery AJAX calls and replaced with our fetch wrapper
- Tested the repo collaborator mode dropdown functionality and it works
as before

# Demo using `fetch` instead of jQuery AJAX

![action](https://github.com/go-gitea/gitea/assets/20454870/04466629-19b2-4469-9231-38820ee13c36)

---------

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: Giteabot <teabot@gitea.io>
7 months agoRemove RenderEmojiPlain from template helper (#29375)
wxiaoguang [Sat, 24 Feb 2024 22:34:51 +0000 (06:34 +0800)]
Remove RenderEmojiPlain from template helper (#29375)

RenderEmojiPlain(emoji.ReplaceAliases) should be called explicitly for
some contents, but not for everything.

Actually in modern days, in most cases it doesn't need such
"ReplaceAliases". So only keep it for issue/PR titles.

If anyone really needs to do ReplaceAliases for some contents, I will
propose a following fix.

7 months agoApply to become a maintainer (zokkis) (#29383)
Tim-Nicas Oelschläger [Sat, 24 Feb 2024 20:19:49 +0000 (21:19 +0100)]
Apply to become a maintainer (zokkis) (#29383)

7 months agoRemove jQuery from the Unicode escape button (#29369)
Yarden Shoham [Sat, 24 Feb 2024 19:11:51 +0000 (21:11 +0200)]
Remove jQuery from the Unicode escape button (#29369)

- Switched to plain JavaScript
- Tested the Unicode escape button functionality and it works as before

# Demo using JavaScript without jQuery

![action](https://github.com/go-gitea/gitea/assets/20454870/664f0ced-876b-4cb7-a668-bd62169fc843)

---------

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
7 months agoRefactor git attributes (#29356)
KN4CK3R [Sat, 24 Feb 2024 18:46:49 +0000 (19:46 +0100)]
Refactor git attributes (#29356)

7 months agoUsers with `read` permission of pull requests can be assigned too (#27263)
Lunny Xiao [Sat, 24 Feb 2024 14:14:48 +0000 (22:14 +0800)]
Users with `read` permission of pull requests can be assigned too (#27263)

This PR will also keep the consistent between list assigned users and
check assigned users.

7 months agoCustomizable "Open with" applications for repository clone (#29320)
wxiaoguang [Sat, 24 Feb 2024 13:12:17 +0000 (21:12 +0800)]
Customizable "Open with" applications for repository clone (#29320)

Users could customize the "clone" menu with their own application URLs on the admin panel.

Replace #22378
Close #21121
Close #22149

7 months agoAllow non-admin users to delete review requests (#29057)
Zettat123 [Sat, 24 Feb 2024 12:38:43 +0000 (20:38 +0800)]
Allow non-admin users to delete review requests (#29057)

Fix #14459

The following users can add/remove review requests of a PR
- the poster of the PR
- the owner or collaborators of the repository
- members with read permission on the pull requests unit

7 months agoRemove jQuery from the issue reference context popup (#29367)
Yarden Shoham [Sat, 24 Feb 2024 12:03:53 +0000 (14:03 +0200)]
Remove jQuery from the issue reference context popup (#29367)

- Removed all jQuery calls
- Tested the context popup functionality and it works as before

# Demo without jQuery

![action](https://github.com/go-gitea/gitea/assets/20454870/90b53de5-a8e9-4ed7-9236-1c9dfc324f38)

---------

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: Giteabot <teabot@gitea.io>
7 months agoDo not double close reader (#29354)
KN4CK3R [Sat, 24 Feb 2024 11:45:59 +0000 (12:45 +0100)]
Do not double close reader (#29354)

Fixes #29346

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
7 months agoImplement recent commits graph (#29210)
Şahin Akkaya [Sat, 24 Feb 2024 10:22:51 +0000 (13:22 +0300)]
Implement recent commits graph (#29210)

This is the implementation of Recent Commits page. This feature was
mentioned on #18262.

It adds another tab to Activity page called Recent Commits. Recent
Commits tab shows number of commits since last year for the repository.

7 months agoAdd API to get merged PR of a commit (#29243)
qwerty287 [Sat, 24 Feb 2024 08:18:39 +0000 (09:18 +0100)]
Add API to get merged PR of a commit (#29243)

Adds a new API `/repos/{owner}/{repo}/commits/{sha}/pull` that allows
you to get the merged PR associated to a commit.

---------

Co-authored-by: 6543 <6543@obermui.de>
7 months agoProperly migrate target branch change GitLab comment (#29340)
Sebastian Brückner [Sat, 24 Feb 2024 07:49:16 +0000 (07:49 +0000)]
Properly migrate target branch change GitLab comment (#29340)

GitLab generates "system notes" whenever an event happens within the
platform. Unlike Gitea, those events are stored and retrieved as text
comments with no semantic details. The only way to tell whether a
comment was generated in this manner is the `system` flag on the note
type.

This PR adds detection for a new specific kind of event: Changing the
target branch of a PR. When detected, it is downloaded using Gitea's
type for this event, and eventually uploaded into Gitea in the expected
format, i.e. with no text content in the comment.

This PR also updates the template used to render comments to add support
for migrated comments of this type.

ref:
https://gitlab.com/gitlab-org/gitlab/-/blob/11bd6dc826e0bea2832324a1d7356949a9398884/app/services/system_notes/merge_requests_service.rb#L102

7 months agoUse the database object format name but not read from git repoisitory everytime and...
Lunny Xiao [Sat, 24 Feb 2024 06:55:19 +0000 (14:55 +0800)]
Use the database object format name but not read from git repoisitory everytime and fix possible migration wrong objectformat when migrating a sha256 repository (#29294)

Now we can get object format name from git command line or from the
database repository table. Assume the column is right, we don't need to
read from git command line every time.

This also fixed a possible bug that the object format is wrong when
migrating a sha256 repository from external.

<img width="658" alt="image"
src="https://github.com/go-gitea/gitea/assets/81045/6e9a9dcf-13bf-4267-928b-6bf2c2560423">

7 months agoRevert "Support SAML authentication (#25165)" (#29358)
6543 [Sat, 24 Feb 2024 04:18:49 +0000 (05:18 +0100)]
Revert "Support SAML authentication (#25165)" (#29358)

This reverts #25165 (5bb8d1924d77c675467694de26697b876d709a17), as there
was a chance some important reviews got missed.

so after reverting this patch it will be resubmitted for reviewing again

https://github.com/go-gitea/gitea/pull/25165#issuecomment-1960670242

temporary Open #5512 again

7 months agoImplement code frequency graph (#29191)
Şahin Akkaya [Fri, 23 Feb 2024 23:41:24 +0000 (02:41 +0300)]
Implement code frequency graph (#29191)

### Overview
This is the implementation of Code Frequency page. This feature was
mentioned on these issues: #18262, #7392.

It adds another tab to Activity page called Code Frequency. Code
Frequency tab shows additions and deletions over time since the
repository existed.

Before:
<img width="1296" alt="image"
src="https://github.com/go-gitea/gitea/assets/32161460/2603504f-aee7-4929-a8c4-fb3412a7a0f6">

After:
<img width="1296" alt="image"
src="https://github.com/go-gitea/gitea/assets/32161460/58c03721-729f-4536-a663-9f337f240963">

---

#### Features
- See additions deletions over time since repository existed
- Click on "Additions" or "Deletions" legend to show only one type of
contribution
- Use the same cache from Contributors page so that the loading of data
will be fast once it is cached by visiting either one of the pages

---------

Co-authored-by: Giteabot <teabot@gitea.io>
7 months agoFix validity of the FROM email address not being checked (#29347)
Carlos Felgueiras [Fri, 23 Feb 2024 23:02:14 +0000 (00:02 +0100)]
Fix validity of the FROM email address not being checked (#29347)

Fixes #27188.
Introduces a check on the installation that tries to parse the FROM
address. If it fails, shows a new error message to the user.

---------

Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
7 months agoRefactor generate-svg.js (#29348)
silverwind [Fri, 23 Feb 2024 22:07:27 +0000 (23:07 +0100)]
Refactor generate-svg.js (#29348)

Small refactor to avoid `process` global and to sync it with
`generate-images`.

7 months agoMake optional.Option[T] type serializable (#29282)
6543 [Fri, 23 Feb 2024 21:51:46 +0000 (22:51 +0100)]
Make optional.Option[T] type serializable (#29282)

make the generic `Option` type de-/serializable for json and yaml

---------

Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
7 months agoRemove jQuery from the stopwatch (#29351)
Yarden Shoham [Fri, 23 Feb 2024 21:19:54 +0000 (23:19 +0200)]
Remove jQuery from the stopwatch (#29351)

- Switched to plain JavaScript
- Tested the stopwatch functionality and it works as before

# Demo using JavaScript without jQuery

![action](https://github.com/go-gitea/gitea/assets/20454870/c8e9a401-45e5-4a1d-a683-0d655f1d570e)

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
7 months agoFix tarball/zipball download bug (#29342)
Zettat123 [Fri, 23 Feb 2024 17:49:46 +0000 (01:49 +0800)]
Fix tarball/zipball download bug (#29342)

Fix #29249

~~Use the `/repos/{owner}/{repo}/archive/{archive}` API to download.~~

Apply #26430 to archive download URLs.

7 months agoAdd support for `linguist-detectable` and `linguist-documentation` (#29267)
KN4CK3R [Fri, 23 Feb 2024 17:24:27 +0000 (18:24 +0100)]
Add support for `linguist-detectable` and `linguist-documentation` (#29267)

Add support for `linguist-detectable` and `linguist-documentation`
Add tests for the attributes

https://github.com/github-linguist/linguist/blob/master/docs/overrides.md#detectable

https://github.com/github-linguist/linguist/blob/master/docs/overrides.md#documentation

7 months agoAdjust changelog for v1.21.6 to move prs to correct labels (#29339) (#29343)
Lunny Xiao [Fri, 23 Feb 2024 11:09:18 +0000 (19:09 +0800)]
Adjust changelog for v1.21.6 to move prs to correct labels (#29339) (#29343)

When releasing, the releaser should read all the pull requests carefully
and do some adjustments because some of pull requests' labels are not
right when it's merged.

And the changelog tool needs to be adjusted. If one pull request has
both `bug` and `API`, it should mark it as `bug` but not `API`.

Backport #29339

7 months agoAllow options to disable user deletion from the interface on app.ini (#29275)
Lunny Xiao [Fri, 23 Feb 2024 07:24:04 +0000 (15:24 +0800)]
Allow options to disable user deletion from the interface on app.ini (#29275)

Extract from #20549

This PR added a new option on app.ini `[admin]USER_DISABLED_FEATURES` to
allow the site administrator to disable users visiting deletion user
interface or allow.
This options are also potentially allowed to define more features in
future PRs.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
7 months agoStart to migrate from `util.OptionalBool` to `optional.Option[bool]` (#29329)
6543 [Fri, 23 Feb 2024 02:18:33 +0000 (03:18 +0100)]
Start to migrate from `util.OptionalBool` to `optional.Option[bool]` (#29329)

just create transition helper and migrate two structs

7 months agoAdd slow SQL query warning (#27545)
Earl Warren [Fri, 23 Feb 2024 00:57:24 +0000 (01:57 +0100)]
Add slow SQL query warning (#27545)

- Databases are one of the most important parts of Forgejo, every
interaction uses the database in one way or another. Therefore, it is
important to maintain the database and recognize when the server is not
doing well with the database. There already is the option to log *every*
SQL query along with its execution time, but monitoring becomes
impractical for larger instances and takes up unnecessary storage in the
logs.
- Add a QoL enhancement that allows instance administrators to specify a
threshold value beyond which query execution time is logged as a warning
in the xorm logger. The default value is a conservative five seconds to
avoid this becoming a source of spam in the logs.
- The use case for this patch is that with an instance the size of
Codeberg, monitoring SQL logs is not very fruitful and most of them are
uninteresting. Recently, in the context of persistent deadlock issues
(https://codeberg.org/forgejo/forgejo/issues/220), I have noticed that
certain queries hold locks on tables like comment and issue for several
seconds. This patch helps to identify which queries these are and when
they happen.
- Added unit test.

(cherry picked from commit 9cf501f1af4cd870221cef6af489618785b71186)

---------

Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-authored-by: Giteabot <teabot@gitea.io>
Co-authored-by: 6543 <6543@obermui.de>
7 months agoUnify organizations header (#29248)
Tim-Nicas Oelschläger [Fri, 23 Feb 2024 00:24:57 +0000 (01:24 +0100)]
Unify organizations header (#29248)

Unify organizations header

before:

![image](https://github.com/go-gitea/gitea/assets/72873130/74474e0d-33c3-4bbf-9324-d130ea2c62f8)

after:

![image](https://github.com/go-gitea/gitea/assets/72873130/1c65de0d-fa0f-4b17-ab8d-067de8c7113b)

---------

Co-authored-by: silverwind <me@silverwind.io>
7 months agoFrontport changelogs of minor releases (#29337)
6543 [Fri, 23 Feb 2024 00:24:07 +0000 (01:24 +0100)]
Frontport changelogs of minor releases (#29337)

as title

7 months agoSupport SAML authentication (#25165)
techknowlogick [Fri, 23 Feb 2024 00:08:17 +0000 (19:08 -0500)]
Support SAML authentication (#25165)

Closes https://github.com/go-gitea/gitea/issues/5512

This PR adds basic SAML support
- Adds SAML 2.0 as an auth source
- Adds SAML configuration documentation
- Adds integration test:
- Use bare-bones SAML IdP to test protocol flow and test account is
linked successfully (only runs on Postgres by default)
- Adds documentation for configuring and running SAML integration test
locally

Future PRs:
- Support group mapping
- Support auto-registration (account linking)

Co-Authored-By: @jackHay22
---------

Co-authored-by: jackHay22 <jack@allspice.io>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Jason Song <i@wolfogre.com>
Co-authored-by: morphelinho <morphelinho@users.noreply.github.com>
Co-authored-by: Zettat123 <zettat123@gmail.com>
Co-authored-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: silverwind <me@silverwind.io>
7 months agoUpgrade to fabric 6 (#29334)
silverwind [Thu, 22 Feb 2024 23:31:24 +0000 (00:31 +0100)]
Upgrade to fabric 6 (#29334)

Upgrade fabric to latest v6 beta. It works for our use case, even
thought it does not fix the upstream issue
https://github.com/fabricjs/fabric.js/issues/9679 that
https://github.com/go-gitea/gitea/issues/29326 relates to.

7 months agoDon't show third-party JS errors in production builds (#29303)
silverwind [Thu, 22 Feb 2024 21:21:43 +0000 (22:21 +0100)]
Don't show third-party JS errors in production builds (#29303)

So we don't get issues like
https://github.com/go-gitea/gitea/issues/29080 and
https://github.com/go-gitea/gitea/issues/29273 any more. Only active in
[production
builds](https://webpack.js.org/guides/production/#specify-the-mode), in
non-production the errors will still show.

7 months agoRemove bountysource (#29330)
Kyle D [Thu, 22 Feb 2024 18:53:03 +0000 (13:53 -0500)]
Remove bountysource (#29330)

[Bountysource is dead](https://github.com/bountysource/core/issues/1586). So remove them from our repo.

7 months ago Remove unnecessary "Str2html" modifier from templates (#29319)
wxiaoguang [Thu, 22 Feb 2024 18:05:47 +0000 (02:05 +0800)]
 Remove unnecessary "Str2html" modifier from templates (#29319)

Follow #29165

7 months agoIgnore the linux anchor point to avoid linux migrate failure (#29295)
Lunny Xiao [Thu, 22 Feb 2024 17:40:53 +0000 (01:40 +0800)]
Ignore the linux anchor point to avoid linux migrate failure (#29295)

Fix #28843

This PR will bypass the pushUpdateTag to database failure when
syncAllTags. An error log will be recorded.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
7 months agoRemove jQuery from the repo commit functions (#29230)
Yarden Shoham [Thu, 22 Feb 2024 17:13:25 +0000 (19:13 +0200)]
Remove jQuery from the repo commit functions (#29230)

- Switched to plain JavaScript
- Tested the commit ellipsis button functionality and it works as before
- Tested the commits statuses tippy functionality and it works as before
- Tested the last commit loader functionality and it works as before

# Demo using JavaScript without jQuery

![action](https://github.com/go-gitea/gitea/assets/20454870/465516f8-0ff3-438c-a17e-26cbab82750b)

![action](https://github.com/go-gitea/gitea/assets/20454870/968da210-9382-4b50-a4c2-09419dc86e07)

---------

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: silverwind <me@silverwind.io>
7 months agoRemove unnecessary "Safe" modifier from templates (#29318)
wxiaoguang [Thu, 22 Feb 2024 17:02:33 +0000 (01:02 +0800)]
Remove unnecessary "Safe" modifier from templates (#29318)

Follow #29165

7 months agoRemove jQuery from the image pasting functionality (#29324)
Yarden Shoham [Thu, 22 Feb 2024 16:35:58 +0000 (18:35 +0200)]
Remove jQuery from the image pasting functionality (#29324)

- Switched to plain JavaScript
- Tested the image pasting functionality and it works as before

# Demo using JavaScript without jQuery

![demo](https://github.com/go-gitea/gitea/assets/20454870/018993ff-7b09-4d5f-88e0-f276368bacd6)

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
7 months agoImprove the `issue_comment` workflow trigger event (#29277)
Zettat123 [Thu, 22 Feb 2024 14:47:35 +0000 (22:47 +0800)]
Improve the `issue_comment` workflow trigger event (#29277)

Fix #29175
Replace #29207

This PR makes some improvements to the `issue_comment` workflow trigger
event.

1. Fix the bug that pull requests cannot trigger `issue_comment`
workflows
2. Previously the `issue_comment` event only supported the `created`
activity type. This PR adds support for the missing `edited` and
`deleted` activity types.
3. Some events (including `issue_comment`, `issues`, etc. ) only trigger
workflows that belong to the workflow file on the default branch. This
PR introduces the `IsDefaultBranchWorkflow` function to check for these
events.

7 months agoProperly migrate automatic merge GitLab comments (#27873)
Sebastian Brückner [Thu, 22 Feb 2024 07:29:03 +0000 (07:29 +0000)]
Properly migrate automatic merge GitLab comments (#27873)

GitLab generates "system notes" whenever an event happens within the
platform. Unlike Gitea, those events are stored and retrieved as text
comments with no semantic details. The only way to tell whether a
comment was generated in this manner is the `system` flag on the note
type.

This PR adds detection for two specific kinds of events: Scheduling and
un-scheduling of automatic merges on a PR. When detected, they are
downloaded using Gitea's type for these events, and eventually uploaded
into Gitea in the expected format, i.e. with no text content in the
comment.

This PR also updates the template used to render comments to add support
for migrated comments of these two types.

ref:
https://gitlab.com/gitlab-org/gitlab/-/blob/11bd6dc826e0bea2832324a1d7356949a9398884/app/services/system_notes/merge_requests_service.rb#L6-L17

---------

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
7 months agoRefactor cmd setup and remove deadcode (#29313)
wxiaoguang [Thu, 22 Feb 2024 07:04:30 +0000 (15:04 +0800)]
Refactor cmd setup and remove deadcode (#29313)

* use `setup(ctx, c.Bool("debug"))` like all other callers
* `setting.RunMode = "dev"` is a no-op.
* `if _, err := os.Stat(setting.RepoRootPath); err != nil` could be
simplified

7 months agosmall cache when get user id on interation (#29296)
Lunny Xiao [Thu, 22 Feb 2024 05:31:37 +0000 (13:31 +0800)]
small cache when get user id on interation (#29296)

7 months agoDiscard unread data of `git cat-file` (#29297)
KN4CK3R [Thu, 22 Feb 2024 03:48:19 +0000 (04:48 +0100)]
Discard unread data of `git cat-file` (#29297)

Fixes #29101
Related #29298

Discard all read data to prevent misinterpreting existing data. Some
discard calls were missing in error cases.

---------

Co-authored-by: yp05327 <576951401@qq.com>
7 months agoDon't install playwright twice (#29302)
silverwind [Thu, 22 Feb 2024 03:19:13 +0000 (04:19 +0100)]
Don't install playwright twice (#29302)

1. `playwright/test` is already installed as part of `deps-frontend` on
CI which runs before, so it's better to not install it again (on a
potentially different version), and just use the version from
package.json and add the `deps-frontend` dependency.
2. `PLAYWRIGHT_DIR` is a undefined variable, so I removed it

```bash
$ git show c8ded77680db7344c8dc1ccee76bce0b4e02e103 | grep PLAYWRIGHT_DIR
+playwright: $(PLAYWRIGHT_DIR)
```

7 months ago[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 22 Feb 2024 00:23:48 +0000 (00:23 +0000)]
[skip ci] Updated translations via Crowdin

7 months agoPrevent double use of `git cat-file` session. (#29298)
KN4CK3R [Wed, 21 Feb 2024 18:54:17 +0000 (19:54 +0100)]
Prevent double use of `git cat-file` session. (#29298)

Fixes the reason why #29101 is hard to replicate.
Related #29297

Create a repo with a file with minimum size 4097 bytes (I use 10000) and
execute the following code:
```go
gitRepo, err := gitrepo.OpenRepository(db.DefaultContext, <repo>)
assert.NoError(t, err)

commit, err := gitRepo.GetCommit(<sha>)
assert.NoError(t, err)

entry, err := commit.GetTreeEntryByPath(<file>)
assert.NoError(t, err)

b := entry.Blob()

// Create a reader
r, err := b.DataAsync()
assert.NoError(t, err)
defer r.Close()

// Create a second reader
r2, err := b.DataAsync()
assert.NoError(t, err) // Should be no error but is ErrNotExist
defer r2.Close()
```

The problem is the check in `CatFileBatch`:

https://github.com/go-gitea/gitea/blob/79217ea63c1f77de7ca79813ae45950724e63d02/modules/git/repo_base_nogogit.go#L81-L87
`Buffered() > 0` is used to check if there is a "operation" in progress
at the moment. This is a problem because we can't control the internal
buffer in the `bufio.Reader`. The code above demonstrates a sequence
which initiates an operation for which the code thinks there is no
active processing. The second call to `DataAsync()` therefore reuses the
existing instances instead of creating a new batch reader.

7 months agoRevert #28753 because UI broken. (#29293)
Lunny Xiao [Wed, 21 Feb 2024 14:14:37 +0000 (22:14 +0800)]
Revert #28753 because UI broken. (#29293)

Revert #29255
Revert #28753

7 months agoFix error display when merging PRs (#29288)
Zettat123 [Wed, 21 Feb 2024 11:40:46 +0000 (19:40 +0800)]
Fix error display when merging PRs (#29288)

Partially fix #29071, regression of Modernize merge button #28140

Fix some missing `Redirect` -> `JSONRedirect`.

Thanks @yp05327 for the help in
https://github.com/go-gitea/gitea/issues/29071#issuecomment-1931261075

7 months agoRefactor markup rendering to accept general "protocol:" prefix (#29276)
wxiaoguang [Wed, 21 Feb 2024 10:08:08 +0000 (18:08 +0800)]
Refactor markup rendering to accept general "protocol:" prefix (#29276)

Follow #29024

Major changes:

* refactor validLinksPattern to fullURLPattern and add comments, now it
accepts "protocol:" prefix
* rename `IsLink*` to `IsFullURL*`, and remove unnecessray "mailto:"
check
* fix some comments (by the way)
* rename EmojiShortCodeRegex -> emojiShortCodeRegex (by the way)

7 months agoRemove jQuery from the installation page (#29284)
Yarden Shoham [Wed, 21 Feb 2024 08:13:48 +0000 (10:13 +0200)]
Remove jQuery from the installation page (#29284)

- Switched to plain JavaScript
- Tested the installation page functionality and it works as before

# Demo using JavaScript without jQuery

![action](https://github.com/go-gitea/gitea/assets/20454870/286475b3-1919-4d99-b790-def10fa36e66)

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
7 months agoAlways write proc-receive hook for all git versions (#29287)
wxiaoguang [Wed, 21 Feb 2024 07:01:48 +0000 (15:01 +0800)]
Always write proc-receive hook for all git versions (#29287)

7 months agoDo not use `ctx.Doer` when reset password (#29289)
Jason Song [Wed, 21 Feb 2024 04:57:22 +0000 (12:57 +0800)]
Do not use `ctx.Doer` when reset password (#29289)

Fix #29278.

Caused by a small typo in #28733

7 months agoUpdate Discord logo (#29285)
DC [Wed, 21 Feb 2024 01:55:26 +0000 (01:55 +0000)]
Update Discord logo (#29285)

Fixes #27057 by changing the discord .svg file and running `make svg`.

Before:

<img width="637"
src="https://private-user-images.githubusercontent.com/85847352/267667100-1eaf5d20-b4e9-4736-bb55-7f1da04bbde7.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MDg0NzAwNDUsIm5iZiI6MTcwODQ2OTc0NSwicGF0aCI6Ii84NTg0NzM1Mi8yNjc2NjcxMDAtMWVhZjVkMjAtYjRlOS00NzM2LWJiNTUtN2YxZGEwNGJiZGU3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDAyMjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwMjIwVDIyNTU0NVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTIwN2Y2ODc5N2MzZDU5NzgzODRhNDIzZWY3MDk3ODhiYmIzZDU4NWVlYmFmZjc2OTIyZjE3MWM4ZDg0ODZjNTYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.C6jVQLFPfq4fhGV8wiY9D-P21PUNTDMkX2d2-kU17Ug">

After:

<img width="637"
src="https://github.com/go-gitea/gitea/assets/106393991/45b197ae-e422-42f4-999e-25dc8f6b7a92">

7 months ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 21 Feb 2024 00:23:41 +0000 (00:23 +0000)]
[skip ci] Updated translations via Crowdin

7 months agoRemove jQuery .map() and enable eslint rules for it (#29272)
silverwind [Wed, 21 Feb 2024 00:05:17 +0000 (01:05 +0100)]
Remove jQuery .map() and enable eslint rules for it (#29272)

- Use case in `repo-commit` was tested until the point where the POST
request was sent with the same payload.
- Use case in `repo-legacy` was tested completely with comment editing.
- `jquery/no-fade` was disabled as well to stay in sync with
`no-jquery/no-fade`, had no violations.

7 months agoExplained where create issue/PR template (#29035) (#29266)
6543 [Tue, 20 Feb 2024 20:12:47 +0000 (21:12 +0100)]
Explained where create issue/PR template (#29035) (#29266)

For some user (as me), documentation lack of precision about where to
store issue/pr template.

I propose an enhancement about this point. With bold exergue and
precision about server itself.

I've found some user with same interrogation as :
https://forum.gitea.com/t/issue-template-directory/3328

---------

Co-authored-by: Km <cam.lafit@azerttyu.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
7 months agoRemove jQuery from repo wiki creation page (#29271)
Yarden Shoham [Tue, 20 Feb 2024 10:37:37 +0000 (12:37 +0200)]
Remove jQuery from repo wiki creation page (#29271)

- Switched to plain JavaScript
- Tested the wiki creation form functionality and it works as before

# Demo using JavaScript without jQuery

![action](https://github.com/go-gitea/gitea/assets/20454870/2dfc95fd-40cc-4ffb-9ae6-50f798fddd67)

---------

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: silverwind <me@silverwind.io>
7 months agoDo not show delete button when time tracker is disabled (#29257)
Zettat123 [Tue, 20 Feb 2024 01:39:44 +0000 (09:39 +0800)]
Do not show delete button when time tracker is disabled (#29257)

Fix #29233

The delete button of time logs won't be shown when the time tracker is disabled.

![image](https://github.com/go-gitea/gitea/assets/15528715/5cc4e0c9-d2f9-4b8f-a2f5-fe202b94c191)

7 months agoLeft align the input labels for the link account page (#29255)
Rafael Heard [Tue, 20 Feb 2024 01:01:48 +0000 (20:01 -0500)]
Left align the input labels for the link account page (#29255)

In a previous [PR](https://github.com/go-gitea/gitea/pull/28753) we
moved the labels to be above the inputs. The PR ensures that the
alignment is also on both tabs of the link account page
(`/user/link_account`).

Before
<img width="1094" alt="before"
src="https://github.com/go-gitea/gitea/assets/6152817/ac1e86bd-c4d6-4e45-87d1-87bb8a736149">

After
<img width="1094" alt="after"
src="https://github.com/go-gitea/gitea/assets/6152817/1b5fc109-f4d2-43ee-b924-0a9e53a0e391">

---------

Co-authored-by: rafh <rafaelheard@gmail.com>
7 months ago[skip ci] Updated translations via Crowdin
GiteaBot [Tue, 20 Feb 2024 00:23:17 +0000 (00:23 +0000)]
[skip ci] Updated translations via Crowdin

7 months agoRemove jQuery from the repo migration form (#29229)
Yarden Shoham [Mon, 19 Feb 2024 22:34:35 +0000 (00:34 +0200)]
Remove jQuery from the repo migration form (#29229)

- Switched to plain JavaScript
- Tested the repo migration form functionality and it works as before

# Demo using JavaScript without jQuery

![action](https://github.com/go-gitea/gitea/assets/20454870/3496ec05-48a7-449e-8cdd-f8372ba0d589)

---------

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: silverwind <me@silverwind.io>
7 months agoFix content size does not match error when uploading lfs file (#29259)
vincent [Mon, 19 Feb 2024 14:50:03 +0000 (22:50 +0800)]
Fix content size does not match error when uploading lfs file (#29259)

![image](https://github.com/go-gitea/gitea/assets/38434877/cd726b4d-4771-4547-8aee-ae4e4b56b1d1)
When we update an lfs file by API
`api/v1/repos/{owner}/{repo}/contents/{filepath}`, there will show an
error

```json
{
  "message": "Put \"http://localhost:9000/gitea/lfs/38/92/05904d6c7bb83fc676513911226f2be25bf1465616bb9b29587100ab1414\": readfrom tcp [::1]:57300->[::1]:9000: content size does not match",
  "url": "http://localhost:3000/api/swagger"
}
```

The reason of this error is
https://github.com/go-gitea/gitea/blob/main/services/repository/files/update.go,
in this file, the `file.ContentReader` been used twice. So when use
`file.ContentReader` in the second time, the `i` of this Reader has been
updated to the length of the content. it will return 0 and an `io.EOF`
error when we try to read cotent from this Reader.

7 months agoWorkaround to clean up old reviews on creating a new one (#28554)
6543 [Mon, 19 Feb 2024 13:42:18 +0000 (14:42 +0100)]
Workaround to clean up old reviews on creating a new one (#28554)

close  #28542

blocks  #28544

---
*Sponsored by Kithara Software GmbH*

7 months agoDeduplicate translations for contributors graph (#29256)
Şahin Akkaya [Mon, 19 Feb 2024 12:47:38 +0000 (15:47 +0300)]
Deduplicate translations for contributors graph (#29256)

I have implemented three graph pages
([contributors](https://github.com/go-gitea/gitea/pull/27882), [code
frequency](https://github.com/go-gitea/gitea/pull/29191) and [recent
commits](https://github.com/go-gitea/gitea/pull/29210)) and they have
all same page title as the tab name so I decided to use same
translations for them. This PR is for contributors graph. Other PR's
have their own respective commits.

7 months agoRemove DataRaceCheck (#29258)
wxiaoguang [Mon, 19 Feb 2024 11:25:58 +0000 (19:25 +0800)]
Remove DataRaceCheck (#29258)

Since #26254, it started using `{{ctx.Locale.Tr ...}}`

Now the `ctx` seems stable enough, so the check could be removed.

7 months agoFix c/p error in inline documentation (#29148)
Johan Van de Wauw [Mon, 19 Feb 2024 10:51:58 +0000 (11:51 +0100)]
Fix c/p error in inline documentation (#29148)

Fix small copy/paste error in inline documentation

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
7 months agoShow commit status for releases (#29149)
KN4CK3R [Mon, 19 Feb 2024 10:27:05 +0000 (11:27 +0100)]
Show commit status for releases (#29149)

Fixes #29082

![grafik](https://github.com/go-gitea/gitea/assets/1666336/bb2ccde1-ee99-459d-9e74-0fb8ea79e8b3)

7 months agoDisallow merge when required checked are missing (#29143)
Markus Amshove [Mon, 19 Feb 2024 09:57:08 +0000 (10:57 +0100)]
Disallow merge when required checked are missing (#29143)

fixes #21892

This PR disallows merging a PR when not all commit status contexts
configured in the branch protection are met.

Previously, the PR was happy to merge when one commit status was
successful and the other contexts weren't reported.

Any feedback is welcome, first time Go :-)
I'm also not sure if the changes in the template break something else

Given the following branch protection:

![branch_protection](https://github.com/go-gitea/gitea/assets/2401875/f871b4e4-138b-435a-b496-f9ad432e3dec)

This was shown before the change:

![before](https://github.com/go-gitea/gitea/assets/2401875/60424ff0-ee09-4fa0-856e-64e6e3fb0612)

With the change, it is now shown as this:

![after](https://github.com/go-gitea/gitea/assets/2401875/4e464142-efb1-4889-8166-eb3be26c8f3d)

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
7 months agoDo not use lower tag names to find releases/tags (#29261)
Jason Song [Mon, 19 Feb 2024 09:31:36 +0000 (17:31 +0800)]
Do not use lower tag names to find releases/tags (#29261)

Fix #26090, see
https://github.com/go-gitea/gitea/issues/26090#issuecomment-1952013206

Since `TagName` stores the original tag name and `LowerTagName` stores
the lower tag name, it doesn't make sense to use lowercase tags as
`TagNames` in `FindReleasesOptions`.

https://github.com/go-gitea/gitea/blob/5e72526da4e915791f03af056890e16821bde052/services/repository/push.go#L396-L397

While the only other usage looks correct:

https://github.com/go-gitea/gitea/blob/5e72526da4e915791f03af056890e16821bde052/routers/web/repo/repo.go#L416

7 months agoDownscale pasted PNG images based on metadata (#29123)
silverwind [Mon, 19 Feb 2024 02:23:06 +0000 (03:23 +0100)]
Downscale pasted PNG images based on metadata (#29123)

Some images like MacOS screenshots contain
[pHYs](http://www.libpng.org/pub/png/book/chapter11.html#png.ch11.div.8)
data which we can use to downscale uploaded images so they render in the
same dppx ratio in which they were taken.

Before:

<img width="584" alt="image"
src="https://github.com/go-gitea/gitea/assets/115237/50979e3a-5d5a-40dc-a0a4-36eb6e28f14a">

After:

<img width="329" alt="image"
src="https://github.com/go-gitea/gitea/assets/115237/0690902a-f2fe-4c6b-97b3-6fdd67c21bad">

7 months ago[skip ci] Updated licenses and gitignores
GiteaBot [Mon, 19 Feb 2024 00:24:35 +0000 (00:24 +0000)]
[skip ci] Updated licenses and gitignores

7 months agoDe-duplicate contributor graph translations (#29247)
Şahin Akkaya [Sun, 18 Feb 2024 21:02:07 +0000 (00:02 +0300)]
De-duplicate contributor graph translations (#29247)

7 months agoUse general token signing secret (#29205)
wxiaoguang [Sun, 18 Feb 2024 17:39:04 +0000 (01:39 +0800)]
Use general token signing secret (#29205)

Use a clearly defined "signing secret" for token signing.

7 months agoFix missed edit issues event for actions (#29237)
Lunny Xiao [Sun, 18 Feb 2024 15:16:34 +0000 (23:16 +0800)]
Fix missed edit issues event for actions (#29237)

Fix #29213

7 months agoClean up diff header css and reduce global textarea min-height (#29232)
silverwind [Sun, 18 Feb 2024 14:51:21 +0000 (15:51 +0100)]
Clean up diff header css and reduce global textarea min-height (#29232)

1. Tweak diff header and remove a numbe of unneeded CSS for it:

Before:
<img width="433" alt="Screenshot 2024-02-18 at 01 08 09"
src="https://github.com/go-gitea/gitea/assets/115237/d8b377c0-57bc-44d5-bb57-a582c7d4b3b4">

After:
<img width="463" alt="Screenshot 2024-02-18 at 01 07 56"
src="https://github.com/go-gitea/gitea/assets/115237/d08c17e7-5b86-4d07-81da-6371f4754325">

3. Reduce height of review textarea and also reduce fomantic's CSS from
12em to 8em. Now fits better on my screen:

<img width="1352" alt="image"
src="https://github.com/go-gitea/gitea/assets/115237/5c658d13-295e-4929-94da-13ade888020d">

---------

Co-authored-by: delvh <dev.lh@web.de>
7 months agoExpire artifacts before deleting them physically (#29241)
FuXiaoHei [Sun, 18 Feb 2024 14:25:14 +0000 (22:25 +0800)]
Expire artifacts before deleting them physically (#29241)

https://github.com/go-gitea/gitea/pull/27172#discussion_r1493735466

When cleanup artifacts, it removes storage first. If storage is not
exist (maybe delete manually), it gets error and continue loop. It makes
a dead loop if there are a lot pending but non-existing artifacts.

Now it updates db record at first to avoid keep a lot of pending status
artifacts.

7 months agoImprove TrHTML and add more tests (#29228)
wxiaoguang [Sun, 18 Feb 2024 12:15:24 +0000 (20:15 +0800)]
Improve TrHTML and add more tests (#29228)

Follow #29165.

Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
7 months agoConvert visibility to number (#29226)
Tim-Nicas Oelschläger [Sun, 18 Feb 2024 11:47:50 +0000 (12:47 +0100)]
Convert visibility to number (#29226)

Don't throw error while creating user (Fixes #29218)

7 months agoImplement some action notifier functions (#29173)
yp05327 [Sun, 18 Feb 2024 10:58:46 +0000 (19:58 +0900)]
Implement some action notifier functions (#29173)

Fix #29166

Add support for the following activity types of `pull_request`
- assigned
- unassigned
- review_requested
- review_request_removed
- milestoned
- demilestoned

7 months agoArtifact deletion in actions ui (#27172)
FuXiaoHei [Sun, 18 Feb 2024 10:33:50 +0000 (18:33 +0800)]
Artifact deletion in actions ui (#27172)

Add deletion link in runs view page.
Fix #26315

![image](https://github.com/go-gitea/gitea/assets/2142787/aa65a4ab-f434-4deb-b953-21e63c212033)

When click deletion button. It marks this artifact `need-delete`.

This artifact would be deleted when actions cleanup cron task.

7 months agoUpdate docs for actions variables (#29239)
zhangnew [Sun, 18 Feb 2024 10:04:58 +0000 (18:04 +0800)]
Update docs for actions variables (#29239)

the variables is supported, see
https://github.com/go-gitea/gitea/blob/a784ed3d6c6946fd9bf95f2e910f52f549326fe2/docs/content/usage/actions/act-runner.zh-cn.md?plain=1#L262-L289

7 months agoRefactor more code in templates (#29236)
wxiaoguang [Sun, 18 Feb 2024 09:52:02 +0000 (17:52 +0800)]
Refactor more code in templates  (#29236)

Follow #29165.

* Introduce JSONTemplate to help to render JSON templates
* Introduce JSEscapeSafe for templates. Now only use `{{ ... |
JSEscape}}` instead of `{{ ... | JSEscape | Safe}}`
* Simplify "UserLocationMapURL" useage

7 months agoUse "Safe" modifier for manually constructed safe HTML strings in templates (#29227)
wxiaoguang [Sun, 18 Feb 2024 01:48:59 +0000 (09:48 +0800)]
Use "Safe" modifier for manually constructed safe HTML strings in templates (#29227)

Follow #29165. These HTML strings are safe to be rendered directly, to
avoid double-escaping.

7 months agoRemove jQuery from the repo release form (#29225)
Yarden Shoham [Sun, 18 Feb 2024 01:22:09 +0000 (03:22 +0200)]
Remove jQuery from the repo release form (#29225)

- Switched to plain JavaScript
- Tested the repo release form functionality and it works as before

# Demo using JavaScript without jQuery

![action](https://github.com/go-gitea/gitea/assets/20454870/ede2072a-823d-418f-9890-a5a7445a1cc6)

---------

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
7 months agoMake submit event code work with both jQuery event and native event (#29223)
wxiaoguang [Sat, 17 Feb 2024 20:48:10 +0000 (04:48 +0800)]
Make submit event code work with both jQuery event and native event (#29223)

Partially related to #29200 and fix other potential bugs.

Co-authored-by: Giteabot <teabot@gitea.io>
7 months agoRemove jQuery from repo migrate page (#29219)
Yarden Shoham [Sat, 17 Feb 2024 20:07:47 +0000 (22:07 +0200)]
Remove jQuery from repo migrate page (#29219)

- Switched to plain JavaScript
- Tested the repo migrate functionality and it works as before

# Demo using JavaScript without jQuery

![action](https://github.com/go-gitea/gitea/assets/20454870/44ad134b-832e-44b8-8e77-7cc8603d95fe)

---------

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: silverwind <me@silverwind.io>
7 months agoRemove unneccesary `initUserAuthLinkAccountView` from "link account" page (#29217)
Yarden Shoham [Sat, 17 Feb 2024 17:51:35 +0000 (19:51 +0200)]
Remove unneccesary `initUserAuthLinkAccountView` from "link account" page (#29217)

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
7 months agoFix labels referencing the wrong ID in the user profile settings (#29199)
Yarden Shoham [Sat, 17 Feb 2024 15:01:25 +0000 (17:01 +0200)]
Fix labels referencing the wrong ID in the user profile settings (#29199)

2 instances of `for` with a wrong value and 1 `for` that had a reference
to a `name` instead of `id`.

---------

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
7 months agoFix label `for` pointing to a `name` instead of `id` in webhook settings (#29209)
Yarden Shoham [Sat, 17 Feb 2024 14:32:43 +0000 (16:32 +0200)]
Fix label `for` pointing to a `name` instead of `id` in webhook settings (#29209)

Here's the spec for the `for` attribute:
https://html.spec.whatwg.org/multipage/forms.html#attr-label-for

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
7 months agoLoad outdated comments when (un)resolving conversation on PR timeline (#29203)
Jimmy Praet [Sat, 17 Feb 2024 14:07:56 +0000 (15:07 +0100)]
Load outdated comments when (un)resolving conversation on PR timeline (#29203)

Relates to #28654, #29039 and #29050.

The "show outdated comments" flag should only apply to the file diff
view.
On the PR timeline, outdated comments are always shown.
So they should also be loaded when (un)resolving a conversation on the
timeline page.

7 months agoFix missing template for follow button in organization (#29215)
Yarden Shoham [Sat, 17 Feb 2024 13:42:52 +0000 (15:42 +0200)]
Fix missing template for follow button in organization (#29215)

Leftover from https://github.com/go-gitea/gitea/pull/29005

# Before

![before](https://github.com/go-gitea/gitea/assets/20454870/24c74278-ccac-4dc6-bf26-713e90c07239)

# After

![after](https://github.com/go-gitea/gitea/assets/20454870/f91d503b-87d4-4c17-a56c-9c0a81fd9082)

---------

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
7 months agoEnable markdownlint `no-trailing-punctuation` and `no-blanks-blockquote` (#29214)
silverwind [Sat, 17 Feb 2024 13:18:05 +0000 (14:18 +0100)]
Enable markdownlint `no-trailing-punctuation` and `no-blanks-blockquote` (#29214)

Enable these two and fix issues.