From 6b70f393f8210b0c5bb9cb878e483444ff32da02 Mon Sep 17 00:00:00 2001 From: Simon Quigley Date: Sat, 30 Mar 2019 20:52:27 -0500 Subject: [PATCH] phab is a global variable, treat it as such. --- lugito/lugito.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lugito/lugito.py b/lugito/lugito.py index 930e53c..93c38f2 100644 --- a/lugito/lugito.py +++ b/lugito/lugito.py @@ -160,14 +160,14 @@ class Lugito(object): def get_repository_name(self): #pragma: no cover # Get the commit PHID and search it commit_phid = self.request_data["object"]["phid"] - commit = phab.diffusion.commit.search( + commit = self.phab.diffusion.commit.search( constraints={"phids": [commit_phid]}) # Grab the repository PHID from the query results repo_phid = commit["data"][0]["fields"]["repositoryPHID"] # Using the repo PHID we just grabbed, get the name of it - repo_name = phab.phid.query(phids=[repo_phid])[repo_phid]["name"] + repo_name = self.phab.phid.query(phids=[repo_phid])[repo_phid]["name"] return repo_name