1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Fix ansible-test PR diff handling.

Permits use of PRs on branches other than devel.
This commit is contained in:
Matt Clay 2017-03-16 09:59:45 -07:00
parent dba8edf735
commit f7c83ccdc0

View file

@ -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)