Skip to content

Commit

Permalink
Merge pull request #106 from ocefpaf/underscore
Browse files Browse the repository at this point in the history
AppVeyor API URL
  • Loading branch information
pelson committed Mar 30, 2016
2 parents 95c4b8b + 43d9b44 commit 3975c6d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions conda_smithy/ci_register.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def add_project_to_circle(user, project):

repos = response.json()
matching = [repo for repo in repos if repo['username'] == data['username'] and repo['reponame'] == data['repo']]

if matching and matching[0].get('followed', False):
print(' * {}/{} already enabled on CircleCI'.format(user, project))
else:
Expand Down Expand Up @@ -108,6 +108,8 @@ def appveyor_encrypt_binstar_token(feedstock_directory, user, project):
def appveyor_configure(user, project):
"""Configure appveyor so that it skips building if there is no appveyor.yml present."""
headers = {'Authorization': 'Bearer {}'.format(appveyor_token)}
# I have reasons to believe this is all AppVeyor is doing to the API URL.
project = project.replace('_', '-')
url = 'https://ci.appveyor.com/api/projects/{}/{}/settings'.format(user, project)
response = requests.get(url, headers=headers)
if response.status_code != 200:
Expand Down Expand Up @@ -158,7 +160,7 @@ def add_project_to_travis(user, project):
if hooked['owner_name'] == user and hooked['name'] == project]
except KeyError:
pass

if not found:
if count == 1:
print(" * Travis doesn't know about the repo, synching (takes a few seconds).")
Expand Down

0 comments on commit 3975c6d

Please sign in to comment.