diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-04-21 17:07:21 +0200 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-04-24 12:30:37 +0200 |
commit | 2456695422f01c677cf287f0021d01a08dd60c30 (patch) | |
tree | 2059b145722c6c29a2c1486878d762889c44e224 | |
parent | 4dd2f881336d2be6086019477d7927d0a1661002 (diff) | |
download | gitlab-ce-2456695422f01c677cf287f0021d01a08dd60c30.tar.gz |
Fix errors.
-rw-r--r-- | app/models/note.rb | 4 | ||||
-rw-r--r-- | lib/gitlab/push_data_builder.rb | 1 |
2 files changed, 2 insertions, 3 deletions
diff --git a/app/models/note.rb b/app/models/note.rb index e1cd971132b..f2a9680ff57 100644 --- a/app/models/note.rb +++ b/app/models/note.rb @@ -272,7 +272,7 @@ class Note < ActiveRecord::Base # cross-project references. For same-project references, return the # unmodified GFM reference. def mentioner_gfm_ref(noteable, mentioner, mentioner_project = mentioner.project) - if mentioner.is_a?(Commit) && project.nil? + if mentioner.is_a?(Commit) && mentioner_project.nil? return mentioner.gfm_reference.sub('commit ', 'commit %') end @@ -283,7 +283,7 @@ class Note < ActiveRecord::Base # projects are not the same, add the mentioning project's path to the # returned value. def full_gfm_reference(mentioning_project, noteable_project, mentioner) - if mentioning_project.id == noteable_project + if mentioning_project == noteable_project mentioner.gfm_reference else if mentioner.is_a?(Commit) diff --git a/lib/gitlab/push_data_builder.rb b/lib/gitlab/push_data_builder.rb index f44eb872122..f97784f5abb 100644 --- a/lib/gitlab/push_data_builder.rb +++ b/lib/gitlab/push_data_builder.rb @@ -31,7 +31,6 @@ module Gitlab # For performance purposes maximum 20 latest commits # will be passed as post receive hook data. commit_attrs = commits_limited.map(&:hook_attrs) - end type = Gitlab::Git.tag_ref?(ref) ? "tag_push" : "push" # Hash to be passed as post_receive_data |