Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into docker-publish
Browse files Browse the repository at this point in the history
  • Loading branch information
coreycaverly committed Oct 6, 2023
2 parents f2f4c42 + 0265753 commit fa552de
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gordian/repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def _set_target_branch(self, target_branch, source_branch=None):
def _get_repo_contents(self, path):
try:
logger.debug(f'Fetching repo contents {path}...')
return self._source_repo.get_contents(path, self.source_branch)
return self._source_repo.get_contents(path, self.target_branch)
except GithubException as e:
if e.status == 404:
raise e
Expand Down
2 changes: 1 addition & 1 deletion tests/test_repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def test_get_files(self):
repository_file = MagicMock(path='afile.txt', type='not_dir')
self.repo._source_repo.get_contents.side_effect = [[MagicMock(path='directory', type='dir')],[repository_file]]
self.repo.get_files()
self.repo._source_repo.get_contents.assert_has_calls([call('', 'refs/heads/target'), call('directory', 'refs/heads/target')])
self.repo._source_repo.get_contents.assert_has_calls([call('', 'target'), call('directory', 'target')])
self.assertEquals(self.repo.files, [repository_file])

def test_set_target_branch(self):
Expand Down

0 comments on commit fa552de

Please sign in to comment.