06cd3e03a2
[refactor] notify remove unused praram ( #9804 )
2020-01-16 17:24:20 +01:00
99d869fa63
Move push commits from models to modules/repository ( #9370 )
...
* Move push commits from models to modules/repository
* fix test
* fix test
* fix test
* fix test
* fix test
Co-authored-by: zeripath <art27@cantab.net >
2020-01-10 17:34:21 +08:00
61db834904
Change target branch for pull request ( #6488 )
...
* Adds functionality to change target branch of created pull requests
Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com >
* Use const instead of var in JavaScript additions
Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com >
* Check if branches are equal and if PR already exists before changing target branch
Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com >
* Make sure to check all commits
Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com >
* Print error messages for user as error flash message
Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com >
* Disallow changing target branch of closed or merged pull requests
Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com >
* Resolve conflicts after merge of upstream/master
Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com >
* Change order of branch select fields
Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com >
* Removes duplicate check
Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com >
* Use ctx.Tr for translations
Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com >
* Recompile JS
Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com >
* Use correct translation namespace
Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com >
* Remove redundant if condition
Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com >
* Moves most change branch logic into pull service
Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com >
* Completes comment
Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com >
* Add Ref to ChangesPayload for logging changed target branches
instead of creating a new struct
Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com >
* Revert changes to go.mod
Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com >
* Directly use createComment method
Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com >
* Return 404 if pull request is not found. Move written check up
Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com >
* Remove variable declaration
Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com >
* Return client errors on change pull request target errors
Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com >
* Return error in commit.HasPreviousCommit
Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com >
* Adds blank line
Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com >
* Test patch before persisting new target branch
Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com >
* Update patch before testing (not working)
Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com >
* Removes patch calls when changeing pull request target
Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com >
* Removes unneeded check for base name
Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com >
* Moves ChangeTargetBranch completely to pull service. Update patch status.
Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com >
* Set webhook mode after errors were validated
Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com >
* Update PR in one transaction
Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com >
* Move logic for check if head is equal with branch to pull model
Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com >
* Adds missing comment and simplify return
Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com >
* Adjust CreateComment method call
Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com >
2019-12-16 14:20:25 +08:00
67b316a954
Refactor comment ( #9330 )
...
* Refactor comment
* fix test
* improve code
2019-12-15 16:57:34 -05:00
8ab35eefc4
Move mirror sync actions to notification ( #9022 )
...
* Move mirror sync actions to notification
* fix lint
2019-11-24 00:16:59 -05:00
21ae9838e0
Move transfer repository and rename repository on a service package and start action notification ( #8573 )
...
* move transfer repository and rename repository on a service package and start action notification
* remove unused codes
* fix lint
* fix bugs
* fix test
* fix test
* fix test
* fix lint
* update go mod and sum
2019-11-15 16:06:11 +08:00
016a5d0438
Move some actions to notification/action ( #8779 )
...
* Move some actions to notification/action
* Fix test
* fix test
2019-11-08 15:54:50 -05:00
8a84d82d53
Move repofiles webhooks to notification ( #8807 )
2019-11-06 14:43:03 +08:00
aaeef295bb
Move pull webhook to notification ( #8805 )
...
* Move pull webhook to notification
* fix fmt
2019-11-05 19:04:08 +08:00
022d2d8beb
Move push commits events to notification ( #8783 )
...
* Move push commits events to notification
* Update modules/notification/base/null.go
Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com >
2019-11-03 14:59:26 +08:00
8f26397928
Move issue milestone assign to issue service and move webhook to notification ( #8780 )
2019-11-02 11:33:20 +08:00
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
d578b71d61
move code.gitea.io/git to code.gitea.io/gitea/modules/git ( #6364 )
...
* move code.gitea.io/git to code.gitea.io/gitea/modules/git
* fix imports
* fix fmt
* fix misspell
* remove wrong tests data
* fix unit tests
* fix tests
* fix tests
* fix tests
* fix tests
* fix tests
* enable Debug to trace the failure tests
* fix tests
* fix tests
* fix tests
* fix tests
* fix tests
* comment commit count tests since git clone depth is 50
* fix tests
* update from code.gitea.io/git
* revert change to makefile
2019-03-27 17:33:00 +08:00
beab2df122
Refactor mail notification ( #5110 )
...
* mail notification implement interface
* fix file comment year
* use NullNotifier as parent struct of notifiers
2019-01-13 16:42:55 +02:00