wxiaoguang
effb405cae
Always load or generate oauth2 jwt secret ( #30942 )
...
Fix #30923
2024-05-14 14:21:38 +00:00
wxiaoguang
f4f4e18b14
Filter out duplicate action(activity) items for a repository ( #30957 )
...
Fix #20986
2024-05-14 13:47:03 +00:00
wxiaoguang and silverwind
080486e47d
Fix some UI regressions for commit list ( #30920 )
...
Close #30919
---------
Co-authored-by: silverwind <me@silverwind.io >
2024-05-10 12:58:05 +00:00
7424f27cf3
Check if reverse proxy is correctly configured ( #30890 )
...
Follow #27011
Follow #30885
---------
Co-authored-by: silverwind <me@silverwind.io >
Co-authored-by: Giteabot <teabot@gitea.io >
2024-05-10 20:07:01 +08:00
wxiaoguang
ed0fc2729e
Add missing menu active item background back ( #30897 )
...
Fix #30578
2024-05-08 23:01:25 +00:00
wxiaoguang
3fdb2d4ad8
Fix incorrect issue form ( #30881 )
...
Fix #30864
2024-05-08 15:39:13 +00:00
wxiaoguang and KN4CK3R
67c1a07285
Refactor AppURL usage ( #30885 )
...
Fix #30883
Fix #29591
---------
Co-authored-by: KN4CK3R <admin@oldschoolhack.me >
2024-05-07 08:26:13 +00:00
wxiaoguang
9c08637eae
Make "sync branch" also sync object format and add tests ( #30878 )
2024-05-06 17:02:30 +00:00
wxiaoguang
7c613f100e
Make sure git version&feature are always prepared ( #30877 )
...
Otherwise there would be more similar issues like #29287
2024-05-06 18:34:16 +02:00
wxiaoguang
eda10cc2bb
Fix some UI problems (dropdown/container) ( #30849 )
...
Follow #30345
Follow #30547
`ellipsis` / `white-space` shouldn't be put on the general dropdown components.
2024-05-06 07:17:22 +00:00
wxiaoguang
ce8b11ae13
Fix some UI problems (install/checkbox) ( #30854 )
...
Fix the space between the box and label for checkboxes, and fix incorrect usages in "repo-issue.js"
2024-05-06 06:32:05 +00:00
wxiaoguang
982b20d259
Do not show monaco JS errors ( #30862 )
...
Fix #30861
2024-05-05 16:34:13 +00:00
wxiaoguang
5c236bd4c0
Fix issue/PR title edit ( #30858 )
...
1. "enter" doesn't work (I think it is the last enter support for #14843 )
2. if a branch name contains something like `&`, then the branch selector doesn't update
2024-05-05 13:09:41 +00:00
wxiaoguang
c7bb3aa034
Fix markdown URL parsing for commit ID ( #30812 )
2024-05-04 09:48:16 +08:00
wxiaoguang
0f3e717a1a
Improve grep search ( #30843 )
...
Reduce the context line number to 1, make "git grep" search respect the
include/exclude patter, and fix #30785
2024-05-03 09:13:48 +00:00
wxiaoguang
53b55223d1
Ignore useless error message "broken pipe" ( #30801 )
...
Fix #30792
2024-05-03 02:39:36 +00:00
wxiaoguang
677032d36a
Fix incorrect message id for releaes email ( #30825 )
...
Make generateMessageIDForRelease outputs the same format as
generateMessageIDForIssue (old `createReference`)
2024-05-02 15:24:21 +00:00
wxiaoguang and silverwind
eb8bb82e58
Fix activity heat map padding & locale ( #30823 )
...
Fix #30808
---------
Co-authored-by: silverwind <me@silverwind.io >
2024-05-02 13:22:55 +00:00
wxiaoguang
6ff2acc52c
Fix issue card layout ( #30800 )
...
Fix #30788
2024-05-02 11:19:44 +00:00
wxiaoguang
ebe6f4cad7
Fix branch selector UI ( #30803 )
...
Fix #30802
2024-05-02 10:45:23 +00:00
wxiaoguang and silverwind
be112c1fc3
Skip gzip for some well-known compressed file types ( #30796 )
...
Co-authored-by: silverwind <me@silverwind.io >
2024-05-02 02:27:25 +00:00
wxiaoguang
ce08a9fe2f
Fix markdown rendering when mentioning users ( #30795 )
2024-05-02 01:00:46 +00:00
wxiaoguang
6f7cd94a02
Fix bleve fuzziness ( #30799 )
...
Fix #30797
Fix #30317
2024-05-01 15:32:52 +03:00
wxiaoguang
a988237eb4
Improve logout from worker ( #30775 )
...
A quick fix for #30756
2024-04-30 15:35:42 +00:00
wxiaoguang
5f05e7b41a
Fix dashboard commit status null access ( #30771 )
...
Fix #30768
2024-04-30 12:39:36 +00:00
wxiaoguang
059b2718a5
Right align the "Settings" menu item in overflow-menu ( #30764 )
...
I guess there could be enough people liking to make the Settings menu
item right aligned. As a site admin, I found it's easier to find the
right-aligned Settings menu item.
Tested with various sizes:



2024-04-30 04:26:13 +00:00
wxiaoguang
61b495e5ab
Fix issue label rendering in the issue popup ( #30763 )
2024-04-30 02:36:32 +00:00
wxiaoguang
4daea7c603
Rename CodeIndexerEnabled to IsRepoIndexerEnabled ( #30762 )
...
Fix #30761
Most places use `IsRepoIndexerEnabled` but not `CodeIndexerEnabled`, so
it should always use `IsRepoIndexerEnabled` for consistency.
2024-04-29 20:15:35 +00:00
wxiaoguang
8de2992ffb
Make Ctrl+Enter work for issue/comment edit ( #30720 )
...
Fix #30710
2024-04-27 14:32:00 +00:00
wxiaoguang
6d2a307ad8
Rename migration package name for 1.22-rc1 ( #30730 )
...
Ref: Propose to restart 1.22 release #30501
2024-04-27 14:02:07 +00:00
wxiaoguang
d3cdef88ad
Add some tests to clarify the "must-change-password" behavior ( #30693 )
...
Follow #30472 :
When a user is created by command line `./gitea admin user create`:
Old behavior before #30472 : the first user (admin or non-admin) doesn't
need to change password.
Revert to the old behavior before #30472
2024-04-27 12:23:37 +00:00
wxiaoguang
993736d838
Fix code search input for different views ( #30678 )
...
Now only show the "code search" on the repo home page, because it only
does global search.
So do not show it when viewing file or directory to avoid misleading
users (it doesn't search in a directory)
2024-04-26 11:21:04 +00:00
wxiaoguang and Giteabot
cd70ab31cd
Fix incorrect object id hash function ( #30708 )
...
Great thanks to @oliverpool for figuring out the problem and proposing a
fix.
Regression of #28138
Incorrect hash causes the user's LFS files get all deleted when running
`doctor fix all`
(by the way, remove unused/non-standard comments)
Co-authored-by: Giteabot <teabot@gitea.io >
2024-04-26 09:49:48 +00:00
wxiaoguang
1e749b80d7
Add route handler info for debugging purpose ( #30705 )
...
Follow #30519
2024-04-26 09:09:49 +00:00
wxiaoguang
ed8c63cea3
Deduplicate lfs common code ( #30704 )
2024-04-26 02:53:30 +00:00
wxiaoguang
6a0750177f
Allow to save empty comment ( #30706 )
...
Fix #29986
2024-04-26 01:17:43 +00:00
wxiaoguang
fd63b96f6a
Refactor imagediff and fix regression bug ( #30694 )
...
Fix #30683
2024-04-25 21:01:38 +08:00
wxiaoguang
bffbbf5470
Improve oauth2 client "preferred username field" logic and the error handling ( #30622 )
...
Follow #30454
And fix #24957
When using "preferred_username", if no such field,
`extractUserNameFromOAuth2` (old `getUserName`) shouldn't return an
error. All other USERNAME options do not return such error.
And fine tune some logic and error messages, make code more stable and
more friendly to end users.
2024-04-25 11:22:32 +00:00
wxiaoguang
2ee93ea178
Avoid doubled border for the PR info segment ( #30663 )
2024-04-23 19:24:10 +00:00
wxiaoguang
b79e3db264
Initial support for colorblindness-friendly themes ( #30625 )
...
Initial support for #25680
This PR only adds some simple styles from GitHub, it is big enough and
it focuses on adding the necessary framework-level supports. More styles
could be fine-tuned later.
2024-04-24 00:18:41 +08:00
wxiaoguang
dd2aaadce3
Fix flash message for flex-container ( #30657 )
2024-04-23 08:31:51 +00:00
wxiaoguang
e6103955cc
Fix queue test ( #30646 )
...
Fix #30643
The old test code is not stable due to the data-race described in the
TODO added at that time.
Make it stable, and remove a debug-only field from old test code.
2024-04-22 23:55:43 +00:00
wxiaoguang
7cb88e9c18
Use correct hash for "git update-index" ( #30626 )
2024-04-22 00:13:44 +00:00
wxiaoguang
f4a1cf7eab
Fix repo home UI when there is no repo description ( #30552 )
...
Fix #30502 by a new approach.

2024-04-21 23:47:31 +00:00
wxiaoguang
1e4867730b
Fix dropdown text ellipsis ( #30628 )
...
Follow
https://github.com/go-gitea/gitea/pull/30547#discussion_r1573866519
Fix #30624
The Fomantic UI Dropdown wasn't designed to work that way, its "text"
element might contain images. So the "overflow" shouldn't be added to
any general dropdown text.

2024-04-21 23:14:33 +00:00
wxiaoguang
f95622cddc
Fix issue comment form and quick-submit ( #30623 )
...
1. Rewrite initGlobalEnterQuickSubmit (by the way, remove jQuery)
2. Fix issue comment form layout
2024-04-22 01:00:04 +08:00
wxiaoguang and Giteabot
48d4580dd5
Clarify permission "HasAccess" behavior ( #30585 )
...
Follow #30495
"HasAccess" behavior wasn't clear, to make it clear:
* Use a new name `HasAnyUnitAccess`, it will be easier to review related
code and permission problems.
* Separate everyone access mode to a separate field, then all calls to
HasAccess are reverted to old behavior before #30495 .
* Add new tests.
---------
Co-authored-by: Giteabot <teabot@gitea.io >
2024-04-20 03:15:04 +00:00
wxiaoguang and tdsds.com
89e39872ff
Fix links in PyPI Simple Repository API page ( #30594 )
...
Thanks to @Zottelchen for looking into problem and proposing the fix.
Ref: https://github.com/astral-sh/uv/issues/3017 ,
https://peps.python.org/pep-0503/
This PR's change is from Zottelchen's work.
And I by the way rename the `$p` to `$pd` because `p` is used as
"package" in code, while `pd` is used as "package description".
----
Co-authored-by: Zottelchen
2024-04-20 01:15:14 +00:00
wxiaoguang
53cf46cae7
Fix commit file status parser ( #30602 )
...
Try to fix #30492
2024-04-19 14:41:03 +00:00
wxiaoguang
f60e1a1af2
Fix HEAD method for robots.txt ( #30603 )
...
Fix #30601
2024-04-19 21:43:56 +08:00
wxiaoguang and Giteabot
eb24d973b0
Fix project description rendering for org ( #30587 )
...
Fix #30263

Co-authored-by: Giteabot <teabot@gitea.io >
2024-04-19 07:58:56 +00:00
wxiaoguang
fe82991547
Fix changelog (main) ( #30582 )
...
1. The 1.21.11 changelog is missing
2. Split the old content to CHANGELOG-archived.md, to reduce the size of
CHANGELOG.md
2024-04-19 06:08:30 +00:00
wxiaoguang
bcbeb24dba
Mock queue backoff duration ( #30553 )
...
During testing, the backoff duration shouldn't be longer than other
durations
2024-04-18 20:00:59 +00:00
wxiaoguang and Giteabot
d0e0708355
Refactor and fix archive link bug ( #30535 )
...
Regression of #29920
Fixes : #30569
Also this is a rewriting to eliminate the remaining jQuery usages from code.
Co-authored-by: Giteabot <teabot@gitea.io >
2024-04-19 00:45:50 +08:00
wxiaoguang
d1ba5f431b
Some following up changes for routes ( #30550 )
...
1. Switch back to the old order for `reqRepoAdmin, context.RepoRef()`
2. Add a routing function info for global NotFound
2024-04-18 09:36:19 +00:00
wxiaoguang
3feba9f1f4
Allow everyone to read or write a wiki by a repo unit setting ( #30495 )
...
Replace #6312
Help #5833
Wiki solution for #639
2024-04-17 15:58:37 +00:00
wxiaoguang and Giteabot
0798370f25
Correct locale string rendering ( #30522 )
...
Since #29165 , the translations are rendered as HTML in templates, so:
1. if the translation does contain `<>`, use `TrString`
2. use `{dummy}` instead of `<dummy>` as much as possible
Co-authored-by: Giteabot <teabot@gitea.io >
2024-04-17 10:24:08 +00:00
wxiaoguang and Giteabot
3e2e76e248
Refactor web routes ( #30519 )
...
Re-organize the routes in web.go and use ctx constants instead of `context.UnitTypes()`
---------
Co-authored-by: Giteabot <teabot@gitea.io >
2024-04-17 08:31:37 +00:00
wxiaoguang and silverwind
b84baf21fa
Improve flex ellipsis ( #30479 )
...

---------
Co-authored-by: silverwind <me@silverwind.io >
2024-04-14 21:43:30 +02:00
wxiaoguang and KN4CK3R
4c6e2da088
Improve "must-change-password" logic and document ( #30472 )
...
Unify the behaviors of "user create" and "user change-password".
Co-authored-by: KN4CK3R <admin@oldschoolhack.me >
2024-04-14 17:22:14 +00:00
wxiaoguang
18dd9f9a3f
Fix label rendering ( #30456 )
...
1. Check whether the label is for an issue or a pull request.
2. Don't use space to layout
3. Make sure the test strings have trailing spaces explicitly, to avoid
some IDE removing the trailing spaces automatically.
2024-04-13 10:05:33 +00:00
wxiaoguang
92e27e15c3
Add comment for ContainsRedirectURI about the exact match ( #30457 )
...
Close #26897
Replace #30336
2024-04-13 09:31:40 +00:00
wxiaoguang
c248f010ad
Refactor cache and disable go-chi cache ( #30417 )
...
use built-in cache package to wrap external go-chi cache package
2024-04-13 08:38:44 +00:00
wxiaoguang
f9fdac9809
Limit the max line length when parsing git grep output ( #30418 )
2024-04-12 03:36:34 +00:00
wxiaoguang
26ee66327f
Split issue edit code from repo-legacy.js into its own file ( #30419 )
...
Follow Split `index.js` to separate files (#17315 )
It's time to move some code away from the messy "legacy" file.
2024-04-12 02:22:59 +08:00
wxiaoguang
074a3e05f6
Fix oauth2 builtin application logic ( #30304 )
...
Fix #29074 (allow to disable all builtin apps) and don't make the doctor
command remove the builtin apps.
By the way, rename refobject and joincond to camel case.
2024-04-08 04:13:34 +00:00
wxiaoguang and Giteabot
83f83019ef
Clean up log messages ( #30313 )
...
`log.Xxx("%v")` is not ideal, this PR adds necessary context messages.
Remove some unnecessary logs.
Co-authored-by: Giteabot <teabot@gitea.io >
2024-04-07 19:17:06 +08:00
wxiaoguang
bbe5cd7c92
Refactor startup deprecation messages ( #30305 )
...
It doesn't change logic, it only does:
1. Rename the variable and function names
2. Use more consistent format when mentioning config section&key
3. Improve some messages
2024-04-07 01:11:25 +00:00
wxiaoguang
7396172a02
Fix code block style for code preview ( #30298 )
...
Fix #30292
To avoid unnecessary style overriding, use "div" instead of "code"
2024-04-06 20:07:08 +08:00
wxiaoguang
b2b49c9bde
Fix view commit link ( #30297 )
...
Fix #30098
2024-04-06 02:03:07 +08:00
wxiaoguang and Giteabot
654cfd1dfb
Refactor "dump" sub-command ( #30240 )
...
Major changes:
* Move some functions like "addReader" / "isSubDir" /
"addRecursiveExclude" to a separate package, and add tests
* Clarify the filename&dump type logic and add tests
* Clarify the logger behavior and remove FIXME comments
Co-authored-by: Giteabot <teabot@gitea.io >
2024-04-03 02:16:46 +00:00
wxiaoguang and silverwind
ca5c895efb
Render embedded code preview by permlink in markdown ( #30234 )
...
The permlink in markdown will be rendered as a code preview block, like GitHub
Co-authored-by: silverwind <me@silverwind.io >
2024-04-02 17:48:27 +00:00
wxiaoguang
0db554fa63
Refactor commit signature parser ( #30228 )
...
To make it more flexible and support SSH signature.
The existing tests are not changed, there are also tests covering
`parseTagRef` which also calls `parsePayloadSignature` now. Add some new
tests to `Test_parseTagData`
2024-04-01 20:23:17 +00:00
wxiaoguang
ca297a90fb
Refactor dropzone ( #30232 )
...
Simplify code and use `.files` elements
2024-04-02 02:16:38 +08:00
wxiaoguang
751997ad34
Refactor file view & render ( #30227 )
...
The old code is inconsistent and fragile, and the UI isn't right.
2024-04-01 21:11:30 +08:00
wxiaoguang
a008486f5c
Refactor DeleteInactiveUsers, fix bug and add tests ( #30206 )
...
1. check `IsActive` before calling `IsLastAdminUser`.
2. Fix some comments and error messages.
3. Don't `return err` if "removing file" fails in `DeleteUser`.
4. Remove incorrect `DeleteInactiveEmailAddresses`. Active users could
also have inactive emails, and inactive emails do not support
"olderThan"
5. Add tests
2024-04-01 02:06:35 +00:00
wxiaoguang
ab028356c7
Fix markdown color code detection ( #30208 )
...
When reviewing PRs, some color names might be mentioned, the
`transformCodeSpan` (which calls `css.ColorHandler`) considered it as a
valid color, but actually it shouldn't be rendered as a color codespan.
2024-03-31 19:17:34 +08:00
wxiaoguang
6d34ce25b1
Do not allow different storage configurations to point to the same directory ( #30169 )
...
Replace #29171
2024-03-31 03:03:24 +00:00
wxiaoguang
71706126b5
Refactor markdown render ( #30139 )
...
Only split the file into small ones (and rename AttentionTypes to
attentionTypes)
2024-03-28 02:26:13 +00:00
wxiaoguang and KN4CK3R
1ad48f781e
Relax generic package filename restrictions ( #30135 )
...
Now, the chars `=:;()[]{}~!@#$%^ &` are possible as well
Fixes #30134
---------
Co-authored-by: KN4CK3R <admin@oldschoolhack.me >
2024-03-27 16:55:05 +00:00
wxiaoguang
f1707f4562
Refactor render ( #30136 )
2024-03-27 13:14:34 +00:00
wxiaoguang
8e79aed573
Fix git grep search limit, add test ( #30071 )
...
Fix #30069
2024-03-25 21:25:22 +08:00
wxiaoguang and silverwind
4734d43e14
Support repo code search without setting up an indexer ( #29998 )
...
By using git's ability, end users (especially small instance users) do
not need to enable the indexer, they could also benefit from the code
searching feature.
Fix #29996


---------
Co-authored-by: silverwind <me@silverwind.io >
2024-03-24 17:05:00 +01:00
wxiaoguang
1cdc6c3a4e
Escape paths for find file correctly ( #30026 )
...
Fix #30020
2024-03-23 13:07:47 +00:00
wxiaoguang
2ff213bbc1
Refactor markdown attention render ( #29984 )
...
Follow #29833 and add tests
2024-03-22 12:16:23 +00:00
wxiaoguang
226231ea27
Fix some pending problems ( #29985 )
...
These changes are quite independent and trivial, so I don't want to open
too many PRs.
* https://github.com/go-gitea/gitea/pull/29882#discussion_r1529607091
* the `f.Close` should be called properly
* the error message could be more meaningful
(https://github.com/go-gitea/gitea/pull/29882#pullrequestreview-1942557935 )
*
https://github.com/go-gitea/gitea/pull/29859#pullrequestreview-1942324716
* the new translation strings don't take arguments
* https://github.com/go-gitea/gitea/pull/28710#discussion_r1443778807
* stale for long time
* #28140
* a form was forgotten to be changed to work with backend code
2024-03-22 19:17:30 +08:00
wxiaoguang
ca4107dc96
Refactor external URL detection ( #29973 )
...
Follow #29960 , `IsExternalURL` is not needed anymore.
Add some tests for `RedirectToCurrentSite`
2024-03-22 04:32:40 +08:00
wxiaoguang
bfa160fc98
Refactor repo header/list ( #29969 )
...
1. Use general "mobile-only" and "not-mobile" CSS styles, remove some`@media (max-width: 767.98px)` tricks
2. Use `CountFmt` for repo list, just like the repo header (and it matches GitHub, to avoid big numbers bloat the page)
2024-03-21 17:04:03 +00:00
wxiaoguang
cdb4d1a8db
Refactor StringsToInt64s ( #29967 )
...
And close #27176
2024-03-21 15:07:35 +00:00
wxiaoguang
01500957c2
Refactor URL detection ( #29960 )
...
"Redirect" functions should only redirect if the target is for current Gitea site.
2024-03-21 12:02:34 +00:00
wxiaoguang
21151474e3
Fix loadOneBranch panic ( #29938 )
...
Try to fix #29936
Far from ideal, but still better than panic.
2024-03-20 15:38:22 +00:00
wxiaoguang
bc55a80693
Fix comment review avatar alignment ( #29935 )
...
Fix #29934
2024-03-20 14:05:34 +00:00
wxiaoguang
91699a9bb1
Remove unnecessary ".Link" usages ( #29929 )
...
Follow #29909
2024-03-20 06:58:10 +00:00
wxiaoguang
4c476fa41d
Remove unnecessary ".Link" usages ( #29909 )
...
In HTML, `?key=val` already means "use the current link with new query parameters"
2024-03-20 13:56:42 +08:00
wxiaoguang
828701ff2d
Fix template error when comment review doesn't exist ( #29888 )
...
Fix #29885
2024-03-19 04:19:48 +00:00
wxiaoguang
b251e608c0
Only do counting when count_only=true for repo dashboard ( #29884 )
...
Ref: #29878
2024-03-18 11:05:17 +00:00
wxiaoguang
abb330e613
Upgrade Go 1.22 and upgrade dependency ( #29869 )
2024-03-17 15:40:05 +00:00
wxiaoguang
673286d8c8
Refactor clone-panel styles ( #29861 )
...
1. The borders were doubled on the "empty" page, fix it.
2. Remove unnecessary CSS classes like "clone", "compact", etc
3. Use CSS class "clone-panel" instead of ID "clone-panel"
4. Use `tw-flex-1` instead of `gt-f1`
5. Remove unnecessary ID "more-btn"
2024-03-17 12:40:42 +00:00
wxiaoguang
a889381664
Remove AddParamIfExist(AddParam) ( #29841 )
...
Follow #29834
Remove AddParamIfExist, use "AddParamString" instead, it should clearly
know what is being added into the parameters.
2024-03-16 12:07:56 +00:00
wxiaoguang
66902d89e5
Refactor markdown attention render ( #29833 )
...
* Remove some deadcode
* Use 2-word name for CSS class names
* Remove "gt-*" rules for sanitizer
The UI doesn't change much.
2024-03-16 11:34:38 +00:00