Lunny Xiao and GitHub
74731c3a5a
Move some issue methods as functions ( #19255 )
...
* Move some issue methods as functions
* Fix bug
2022-03-29 16:57:33 +02:00
Lunny Xiao and GitHub
a666829a37
Move user related model into models/user ( #17781 )
...
* Move user related model into models/user
* Fix lint for windows
* Fix windows lint
* Fix windows lint
* Move some tests in models
* Merge
2021-11-24 17:49:20 +08:00
c98dd7a3e0
Remove unnecessary variable assignments ( #17695 )
...
* Remove unnecessary variable assignments
As title
* enable ineffassign
Co-authored-by: zeripath <[email protected] >
Co-authored-by: wxiaoguang <[email protected] >
2021-11-18 09:33:06 +08:00
wxiaoguang and GitHub
750a8465f5
A better go code formatter, and now make fmt can run in Windows ( #17684 )
...
* go build / format tools
* re-format imports
2021-11-17 20:34:35 +08:00
81926d61db
Decouple unit test, remove intermediate unittestbridge package ( #17662 )
...
Co-authored-by: Lunny Xiao <[email protected] >
2021-11-16 16:53:21 +08:00
wxiaoguang and GitHub
df64fa4865
Decouple unit test code from business code ( #17623 )
2021-11-12 22:36:47 +08:00
a4bfef265d
Move db related basic functions to models/db ( #17075 )
...
* Move db related basic functions to models/db
* Fix lint
* Fix lint
* Fix test
* Fix lint
* Fix lint
* revert unnecessary change
* Fix test
* Fix wrong replace string
* Use *Context
* Correct committer spelling and fix wrong replaced words
Co-authored-by: zeripath <[email protected] >
2021-09-19 19:49:59 +08:00
3d7d750a99
Fix individual tests (addition to #15802 ) ( #15818 )
...
* Decouple TestAction_GetRepoLink and TestSizedAvatarLink.
* Load database for TestCheckGPGUserEmail.
* Load database for TestMakeIDsFromAPIAssigneesToAdd.
* Load database for TestGetUserIDsByNames and TestGetMaileableUsersByIDs.
* Load database for TestUser_ToUser.
* Load database for TestRepository_EditWikiPage.
* Include AppSubURL in test.
* Prevent panic with empty slice.
Co-authored-by: zeripath <[email protected] >
Co-authored-by: techknowlogick <[email protected] >
2021-05-12 00:13:42 -04:00
6543 and Lunny Xiao
31416a5f4e
Fix API Bug (fail on empty assignees) ( #8873 )
...
* keep sure if assigneeIDs == nil -> do nothing
* fix #8872
* Revert "keep sure if assigneeIDs == nil -> do nothing"
-> go handle it itself preaty well
This reverts commit e72d94129c4666d5151f6131cb2f8c1de127d9d0.
* clarity comparson
Co-Authored-By: guillep2k <[email protected] >
* simplify
* Update models/issue_assignees.go
Co-Authored-By: guillep2k <[email protected] >
* Update issue_assignees.go
* simplify more
* add --if oneAssignee != ""-- again
* Update models/issue_assignees.go
Co-Authored-By: guillep2k <[email protected] >
* CI.restart()
* Update issue_assignees.go
* add Test for GetUserIDsByNames
* add Test for MakeIDsFromAPIAssigneesToAdd
* fix test
2019-11-10 16:07:21 +08:00
Lunny Xiao and GitHub
495d5e4329
Move more issue assignee code from models to issue service ( #8690 )
...
* Move more issue assignee code from models to issue service
* fix test
2019-10-28 10:11:50 +08:00
David Svantesson and Lunny Xiao
6aa3f8bc29
Mail assignee when issue/pull request is assigned ( #8546 )
...
* Send email to assigned user
* Only send mail if enabled
* Mail also when assigned through API
* Need to refactor functions from models to issue service
* Refer to issue index rather than ID
* Disable email notifications completly at initalization if global disable
* Check of user enbled mail shall be in mail notification function only
* Initialize notifications from routers init function.
* Use the assigned comment when sending assigned mail
* Refactor so that assignees always added as separate step when new issue/pr.
* Check error from AddAssignees
* Check if user can be assiged to issue or pull request
* Missing return
* Refactor of CanBeAssigned check.
CanBeAssigned shall have same check as UI.
* Clarify function names (toggle rather than update/change), and clean up.
* Fix review comments.
* Flash error if assignees was not added when creating issue/pr
* Generate error if assignee users doesn't exist
2019-10-25 22:46:37 +08:00
Bo-Yi Wu and GitHub
743697a549
refactor: append, build variable and type switch ( #4940 )
...
* refactor: append, build variable and type switch
* fix: remove redundant space.
2019-05-28 23:45:54 +08:00
Lunny Xiao and techknowlogick
b3b7598ec6
Improve performance of dashboard ( #4977 )
2018-12-13 10:55:43 -05:00
kolaente and Lauris BH
95f2e2b57b
Multiple assignees ( #3705 )
2018-05-09 19:29:04 +03:00