11 Commits (aceb1085c79e4c75268ce794a8ee84631382a403)

Author SHA1 Message Date
David Svantesson 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
5 years ago
Lunny Xiao d151503d34 Upgrade xorm to v0.8.0 (#8536) 5 years ago
Lunny Xiao 5a438ee3c0
Move all mail related codes from models to services/mailer (#7200)
* 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
5 years ago
zeripath 6311e4ce6a Fix sqlite deadlock when assigning to a PR (#5640)
* 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>
6 years ago
Lunny Xiao 6bdc556b7f
Fix some webhooks bugs (#3981)
* 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 #3492

* update release webhook description

* remove unused code

* fix push webhook in pull request

* small changes
6 years ago
kolaente 95f2e2b57b Multiple assignees (#3705) 6 years ago
Ethan Koenig aa962deec0 Replace deprecated Id method with ID (#2655) 7 years ago
Lunny Xiao dd55534b82 Reduce usage of allcols on update (#2596)
* reduce usage of allcols on update

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