Commit Graph

11 Commits (fd1b2a31f3937b08c56f5117d998e6f01f7f59a6)

Author SHA1 Message Date
David Svantesson 6aa3f8bc29 Mail assignee when issue/pull request is assigned ()
* 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
Lunny Xiao d151503d34 Upgrade xorm to v0.8.0 ()
Lunny Xiao 5a438ee3c0
Move all mail related codes from models to services/mailer ()
* move all mail related codes from models to modules/mailer

* fix lint

* use DBContext instead Engine

* use WithContext not WithEngine

* Use DBContext instead of Engine

* don't use defer when sess.Close()

* move DBContext to context.go and add some methods

* move mailer from modules/ to services

* fix lint

* fix tests

* fix fmt

* add gitea copyright

* fix tests

* don't expose db functions

* make code clear

* add DefaultDBContext

* fix build

* fix bug
zeripath 6311e4ce6a Fix sqlite deadlock when assigning to a PR ()
* Fix sqlite deadlock when assigning to a PR

Fix 5639

Signed-off-by: Andrew Thornton <art27@cantab.net>

* More possible deadlocks found and fixed

Signed-off-by: Andrew Thornton <art27@cantab.net>
Lunny Xiao 6bdc556b7f
Fix some webhooks bugs ()
* fix some webhooks bugs

* update vendor

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* fix test

* fix clearlabels

* fix pullrequest webhook bug fix 

* update release webhook description

* remove unused code

* fix push webhook in pull request

* small changes
kolaente 95f2e2b57b Multiple assignees ()
Ethan Koenig aa962deec0 Replace deprecated Id method with ID ()
Lunny Xiao dd55534b82 Reduce usage of allcols on update ()
* reduce usage of allcols on update

* fix bug and tests
Lauris BH 6db387a21e Refactor session close as xorm already does everything needed internally ()
Ethan Koenig 13973348df Gogs -> Gitea ()
Ethan Koenig d0960b8035 Move IssueUser code to separate file ()
Also add unit tests