Remove refspec

This internal-only attribute is basically the same as "ref" but
spelled differently only in the case of a change.  Just use
the "ref" name in all cases for improved developer sanity.

Change-Id: I476f8d32dae37309ab0c9e11c8a5337b213f985e
This commit is contained in:
James E. Blair
2017-07-20 16:52:36 -07:00
parent 673dbd1441
commit 247cab7f2c
10 changed files with 31 additions and 46 deletions

View File

@@ -41,14 +41,14 @@ class SQLReporter(BaseReporter):
with self.connection.engine.begin() as conn:
change = getattr(item.change, 'number', '')
patchset = getattr(item.change, 'patchset', '')
refspec = getattr(item.change, 'refspec', item.change.newrev)
ref = getattr(item.change, 'ref', '')
buildset_ins = self.connection.zuul_buildset_table.insert().values(
zuul_ref=item.current_build_set.ref,
pipeline=item.pipeline.name,
project=item.change.project.name,
change=change,
patchset=patchset,
ref=refspec,
ref=ref,
score=self.result_score,
message=self._formatItemReport(
item, with_jobs=False),