Skip to content

Commit

Permalink
Merge pull request #116 from ocefpaf/appveyor_url
Browse files Browse the repository at this point in the history
Fix AppVeyor project URL
  • Loading branch information
pelson committed Apr 4, 2016
2 parents 760ce85 + 1b4697e commit 4ed3ba8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions conda_smithy/ci_register.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ 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('_', '-')
project = project.replace('_', '-').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 @@ -218,7 +218,7 @@ def add_conda_linting(user, repo):
if user != 'conda-forge':
print('Unable to register {}/{} for conda-linting at this time as only '
'conda-forge repos are supported.'.format(user, repo))

headers = {'Authorization': 'token {}'.format(github.gh_token())}
url = 'https://api.github.com/repos/{}/{}/hooks'.format(user, repo)

Expand All @@ -245,7 +245,7 @@ def add_conda_linting(user, repo):
if hook_url not in hook_by_url:
response = requests.post(url, json=payload, headers=headers)
if response.status_code != 200:
response.raise_for_status()
response.raise_for_status()


if __name__ == '__main__':
Expand Down

0 comments on commit 4ed3ba8

Please sign in to comment.