diff --git a/zuul/driver/gerrit/gerritconnection.py b/zuul/driver/gerrit/gerritconnection.py
index f266f2a..73979be 100644
--- a/zuul/driver/gerrit/gerritconnection.py
+++ b/zuul/driver/gerrit/gerritconnection.py
@@ -526,16 +526,16 @@
         # Wait for the ref to show up in the repo
         start = time.time()
         while time.time() - start < self.replication_timeout:
-            sha = self.getRefSha(project.name, ref)
+            sha = self.getRefSha(project, ref)
             if old_sha != sha:
                 return True
             time.sleep(self.replication_retry_interval)
         return False
 
-    def getRefSha(self, project_name, ref):
+    def getRefSha(self, project, ref):
         refs = {}
         try:
-            refs = self.getInfoRefs(project_name)
+            refs = self.getInfoRefs(project)
         except:
             self.log.exception("Exception looking for ref %s" %
                                ref)
@@ -597,7 +597,7 @@
         return changes
 
     def getProjectBranches(self, project):
-        refs = self.getInfoRefs(project.name)
+        refs = self.getInfoRefs(project)
         heads = [str(k[len('refs/heads/'):]) for k in refs.keys()
                  if k.startswith('refs/heads/')]
         return heads
@@ -731,9 +731,9 @@
             raise Exception("Gerrit error executing %s" % command)
         return (out, err)
 
-    def getInfoRefs(self, project_name):
+    def getInfoRefs(self, project):
         url = "%s/p/%s/info/refs?service=git-upload-pack" % (
-            self.baseurl, project_name)
+            self.baseurl, project.name)
         try:
             data = urllib.request.urlopen(url).read()
         except:
diff --git a/zuul/driver/gerrit/gerritreporter.py b/zuul/driver/gerrit/gerritreporter.py
index 0ade355..a855db3 100644
--- a/zuul/driver/gerrit/gerritreporter.py
+++ b/zuul/driver/gerrit/gerritreporter.py
@@ -33,7 +33,7 @@
                        (item.change, self.config, message))
         changeid = '%s,%s' % (item.change.number, item.change.patchset)
         item.change._ref_sha = source.getRefSha(
-            item.change.project.name, 'refs/heads/' + item.change.branch)
+            item.change.project, 'refs/heads/' + item.change.branch)
 
         return self.connection.review(item.change.project.name, changeid,
                                       message, self.config)
