Skip to content

Commit c81d98c

Browse files
committed
git.py: CI build pass
Running command ".ci/build.sh" locally on pc used to failed the build, if there is more than one git remote's. Fixes coala#235
1 parent dc36c9f commit c81d98c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: community/git.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def get_config_remote(name='origin'):
4949
raise KeyError('No git remotes found')
5050

5151

52-
def get_remote_url():
52+
def get_remote_url(name='origin'):
5353
"""Obtain a parsed remote URL.
5454
5555
Uses CI environment variables or git remotes.
@@ -58,7 +58,7 @@ def get_remote_url():
5858
# It only sets the REPOSITORY_URL
5959
url = os.environ.get('REPOSITORY_URL')
6060
if not url:
61-
remote = get_config_remote()
61+
remote = get_config_remote(name)
6262
assert remote[0][0] == 'url'
6363
url = remote[0][1]
6464

@@ -146,7 +146,7 @@ def get_upstream_repo():
146146
"""Obtain the parent slug of the repository.
147147
"""
148148
try:
149-
remote = get_config_remote(name='upstream')
149+
remote = get_remote_url(name='origin')
150150
except KeyError:
151151
remote = None
152152

0 commit comments

Comments
 (0)