fix(buildtrigger): fixed error from github api
there was a 500 being thrown every time there was a slash at the end of a directory while adding in a new trigger this stops that 500 from coming
This commit is contained in:
parent
9ed022fd18
commit
d6e45e3321
5 changed files with 6 additions and 6 deletions
|
@ -350,7 +350,7 @@ class GithubBuildTrigger(BuildTriggerHandler):
|
|||
commit_tree = repo.get_git_tree(default_commit.sha, recursive=True)
|
||||
|
||||
return [elem.path for elem in commit_tree.tree
|
||||
if (elem.type == u'blob' and self.path_is_dockerfile(os.path.basename(elem.path)))]
|
||||
if (elem.type == u'blob' and self.filename_is_dockerfile(os.path.basename(elem.path)))]
|
||||
except GithubException as ghe:
|
||||
message = ghe.data.get('message', 'Unable to list contents of repository: %s' % source)
|
||||
if message == 'Branch not found':
|
||||
|
@ -371,7 +371,7 @@ class GithubBuildTrigger(BuildTriggerHandler):
|
|||
raise RepositoryReadException(message)
|
||||
|
||||
path = self.get_dockerfile_path()
|
||||
if not path:
|
||||
if not path or not self.filename_is_dockerfile(os.path.basename(path)):
|
||||
return None
|
||||
|
||||
try:
|
||||
|
|
Reference in a new issue