summaryrefslogtreecommitdiffstats
path: root/models/repo_watch.go
Commit message (Collapse)AuthorAgeFilesLines
* Save TimeStamps for Star, Label, Follow, Watch and Collaboration to Database ↵65432020-10-121-4/+7
| | | | | | | | | | | (#13124) * Add timestamps to Star, Label, LanguageStat, Follow, Watch and Collaboration * Star do not need updated * LanguageStat do not need update (they wont change) * fix unit-test
* Add action feed for new release (#12324)赵智超2020-07-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add action feed for new release Signed-off-by: a1012112796 <1012112796@qq.com> * fix lint * Apply suggestions from code review * Add ReleaseID to the action table * Remove error message * Fold the attachments download list * remove attchment download list * simplify code * fix create release from existing tag * simplify ui * translation change * fix test Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Code Refactor of IssueWatch related things (#10401)65432020-02-261-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | * refactor * optimize * remove Iretating function LoadWatchUsers do not load Users into IW object and it is used only in api ... so move this logic * remove unessesary * Apply suggestions from code review Thx Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * make Tests more robust * fix rebase * restart CI * CI no dont hit sqlites deadlock Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
* API add/generalize pagination (#9452)SpaWn2KiLl2020-01-241-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
* Batch hook pre- and post-receive calls (#8602)zeripath2019-12-261-43/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * make notifyWatchers work on multiple actions * more efficient multiple notifyWatchers * Make CommitRepoAction take advantage of multiple actions * Batch post and pre-receive results * Set batch to 30 * Auto adjust timeout & add logging * adjust processing message * Add some messages to pre-receive * Make any non-200 status code from pre-receive an error * Add missing hookPrintResults * Remove shortcut for single action * mistaken merge fix * oops * Move master branch to the front * If repo was empty and the master branch is pushed ensure that that is set as the default branch * fixup * fixup * Missed HookOptions in setdefaultbranch * Batch PushUpdateAddTag and PushUpdateDelTag Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Add ActionCommentPull action (#9456)mrsdizzie2019-12-221-1/+1
| | | | | | | | | | | * Add ActionCommentPull action Adds ActionCommentPull action to distinguish between a comment on an issue and on a pull request * Update modules/notification/action/action.go Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Rewrite delivery of issue and comment mails (#9009)guillep2k2019-11-181-0/+12
| | | | | | | | | | | | | | | | * Mail issue subscribers, rework the function * Simplify a little more * Fix unused variable * Refactor mail delivery to avoid heavy load on server * Avoid splitting into too many goroutines * Fix comments and optimize GetMaileableUsersByIDs() * Fix return on errors
* Refactor pull request review (#8954)Lunny Xiao2019-11-141-0/+15
| | | | | | | | | | | | | | | | | | * refactor submit review * remove unnecessary code * remove unused comment * fix lint * remove duplicated actions * remove duplicated actions * fix typo * fix comment content
* Auto-subscribe user to repository when they commit/tag to it (#7657)guillep2k2019-11-101-22/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add support for AUTO_WATCH_ON_CHANGES and AUTO_WATCH_ON_CLONE * Update models/repo_watch.go Co-Authored-By: Lauris BH <lauris@nix.lv> * Round up changes suggested by lafriks * Added changes suggested from automated tests * Updated deleteUser to take RepoWatchModeDont into account, corrected inverted DefaultWatchOnClone and DefaultWatchOnChanges behaviour, updated and added tests. * Reinsert import "github.com/Unknwon/com" on http.go * Add migration for new column `watch`.`mode` * Remove serv code * Remove WATCH_ON_CLONE; use hooks, add integrations * Renamed watch_test.go to repo_watch_test.go * Correct fmt * Add missing EOL * Correct name of test function * Reword cheat and ini descriptions * Add update to migration to ensure column value * Clarify comment Co-Authored-By: zeripath <art27@cantab.net> * Simplify if condition
* Fix sqlite deadlock when assigning to a PR (#5640)zeripath2019-01-041-3/+3
| | | | | | | | | | | | * 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>
* Update xorm to latest version and fix correct `user` table referencing in ↵Lauris BH2018-07-201-1/+1
| | | | sql (#4473)
* hide issues from org private repos w/o team assignment (#4034)David Schneiderbauer2018-06-211-0/+17
|
* fix: Add feed for organization (#3594)Bo-Yi Wu2018-03-031-0/+15
| | | | | | | | | | | | * feat: Add feed for organization * fix: testing * fix: testing * fix: testing * fix: testing
* Prevent sending emails and notifications to inactive users (#2384)David Schneiderbauer2017-09-161-1/+5
| | | | | | | | | | | | | | | | | | | | | | * Filter inactive users before sending emails or creating browser notifications Signed-off-by: David Schneiderbauer <dschneiderbauer@gmail.com> * fix formatting issues Signed-off-by: David Schneiderbauer <dschneiderbauer@gmail.com> * included requested changes Signed-off-by: David Schneiderbauer <dschneiderbauer@gmail.com> * optimized database queries * rebasing new master and add tablenames for clarification in xorm queries * remove escaped quotationmarks using backticks Signed-off-by: David Schneiderbauer <dschneiderbauer@gmail.com>
* Unit tests for repo watching (#963)Ethan Koenig2017-02-171-0/+103