18623 Commits

Author SHA1 Message Date
RedCocoon
e3b51e8fae Fix conversation comment 2024-11-06 19:22:08 +08:00
RedCocoon
d9ef4e475e Update comment count correctly when adding/removing comments 2024-11-06 18:09:24 +08:00
RedCocoon
ac4152d465 Update conversation_comment.yml 2024-11-06 15:30:53 +08:00
RedCocoon
bedd7ec29a Add fixtures for conversation, comments, reactions 2024-11-06 15:20:33 +08:00
RedCocoon
0e10d6d7a4 Fix pull_review.go referring to the wrong template 2024-11-06 03:32:11 +08:00
RedCocoon
c1735ac2dc Merge remote-tracking branch 'upstream/main' 2024-11-06 03:01:09 +08:00
RedCocoon
3a8cade925 Update issue_header_comment.tmpl 2024-11-06 02:53:01 +08:00
RedCocoon
5ea9292ce0 Update issue header comment to use new time formatter 2024-11-06 02:48:45 +08:00
wxiaoguang
41b4ef825d
Use 8 as default value for git lfs concurrency (#32421)
Some checks failed
release-nightly / nightly-binary (push) Has been cancelled
release-nightly / nightly-docker-rootful (push) Has been cancelled
release-nightly / nightly-docker-rootless (push) Has been cancelled
2024-11-05 13:10:57 +00:00
Lunny Xiao
24b83ff63e
Fix milestone deadline and date related problems (#32339)
Use zero instead of 9999-12-31 for deadline
Fix #32291

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
2024-11-05 07:46:40 +00:00
Lunny Xiao
1887c75c35
Only query team tables if repository is under org when getting assignees (#32414)
It's unnecessary to query the team table if the repository is not under
organization when getting assignees.
2024-11-05 07:13:52 +00:00
wxiaoguang
61c35590c7
Refactor RepoRefByType (#32413)
Some checks are pending
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run
1. clarify the "filepath" could(should) contain "{ref}"
2. remove unclear RepoRefLegacy and RepoRefAny, use RepoRefUnknown to guess
3. by the way, avoid using AppURL
2024-11-05 06:35:54 +00:00
wxiaoguang
4a469c8e1b
Refactor template ctx and render utils (#32422)
Clean up the templates
2024-11-05 14:04:26 +08:00
RedCocoon
c7c1010077 Reapply "Merge remote-tracking branch 'upstream/main'"
This reverts commit a3e5eaf91727b68d8711cb4b32835450a47d8d65.
2024-11-05 01:38:44 +08:00
RedCocoon
19ba51f5e5 Change comment type 22 to refer to the correct template 2024-11-05 00:49:36 +08:00
RedCocoon
a3e5eaf917 Revert "Merge remote-tracking branch 'upstream/main'"
This reverts commit 2585c8b66a454252b0cf265d62f76c33839f6f2c, reversing
changes made to 8e012ebbb22b0468d746e31ad33463a71f0ef595.
2024-11-04 23:38:45 +08:00
RedCocoon
2585c8b66a Merge remote-tracking branch 'upstream/main' 2024-11-04 21:39:49 +08:00
RedCocoon
8e012ebbb2 add comments for testing conversation search 2024-11-04 20:37:52 +08:00
wxiaoguang
b068dbd40e
Refactor DateUtils and merge TimeSince (#32409)
Some checks are pending
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run
Follow #32383 and #32402
2024-11-04 11:30:00 +00:00
RedCocoon
5b9049dec0 Add ShouldShowCommentType function when rendering pull review conversation 2024-11-04 19:04:34 +08:00
wxiaoguang
61be51e56b
Refactor markup package (#32399)
To make the markup package easier to maintain:
1. Split some go files into small files
2. Use a shared util.NopCloser, remove duplicate code
3. Remove unused functions
2024-11-04 10:59:50 +00:00
wxiaoguang
af28ce59b8
Add some handy markdown editor features (#32400)
There were some missing features from EasyMDE:

1. H1 - H3 style
2. Auto add task list
3. Insert a table

And added some tests
2024-11-04 10:14:36 +00:00
RedCocoon
0d65d7140b Load issue attributes instead of only loading pullrequest details 2024-11-04 17:47:26 +08:00
RedCocoon
6f9647b2b9 Remove invalid options from conversation_stat.go 2024-11-04 17:13:02 +08:00
RedCocoon
b2a93cdda1 Remove unused data from indexer/search 2024-11-04 17:10:50 +08:00
RedCocoon
f2fc87b278 Load PR attachments before assigning value 2024-11-04 14:18:11 +08:00
Royce Remer
54146e62c0
Make LFS http_client parallel within a batch. (#32369)
Some checks are pending
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run
Signed-off-by: Royce Remer <royceremer@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-11-04 04:49:08 +00:00
RedCocoon
13e8d8488d Undo adding unnecessary ctx Data 2024-11-04 03:57:01 +08:00
RedCocoon
34c0068918 Update pull_review_test.go to add new data to ctx 2024-11-04 01:41:36 +08:00
RedCocoon
ed576c23fb Fix lint backend compliance issues 2024-11-04 00:50:34 +08:00
RedCocoon
8b68cc8f72 Fix warning lines and remove unused variables 2024-11-04 00:34:32 +08:00
RedCocoon
56fca5e557 Fix LoadPosters remove from conversation comment list 2024-11-04 00:28:28 +08:00
RedCocoon
2ba22a8a13 Merge remote-tracking branch 'upstream/main' 2024-11-04 00:24:17 +08:00
RedCocoon
3327b83b07 Merge branch 'main' of https://github.com/RedCocoon/gitea 2024-11-04 00:22:19 +08:00
RedCocoon
b1f07f2df0 Add unit test for comments 2024-11-04 00:22:11 +08:00
RedCocoon
5d7dcdf625 Add unit test for comments 2024-11-04 00:15:59 +08:00
RedCocoon
e344e371df Add unit test for conversations 2024-11-03 22:29:30 +08:00
wxiaoguang
f2a6df03d9
Refactor repo legacy (#32404)
Some checks failed
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run
cron-licenses / cron-licenses (push) Has been cancelled
Only move code, no unnecessary logic change. (There are many problems in
old code, but changing them is not in this PR's scope)

Co-authored-by: Giteabot <teabot@gitea.io>
2024-11-03 11:00:12 +00:00
wxiaoguang
259811617b
Replace DateTime with proper functions (#32402)
Some checks are pending
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run
Follow #32383

This PR cleans up the "Deadline" usages in templates, make them call
`ParseLegacy` first to get a `Time` struct then display by `DateUtils`.

Now it should be pretty clear how "deadline string" works, it makes it
possible to do further refactoring and correcting.
2024-11-02 21:04:53 +00:00
wxiaoguang
e524f63d58
Fix git error handling (#32401)
Some checks are pending
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run
2024-11-02 11:20:22 +00:00
Lunny Xiao
13a203828c
Fix created_unix for mirroring (#32342)
Fix #32233
2024-11-02 06:11:38 +00:00
wxiaoguang
fec6b3d500
Replace DateTime with DateUtils (#32383) 2024-11-02 04:08:28 +00:00
Rowan Bohde
7dcccc3bb1
improve performance of diffs (#32393)
Some checks are pending
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run
This has two major changes that significantly reduce the amount of work
done for large diffs:

* Kill a running git process when reaching the maximum number of files
in a diff, preventing it from processing the entire diff.
* When loading a diff with the URL param `file-only=true`, skip loading
stats. This speeds up loading both hidden files of a diff and sections
of a diff when clicking the "Show More" button.

A couple of minor things from profiling are also included:

* Reuse existing repo in `PrepareViewPullInfo` if head and base are the
same.

The performance impact is going to depend heavily on the individual diff
and the hardware it runs on, but when testing locally on a diff changing
100k+ lines over hundreds of files, I'm seeing a roughly 75% reduction
in time to load the result of "Show More"

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-11-02 11:29:37 +08:00
RedCocoon
933b4b4865 Add copyright information to reaction.go 2024-11-02 03:43:42 +08:00
RedCocoon
5a49efbd3e Update reaction.go to conform to lint revive 2024-11-02 03:21:39 +08:00
RedCocoon
98baaa2446 Consolidate reaction web/repo logic 2024-11-02 03:14:12 +08:00
RedCocoon
940fa351d9 Change v1_json.tmpl 2024-11-02 02:44:04 +08:00
RedCocoon
2084a7a5c4 Remove unneccessary api calls 2024-11-02 02:35:21 +08:00
RedCocoon
6976590c90 Update v1_json.tmpl 2024-11-02 00:41:48 +08:00
wxiaoguang
ec2d1593c2
Refactor tests to prevent from unnecessary preparations (#32398)
Some checks are pending
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run
2024-11-01 23:18:29 +08:00