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 <[email protected] >
Co-authored-by: 6543 <[email protected] >
2022-11-12 21:18:50 +01:00
385462d36c
Fix dashboard ignored system setting cache ( #21621 )
...
This is a performance regression from #18058
Signed-off-by: Andrew Thornton <[email protected] >
Co-authored-by: Andrew Thornton <[email protected] >
2022-11-10 14:43:53 +08:00
Lunny Xiao and GitHub
f860a6d2e4
Add system setting table with cache and also add cache supports for user setting ( #18058 )
2022-10-17 07:29:26 +08:00
1f40933d38
Add config options to hide issue events ( #17414 )
...
* Add config option to hide issue events
Adds a config option `HIDE_ISSUE_EVENTS` to hide most issue events (changed labels, milestones, projects...) on the issue detail page.
If this is true, only the following events (comment types) are shown:
* plain comments
* closed/reopned/merged
* reviews
* Make configurable using a list
* Add docs
* Add missing newline
* Fix merge issues
* Allow changes per user settings
* Fix lint
* Rm old docs
* Apply suggestions from code review
* Use bitsets
* Rm comment
* fmt
* Fix lint
* Use variable/constant to provide key
* fmt
* fix lint
* refactor
* Add a prefix for user setting key
* Add license comment
* Add license comment
* Update services/forms/user_form_hidden_comments.go
Co-authored-by: Gusted <[email protected] >
* check len == 0
Co-authored-by: wxiaoguang <[email protected] >
Co-authored-by: zeripath <[email protected] >
Co-authored-by: Gusted <[email protected] >
Co-authored-by: 6543 <[email protected] >
2022-01-21 18:59:26 +01:00
Gusted and GitHub
ff2fd08228
Simplify parameter types ( #18006 )
...
Remove repeated type declarations in function definitions.
2021-12-20 04:41:31 +00:00
techknowlogick and GitHub
499b05da22
Add user settings key/value DB table ( #16834 )
2021-11-22 04:47:23 -05:00