e435b1900a
Refactor arch route handlers ( #32993 )
2024-12-28 03:31:46 +00:00
7bb7ba1b5b
Add show more
organizations icon in user's profile ( #32986 )
...
Close #32952
# ⚠️ Doc update is required


------
⚠️ This PR refuses to be cherry-picked by any forked projects without any
mentions.
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2024-12-27 02:49:50 +08:00
550abdbc24
Improve "ellipsis string" ( #32989 )
release-nightly / nightly-docker-rootful (push) Has been cancelled
release-nightly / nightly-docker-rootless (push) Has been cancelled
release-nightly / nightly-binary (push) Has been cancelled
cron-translations / crowdin-pull (push) Has been skipped
2024-12-26 14:19:35 +08:00
9bfa9f450d
Refactor "string truncate" ( #32984 )
2024-12-26 11:56:03 +08:00
594edad213
Do not render truncated links in markdown ( #32980 )
...
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
Fixes #31780
2024-12-26 00:33:55 +08:00
abaeae0b9c
Fix Azure blob object Seek
( #32974 )
...
This bug was found in a
[test](https://github.com/go-gitea/gitea/actions/runs/12464294025/job/34788152194?pr=32883#step:9:105 )
of #32883
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2024-12-25 04:54:52 +00:00
973363fec3
Fix maven pom inheritance ( #32943 )
...
Fix #30568
2024-12-25 04:28:37 +00:00
ca31d478ee
Refactor arch route handlers ( #32972 )
2024-12-25 04:03:14 +00:00
2a828e2798
Clarify path param naming ( #32969 )
...
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
In history (from some legacy frameworks), both `:name` and `name` are
supported as path path name, `:name` is an alias to `name`.
To make code consistent, now we should only use `name` but not `:name`.
Also added panic check in related functions to make sure the name won't
be abused in case some downstreams still use them.
2024-12-24 13:47:45 +00:00
b8b690feb9
Refactor getpatch/getdiff functions and remove unnecessary fallback ( #32817 )
...
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-translations / crowdin-pull (push) Has been skipped
Extract from #32786
`git diff a..b` is equal to `git diff a b` which is different from `git
diff a...b`. For pull request, we should always
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2024-12-24 14:29:34 +08:00
6d5aa9218e
Refactor request context ( #32956 )
...
Introduce RequestContext: is a short-lived context that is used to store
request-specific data.
RequestContext could be used to clean form tmp files, close context git
repo, and do some tracing in the future.
Then a lot of legacy code could be removed or improved. For example:
most `ctx.Repo.GitRepo.Close()` could be removed because the git repo
could be closed when the request is done.
2024-12-24 11:43:57 +08:00
781c6df40f
Add sub issue list support ( #32940 )
...
Just like GitHub, show issue icon/title when the issue number is in a list
2024-12-24 01:54:19 +00:00
bd5d1341d4
Fix commit range paging ( #32944 )
2024-12-23 07:07:12 +00:00
462ce31530
Fix repo avatar conflict ( #32958 )
...
Continue even if the avatar deleting fails
2024-12-23 02:52:25 +00:00
fb75151fb1
fix trailing comma not matched in the case of alphanumeric issue ( #32945 )
...
Fix #32428 .
Patch the regex to match `,`besides `.` `"` `'` `:` and space.
2024-12-22 21:32:28 +00:00
a163c53a60
Refactor template & test related code ( #32938 )
...
Move some legacy code from "base" package to proper packages.
2024-12-22 15:33:19 +00:00
23687a0a71
Update i18n.go - Language Picker ( #32933 )
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-translations / crowdin-pull (push) Has been skipped
2024-12-21 04:56:08 +00:00
751fe8b714
Move some errors to their own sub packages ( #32880 )
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-12-20 18:05:29 +00:00
52b319bc00
Refactor pprof labels and process desc ( #32909 )
...
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-translations / crowdin-pull (push) Has been skipped
* Deprecate "gopid" in log, it is not useful and requires very hacky
approach
* Remove "git.Command.SetDescription" because it is not useful and only
makes the logs too flexible
2024-12-20 12:17:14 +08:00
626b27bea5
Update go tool dependencies ( #32916 )
...
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
Update all go tool dependencies to latest version. WIP because I think
there are new gopls errors, would like to confirm them on CI first. Here
is from a local run:
```
modules/markup/markdown/goldmark.go:115:37-53: unnecessary type arguments
modules/markup/html.go:45:32-49: unnecessary type arguments
modules/markup/internal/renderinternal.go:20:33-49: unnecessary type arguments
modules/markup/common/linkify.go:27:32-49: unnecessary type arguments
modules/util/time_str.go:28:39-63: unnecessary type arguments
routers/web/repo/pull.go:704:19: impossible condition: non-nil == nil
modules/util/util_test.go:248:14-23: unused parameter: other
```
~~Backport because the `gxz` update might have security benefits.~~
2024-12-19 19:17:55 +01:00
581e52b3e7
Relax the version checking for Arch packages ( #32908 )
...
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-translations / crowdin-pull (push) Has been skipped
It is mentioned in https://man.archlinux.org/man/PKGBUILD.5 : 'The
variable is not allowed to contain colons, forward slashes, hyphens, or
whitespace.'
`_` is also an allowed character, and some software in the Arch Linux
AUR uses this naming convention.
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2024-12-19 09:41:23 +00:00
2beaedc417
Fix Arch package metadata introduced incorrect field ( #32881 )
...
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-translations / crowdin-pull (push) Has been skipped
Incorrect content was introduced while generating the index, which has
now been removed, and the missing fields have been added.

2024-12-18 15:25:05 +08:00
b945742293
Change pprof labels to be prometheus compatible ( #32865 )
...
Enables scrapping pprof endpoint for continuous profiling
Closes: https://github.com/go-gitea/gitea/issues/32854
2024-12-18 11:08:04 +08:00
2d7e6e9482
Fix various trivial problems ( #32861 )
...
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-translations / crowdin-pull (push) Has been skipped
1. add/improve comments to help future readers could understand the
problem more easily.
2. add an error log to LDAP with username fallback
3. use `or` instead of `Iif` for "repo/branch_dropdown" (`Iif` was a
mistake, but it doesn't really affect the UI)
4. add `tw-font-mono` style to container digest to match dockerhub
5. fix a bug in RepoBranchTagSelector: the form is not updated when
there is no click to an item
---------
Co-authored-by: delvh <dev.lh@web.de >
2024-12-17 01:15:18 +00:00
276f43330c
Do not display attestation-manifest
and use short sha256 instead of full sha256 ( #32851 )
...
Related: #24973
Before:

After:

Index:
```json
{
"schemaVersion": 2,
"mediaType": "application/vnd.oci.image.index.v1+json",
"manifests": [
{
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"digest": "sha256:5967afffdfde104ca1459286a72346baaef8b70ac153325d7a6cd85c7734ac6e",
"size": 672,
"platform": {
"architecture": "amd64",
"os": "linux"
}
},
{
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"digest": "sha256:f9abfcc55320f9ff1f38eeb7dbb4bea10b29c7febfa49ccd7aab9fa02403b9f0",
"size": 672,
"platform": {
"architecture": "arm64",
"os": "linux"
}
},
{
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"digest": "sha256:d70ad19d00c19e40691045cbddc3e8a5a4454c31cc454d1132b13bcaf35b6d46",
"size": 566,
"annotations": {
"vnd.docker.reference.digest": "sha256:5967afffdfde104ca1459286a72346baaef8b70ac153325d7a6cd85c7734ac6e",
"vnd.docker.reference.type": "attestation-manifest"
},
"platform": {
"architecture": "unknown",
"os": "unknown"
}
},
{
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"digest": "sha256:73bc233bf4eac96a404ce3e0430b698831a4ea7050c878d5f76d1d1f133751dd",
"size": 566,
"annotations": {
"vnd.docker.reference.digest": "sha256:f9abfcc55320f9ff1f38eeb7dbb4bea10b29c7febfa49ccd7aab9fa02403b9f0",
"vnd.docker.reference.type": "attestation-manifest"
},
"platform": {
"architecture": "unknown",
"os": "unknown"
}
}
]
}
```
---------
Co-authored-by: silverwind <me@silverwind.io >
2024-12-16 10:22:49 +08:00
33e8e82c4b
Enable tenv and testifylint rules ( #32852 )
...
Enables tenv and testifylint linters
closes: https://github.com/go-gitea/gitea/issues/32842
2024-12-15 10:41:29 +00:00
d1c1e3cbcc
Fine tune ssh related comments and code ( #32846 )
...
Add more comments to explain the ssh problem,
and rename `sshConn` to `sshSession`
2024-12-15 06:07:50 +00:00
1cfb718976
Update golangci-lint to v1.62.2, fix issues ( #32845 )
...
Update it and fix new issues related to `redefines-builtin-id`
2024-12-15 02:31:07 +00:00
7616aeb2ea
In some lfs server implementations, they require the ref attribute. ( #32838 )
...
Fix : #32611
In some lfs server implementations, they require the ref attribute.
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2024-12-15 02:06:21 +00:00
cc5ff98e0d
Refactor markdown math render ( #32831 )
...
Add more tests
2024-12-14 13:43:05 +08:00
82c59d52ea
Add User-Agent for gitea's self-implemented lfs client. ( #32832 )
2024-12-14 03:35:19 +00:00
a66c16dc1b
Allow to fork repository into the same owner ( #32819 )
...
This feature is experimental, not fully tested, and may be changed in
the future.
It is only designed for users who really need it: set
`[repository].ALLOW_FORK_INTO_SAME_OWNER=true` in your app.ini
Doc: https://gitea.com/gitea/docs/pulls/122

2024-12-14 09:39:05 +08:00
5bc030efa2
Fix various UI bugs ( #32821 )
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-translations / crowdin-pull (push) Has been skipped
2024-12-13 01:45:32 -05:00
2910f384d5
Fix misuse of PublicKeyCallback ( #32810 )
...
Only upgrading the ssh package is not enough.
2024-12-13 03:57:37 +00:00
0b8a8941a0
Fix lfs migration ( #32812 )
...
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
Fix : #32803
2024-12-12 21:36:39 +00:00
22bf2ca6ba
Make API "compare" accept commit IDs ( #32801 )
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Failing after 5m31s
release-nightly / nightly-docker-rootless (push) Failing after 5m31s
2024-12-12 08:10:09 +00:00
01b1896bf5
Implement update branch API ( #32433 )
...
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Failing after 5m28s
release-nightly / nightly-docker-rootless (push) Failing after 5m26s
cron-translations / crowdin-pull (push) Has been skipped
Resolves #22526 .
Builds upon #23061 .
---------
Co-authored-by: sillyguodong <33891828+sillyguodong@users.noreply.github.com >
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2024-12-12 05:02:35 +00:00
d43620e7bc
Add is_archived
option for issue indexer ( #32735 )
...
Try to fix #32697
Reason:
`is_archived` is already defined in the query options, but it is not
implemented in the indexer.
2024-12-12 07:33:31 +08:00
e619384098
Add label/author/assignee filters to the user/org home issue list ( #32779 )
...
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Failing after 5m28s
release-nightly / nightly-docker-rootless (push) Failing after 5m29s
cron-translations / crowdin-pull (push) Has been skipped
Replace #26661 , fix #25979
Not perfect, but usable and much better than before. Since it is quite
complex, I am not quite sure whether there would be any regression, if
any, I will fix in first time.
I have tested the related pages many times: issue list, milestone issue
list, project view, user issue list, org issue list.
2024-12-11 06:33:24 +00:00
fbe6d9dc6b
Use batch database operations instead of one by one to optimze api pulls ( #32680 )
...
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Failing after 5m31s
release-nightly / nightly-docker-rootless (push) Failing after 5m27s
Resolve #31492
The response time for the Pull Requests API has improved significantly,
dropping from over `2000ms` to about `350ms` on my local machine. It's
about `6` times faster.
A key area for further optimization lies in batch-fetching data for
`apiPullRequest.ChangedFiles, apiPullRequest.Additions, and
apiPullRequest.Deletions`.
Tests `TestAPIViewPulls` does exist and new tests added.
- This PR also fixes some bugs in `GetDiff` functions.
- This PR also fixes data inconsistent in test data. For a pull request,
the head branch's reference should be equal to the reference in
`pull/xxx/head`.
2024-12-11 05:15:06 +08:00
90d20be541
Refactor issue filter (labels, poster, assignee) ( #32771 )
...
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Failing after 5m29s
release-nightly / nightly-docker-rootless (push) Failing after 5m26s
Rewrite a lot of legacy strange code, remove duplicate code, remove
jquery, and make these filters reusable.
Let's forget the old code, new code affects:
* issue list open/close switch
* issue list filter (label, author, assignee)
* milestone list open/close switch
* milestone issue list filter (label, author, assignee)
* project view (label, assignee)
2024-12-10 11:38:22 +08:00
5675efb3e0
Fix duplicate dropdown dividers ( #32760 )
...
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Failing after 5m34s
release-nightly / nightly-docker-rootless (push) Failing after 5m26s
cron-translations / crowdin-pull (push) Has been skipped
Fix #27466
The problem is that any item in the menu could be hidden, pure CSS won't
work, and dropdown's builtin "hideDividers" doesn't work with our "scope
dividers". The newly introduced "archived" label makes the dividers
regression more.
2024-12-09 07:54:59 +00:00
23471e1333
Refactor issue list ( #32755 )
...
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Failing after 5m28s
release-nightly / nightly-docker-rootless (push) Failing after 5m24s
cron-translations / crowdin-pull (push) Has been skipped
cron-licenses / cron-licenses (push) Has been skipped
1. add backend support for filtering "poster" and "assignee"
* due to the limits, there is no frontend support at the moment
2. rewrite TS code without jquery, now there are 14 jQuery files left:
2024-12-08 20:44:17 +08:00
513da407f4
Support "merge upstream branch" (Sync fork) ( #32741 )
...
Add basic "sync fork" support (GitHub-like)
<details>

</details>
2024-12-06 21:10:35 +00:00
3c4a06273f
Refactor markdown render ( #32736 )
...
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Failing after 5m28s
release-nightly / nightly-docker-rootless (push) Failing after 5m27s
cron-translations / crowdin-pull (push) Has been skipped
and add some tests
2024-12-06 20:00:24 +08:00
0f18046df4
Refactor markdown render ( #32728 )
...
Follow up recent render system refactoring PRs (split test code), and
fine tune the math render (added some new cases)
2024-12-06 04:29:09 +00:00
936665bf85
Issue time estimate, meaningful time tracking ( #23113 )
...
Redesign the time tracker side bar, and add "time estimate" support (in "1d 2m" format)
Closes #23112
---------
Co-authored-by: stuzer05 <stuzer05@gmail.com >
Co-authored-by: Yarden Shoham <hrsi88@gmail.com >
Co-authored-by: silverwind <me@silverwind.io >
Co-authored-by: 6543 <6543@obermui.de >
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2024-12-05 13:07:53 +00:00
0c3c041c88
Add Arch package registry ( #32692 )
...
Close #25037
Close #31037
This PR adds a Arch package registry usable with pacman.

Rewrite of #25396 and #31037 . You can follow [this
tutorial](https://wiki.archlinux.org/title/Creating_packages ) to build a
package for testing.
Docs PR: https://gitea.com/gitea/docs/pulls/111
Co-authored-by: [d1nch8g@ion.lc ](mailto:d1nch8g@ion.lc )
Co-authored-by: @ExplodingDragon
---------
Co-authored-by: dancheg97 <dancheg97@fmnx.su >
Co-authored-by: dragon <ExplodingFKL@gmail.com >
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2024-12-04 23:09:07 +00:00
5dda9510f4
Fix gogit GetRefCommitID
( #32705 )
2024-12-03 23:30:46 -08:00
c9e582c6b6
Refactor markdown editor and use it for milestone description editor ( #32688 )
...
Refactor markdown editor to clarify its "preview" behavior and remove
jQuery code.
Close #15045
---------
Co-authored-by: silverwind <me@silverwind.io >
2024-12-04 02:11:34 +00:00