diff options
author | Ethan Koenig <etk39@cornell.edu> | 2017-05-25 21:38:18 -0400 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2017-05-26 09:38:18 +0800 |
commit | 0c332f0480e9aa72454641afe53aebb3b9ab6e57 (patch) | |
tree | a13b29de28b8f61b9017316d2b5433e2c5ebda96 /models/pull.go | |
parent | 03912ce0142039022481ccf3798ab937e9cf4f0b (diff) | |
download | gitea-0c332f0480e9aa72454641afe53aebb3b9ab6e57.tar.gz gitea-0c332f0480e9aa72454641afe53aebb3b9ab6e57.zip |
Fix activity feed (#1779)
* Fix activity feed
Preserve actions after user/repo name change
* Add missing comment
* Fix migration, and remove fields completely
* Tests
Diffstat (limited to 'models/pull.go')
-rw-r--r-- | models/pull.go | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/models/pull.go b/models/pull.go index 64fa51b61b..76a646200e 100644 --- a/models/pull.go +++ b/models/pull.go @@ -635,14 +635,13 @@ func NewPullRequest(repo *Repository, pull *Issue, labelIDs []int64, uuids []str } if err = NotifyWatchers(&Action{ - ActUserID: pull.Poster.ID, - ActUserName: pull.Poster.Name, - OpType: ActionCreatePullRequest, - Content: fmt.Sprintf("%d|%s", pull.Index, pull.Title), - RepoID: repo.ID, - RepoUserName: repo.Owner.Name, - RepoName: repo.Name, - IsPrivate: repo.IsPrivate, + ActUserID: pull.Poster.ID, + ActUser: pull.Poster, + OpType: ActionCreatePullRequest, + Content: fmt.Sprintf("%d|%s", pull.Index, pull.Title), + RepoID: repo.ID, + Repo: repo, + IsPrivate: repo.IsPrivate, }); err != nil { log.Error(4, "NotifyWatchers: %v", err) } else if err = pull.MailParticipants(); err != nil { |