Lunny Xiao and GitHub
61b1a39efe
chore: Move import path from code.gitea.io/gitea to gitea.dev ( #37873 )
2026-05-26 15:49:31 -07:00
94e3482d1a
chore(db): introduce db.Session and db.EngineMigration interfaces ( #37746 )
...
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com >
Co-authored-by: wxiaoguang <2114189+wxiaoguang@users.noreply.github.com >
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2026-05-18 03:56:39 +08:00
Nicolas and GitHub
732e23258e
Fix typos ( #37346 )
...
Fixes some typos
2026-04-21 19:56:14 +00:00
Lunny Xiao and GitHub
65cd3f5309
Use db.WithTx/WithTx2 instead of TxContext when possible ( #35130 )
2025-07-22 10:02:01 -07:00
c337ff0ec7
Add user blocking ( #29028 )
...
Fixes #17453
This PR adds the abbility to block a user from a personal account or
organization to restrict how the blocked user can interact with the
blocker. The docs explain what's the consequence of blocking a user.
Screenshots:



---------
Co-authored-by: Lauris BH <lauris@nix.lv >
2024-03-04 08:16:03 +00:00
JakobDev and GitHub
c548dde205
More refactoring of db.DefaultContext ( #27083 )
...
Next step of #27065
2023-09-15 06:13:19 +00:00
Wim and GitHub
62ac3251fa
Remove stars when repo goes private ( #19904 )
...
Fixes #18600
2023-06-05 13:25:43 +00:00
e81ccc406b
Implement FSFE REUSE for golang files ( #21840 )
...
Change all license headers to comply with REUSE specification.
Fix #16132
Co-authored-by: flynnnnnnnnnn <flynnnnnnnnnn@github>
Co-authored-by: John Olheiser <john.olheiser@gmail.com >
2022-11-27 18:20:29 +00:00
34283a74e8
Allow detect whether it's in a database transaction for a context.Context ( #21756 )
...
Fix #19513
This PR introduce a new db method `InTransaction(context.Context)`,
and also builtin check on `db.TxContext` and `db.WithTx`.
There is also a new method `db.AutoTx` has been introduced but could be used by other PRs.
`WithTx` will always open a new transaction, if a transaction exist in context, return an error.
`AutoTx` will try to open a new transaction if no transaction exist in context.
That means it will always enter a transaction if there is no error.
Co-authored-by: delvh <dev.lh@web.de >
Co-authored-by: 6543 <6543@obermui.de >
2022-11-12 21:18:50 +01:00
Lunny Xiao and GitHub
fd7d83ace6
Move almost all functions' parameter db.Engine to context.Context ( #19748 )
...
* Move almost all functions' parameter db.Engine to context.Context
* remove some unnecessary wrap functions
2022-05-20 22:08:52 +08:00
Lunny Xiao and GitHub
5723240490
Some repository refactors ( #17950 )
...
* some repository refactors
* remove unnecessary code
* Fix test
* Remove unnecessary banner
2021-12-12 23:48:20 +08:00