Commit Graph
20283 Commits
Author SHA1 Message Date
DmitryFrolovTri b81fe08e0b Updated migrations to follow standard naming 2025-12-18 20:12:38 +00:00
silverwindandGitHub 521d277e41 Update templates/repo/settings/options.tmpl
Signed-off-by: silverwind <me@silverwind.io>
2025-12-18 20:51:55 +01:00
silverwindandGitHub 4c5967c352 Update templates/repo/settings/options.tmpl
Signed-off-by: silverwind <me@silverwind.io>
2025-12-18 20:51:46 +01:00
DmitryFrolovTri 243c16d759 Merge remote-tracking branch 'upstream/main' into limit-repo-size 2025-12-18 19:42:45 +00:00
silverwindandGitHub e0214ab841 Enable dependabot for actions (#36191)
Enable dependabot for actions only. These should always be safe to
update as long as CI passes and some of them are lagging behind.
2025-12-18 20:12:29 +01:00
DmitryFrolovTri 624fe24693 refactor to remove ENABLE_SIZE_LIMIT option and replace it with -1 in the config. 2025-12-18 19:06:11 +00:00
DmitryFrolovTri 4ef0f996b3 LFSSize and related features 2025-12-18 12:52:27 +00:00
silverwindandGitHub b671d507e3 Bump alpine to 3.23 (#36185) 2025-12-18 00:11:59 -05:00
3e566172f5 Use gitRepo as parameter instead of repopath when invoking sign functions (#36162)
Co-authored-by: Giteabot <teabot@gitea.io>
2025-12-17 21:55:08 +00:00
Lunny XiaoandGitHub efd5dd4f0b Fix bug when creating pull request (#36166)
Extract from #36105 

Fix #36116
Fix #35912
Fix #20906
2025-12-17 21:21:04 +00:00
1e22bd712f Bump golangci-lint to 2.7.2, enable modernize stringsbuilder (#36180)
Fixes were done automatically by `make lint-go-fix`. These modernize
fixes are very readable.

Co-authored-by: Giteabot <teabot@gitea.io>
2025-12-17 20:50:53 +00:00
Lunny XiaoandGitHub ebf9b4dc6b Use a migration test instead of a wrong test which populated the meta test repositories and fix a migration bug (#36160)
The test `TestGiteaUploadUpdateGitForPullRequest` modified the shared
meta test repositories directly, so this PR removes that test and
replaces it with an integration test that migrates a real repository
from gitea.com into a local test instance.

This PR also fixes a bug where pull-request migrations were not
correctly syncing head branches to the database.
2025-12-17 12:00:07 -08:00
silverwindandGitHub ad49b7bf31 Update JS deps and eslint enhancements (#36147)
- Update all JS deps
- Tested affected `dependencies`
- Replace eslint `unstable_native_nodejs_ts_config` with optional `jiti`
dependency. This will be more compatible with editor integrations that
may not pass this flag.
- Enable additional eslint rules, no new issues
- Move `typescript` to `devDependencies` because `make frontend` works
without it
2025-12-17 17:35:33 +00:00
silverwindandGitHub 852bf5e2a5 Add git.DIFF_RENAME_SIMILARITY_THRESHOLD option (#36164)
Make the threshold value passed to `git diff --find-renames` configurable
2025-12-17 10:02:32 +00:00
wxiaoguangandGitHub eaa47c3e09 Fix OrgAssignment opts (#36174)
Fix #36084
2025-12-17 17:19:22 +08:00
0e916c67cc Automatic generation of release notes (#35977)
Similar to GitHub, release notes can now be generated automatically.
The generator is server-side and gathers the merged PRs and contributors
and returns the corresponding Markdown text.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-12-17 02:01:19 +00:00
Sebastian ErtzandGitHub 14911d4293 Update chroma to v2.21.0 (#36171)
https://github.com/alecthomas/chroma/releases/tag/v2.21.0
2025-12-17 01:07:44 +00:00
GiteaBot d19db18ee7 [skip ci] Updated translations via Crowdin 2025-12-17 00:37:08 +00:00
Lunny XiaoandGitHub 4c67aac23b Move blame to gitrepo (#36161) 2025-12-16 16:14:14 -08:00
84b74d7c3e Enable bodyclose linter (#36168)
Enabe
[`bodyclose`](https://golangci-lint.run/docs/linters/configuration/#bodyclose).
The only issue in non-test code (`services/migrations/dump.go`) was a
false-positive and I think there are a number of undetected cases, but I
guess it's still better than not having it.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2025-12-16 14:08:43 +01:00
TheFox0x7andGitHub 3bb0770160 fix nilnil in onedev downloader (#36154)
onedev migration never used the migration transport, it now uses it the
same way gogs one does

---

cuts 3 nilnils for https://github.com/go-gitea/gitea/issues/36152
2025-12-16 02:16:58 +00:00
822ee60bae fix webAuthn insecure error view (#36165)
as you seen, in cureent status `initUserAuthWebAuthn` will prcheck
`window.isSecureContext`, if not ok, will hide the `passkey` btton and
return directly. I think it's not right, first, not show any error
message looks not a good ui, and it's looks will make an empty container
was show if the registion button was disabled also (maybe f-i-x #36115),
then initUserAuthWebAuthn has `window.isSecureContext` check also which
looks duplcate ref:

https://github.com/go-gitea/gitea/blob/26602fd2070886a1e7e0545f11f5541a38396003/web_src/js/features/user-auth-webauthn.ts#L202-L206

so I'd like move hideElem(elSignInPasskeyBtn); to
`detectWebAuthnSupport` failed routs to make it simple and show insecure
error corectly.

![联想截图_20251215184757](https://github.com/user-attachments/assets/0eff43a0-18a6-4978-aa27-b4574fcf2601)

Signed-off-by: a1012112796 <1012112796@qq.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2025-12-15 21:03:52 +01:00
Lunny XiaoandGitHub da087270ff Some small refactors (#36163) 2025-12-15 11:55:44 -08:00
26602fd207 Remove undocumented support of signing key in the repository git configuration file (#36143)
Per-repository signing keys have never been officially supported, as
they would require users to modify the repository’s config file.

At this point, it is clear that only global signing keys (GPG or SSH)
should be allowed. If we want to introduce per-repository signing keys
in the future, it will require a complete design proposal.

The endpoint will not be removed for repository special signing key, but
it will reference the global signing key.

---------

Signed-off-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: delvh <dev.lh@web.de>
2025-12-14 17:34:45 +00:00
silverwindandGitHub ff70ed6c67 Enable gocheckcompilerdirectives linter (#36156)
Enable
[`gocheckcompilerdirectives`](https://github.com/leighmcculloch/gocheckcompilerdirectives)
to validate compiler directives, no current violation.
2025-12-14 13:35:19 +00:00
wxiaoguangandGitHub 7190519fb3 Fix code highlighting on blame page (#36157)
1. Full file highlighting (fix the legacy todo "we should instead
highlight the whole file at once")
    * Fix #24383
2. Correctly covert file content encoding
3. Remove dead code, split large for-loop into small functions/blocks to
make code maintainable
2025-12-14 12:40:55 +02:00
Lunny XiaoandGitHub 1f5237e0d7 Check user visibility when redirecting to a renamed user (#36148)
Fix #34169
2025-12-14 03:14:18 +01:00
29057ea55f Fix bug when viewing the commit diff page with non-ANSI files (#36149)
Fix #35504

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-12-13 21:54:03 +08:00
silverwindandGitHub ac8308b5cb Refactor FileTreeItem type (#36137) 2025-12-13 13:03:51 +00:00
wxiaoguangandGitHub 1e72b15639 Fix various bugs (#36139)
* Fix #35768
* Fix #36064
* Fix #36051
* Fix cherry-pick panic
2025-12-12 18:56:05 +00:00
silverwindandGitHub 3102c04c1e Fix issue close timeline icon (#36138)
Previously there was a icon mismatch between a issue's label and the
timeline close event icon
2025-12-12 18:12:35 +00:00
DmitryFrolovTri 17ef999f58 Merge remote-tracking branch 'upstream/main' into limit-repo-size 2025-12-12 18:07:11 +00:00
silverwindandGitHub 3e57ba5b36 Add permissions tofiles-changed jobs (#36142)
Followup to https://github.com/go-gitea/gitea/pull/36140.
`files-changed` is a job that imports another workflow via `uses`
statement but CodeQL still complains about lack of permissions on these
jobs, so add it. This will fix the remaining [3 CodeQL
issues](https://github.com/go-gitea/gitea/security/code-scanning?query=is%3Aopen+branch%3Amain+permissions).
2025-12-12 18:38:59 +01:00
silverwindandGitHub 4c06c98dda Add explicit permissions to all actions workflows (#36140)
Explicitely specify all workflow
[`permissions`](https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#permissions).
This will fix [26 CodeQL
alerts](https://github.com/go-gitea/gitea/security/code-scanning?query=permissions+is%3Aopen+branch%3Amain+).
2025-12-12 16:48:29 +00:00
silverwindandGitHub 87b855bd15 Bump actions/checkout to v6 (#36136)
https://github.com/actions/checkout#checkout-v6

Result of `perl -p -i -e
's#actions\/checkout\@v5#actions/checkout\@v6#g' .github/workflows/*`
2025-12-12 16:44:53 +01:00
DmitryFrolovTri 4bda9b8d91 refactor repo settings for LimitSize and new gitea, size can be entered in XX YY where YY is the MiB MB etc 2025-12-12 15:21:24 +00:00
DmitryFrolovTri 56d388e111 refactor messages and admin settings to latest gitea 2025-12-12 15:19:57 +00:00
906adff0c1 Hide RSS icon when viewing a file not under a branch (#36135)
Fix #35855

Co-authored-by: Giteabot <teabot@gitea.io>
2025-12-12 10:26:15 +01:00
4cbcb91b7b Fix SVG size calulation, only use style attribute (#36133)
Fixes: https://github.com/go-gitea/gitea/issues/35863

The old code had a conflict between using HTML attributes vs. style
properties where the style was overriding the previously set HTML
attributes:

```html
<img width="300" height="277.02439470988946" style="width: 275px; height: 0px;">
```

I made it so in all cases only `style` properties are used and the
previous width/height values are now set via `style`. Also I did a
number of much-needed typescript improvements to the file.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-12-12 09:39:02 +02:00
junoberryferryandGitHub bfbc38f40c Add sorting/filtering to admin user search API endpoint (#36112) 2025-12-12 05:12:06 +01:00
Lunny XiaoandGitHub d2a372fc59 Move some functions to gitrepo package to reduce RepoPath reference directly (#36126) 2025-12-12 01:15:40 +01:00
wxiaoguangandGitHub f25409fab8 Make Golang correctly delete temp files during uploading (#36128)
Fix #36127
2025-12-11 19:59:42 +01:00
DmitryFrolovTri de1b2d8ab8 fixing lint fmt errors 2025-12-11 13:04:39 +00:00
DmitryFrolovTri e709a88254 make fmt 2025-12-11 09:19:58 +00:00
GiteaBot 01351cc6c7 [skip ci] Updated translations via Crowdin 2025-12-11 00:39:32 +00:00
Lunny XiaoandGitHub a440116a16 Support updating branch via API (#35951)
Resolve #35368
2025-12-10 19:23:26 +00:00
Lunny XiaoandGitHub 24b81ac8b9 Use gitrepo's clone and push when possible (#36093)
1 Move `IsRepositoryModelOrDirExist` and `CheckCreateRepository` to
service layer
2 Use `gitrepo.Pushxxx` instead of `git.Push` when possible
3 use `gitrepo.Clonexxx` instead of `gitrepo.Clone` when possible
2025-12-10 09:41:01 -08:00
wxiaoguangandGitHub 1c69fdccdd Improve math rendering (#36124)
Fix #36108
Fix #36107
2025-12-10 15:49:24 +00:00
silverwindandGitHub ed698d1a61 Add matching pair insertion to markdown textarea (#36121)
1. Our textarea already has some editor-like feature like tab
indentation, so I thought why not also add insertion of matching closing
quotes/brackets over selected text. This does that.
2. `textareaInsertText` is replaced with `replaceTextareaSelection`
which does the same but create a new edit history entry in the textarea
so CTRL-Z works. The button that inserts tables into the textarea can
now also be reverted via CTRL-Z, which was not possible before.
2025-12-10 07:30:50 +00:00
DmitryFrolovTri 206d688ede Merge remote-tracking branch 'upstream/main' into limit-repo-size 2025-12-09 18:44:23 +00:00