[stable-2.10] Fix Azure Pipelines change detection. (#72824)

(cherry picked from commit 08842cd6bb)

Co-authored-by: Matt Clay <mclay@redhat.com>
pull/72843/head
Matt Clay 4 years ago committed by Matt Clay
parent eb4f30cd03
commit 7813b1248b

@ -0,0 +1,2 @@
bugfixes:
- ansible-test - Correctly detect changes in a GitHub pull request when running on Azure Pipelines.

@ -208,10 +208,10 @@ class AzurePipelinesChanges:
if self.base_commit:
self.base_commit = self.git.run_git(['rev-parse', self.base_commit]).strip()
# <rev1>...<rev2>
# Include commits that are reachable from <rev2> but exclude those that are reachable from <rev1>.
# see: https://git-scm.com/docs/gitrevisions
dot_range = '%s..%s' % (self.base_commit, self.commit)
# <commit>...<commit>
# This form is to view the changes on the branch containing and up to the second <commit>, starting at a common ancestor of both <commit>.
# see: https://git-scm.com/docs/git-diff
dot_range = '%s...%s' % (self.base_commit, self.commit)
self.paths = sorted(self.git.get_diff_names([dot_range]))
self.diff = self.git.get_diff([dot_range])

Loading…
Cancel
Save