From f7c83ccdc0bd78bf0512a7cdf233e37e3e8c3e73 Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Thu, 16 Mar 2017 09:59:45 -0700 Subject: [PATCH] Fix ansible-test PR diff handling. Permits use of PRs on branches other than devel. --- test/runner/lib/changes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/runner/lib/changes.py b/test/runner/lib/changes.py index 2783e5516c..4ed2c724a3 100644 --- a/test/runner/lib/changes.py +++ b/test/runner/lib/changes.py @@ -68,8 +68,8 @@ class ShippableChanges(object): raise ChangeDetectionNotSupported('Change detection is not supported for tags.') if self.is_pr: - self.paths = sorted(git.get_diff_names([self.branch])) - self.diff = git.get_diff([self.branch]) + self.paths = sorted(git.get_diff_names(['origin/%s' % self.branch, '--'])) + self.diff = git.get_diff(['origin/%s' % self.branch, '--']) else: merge_runs = self.get_merge_runs(self.project_id, self.branch) last_successful_commit = self.get_last_successful_commit(git, merge_runs)