Print rate limit info
@@ -73,11 +73,11 @@ def print_rate_limiting_info(gh):
# spending it and how to better optimize it.
# Get GitHub API Rate Limit usage and total
- gh_api_remaining = gh.get_rate_limit().rate.remaining
- gh_api_total = gh.get_rate_limit().rate.limit
+ gh_api_remaining = gh.get_rate_limit().core.remaining
+ gh_api_total = gh.get_rate_limit().core.limit
# Compute time until GitHub API Rate Limit reset
- gh_api_reset_time = gh.get_rate_limit().rate.reset
+ gh_api_reset_time = gh.get_rate_limit().core.reset
gh_api_reset_time -= datetime.utcnow()
print("")
@@ -143,7 +143,7 @@ if __name__ == '__main__':
'https://conda-forge-manager:{}@github.com/conda-forge/{}-feedstock'.format(os.environ['GH_TOKEN'],
name)],
cwd=feedstock_dir)
-
+ print_rate_limiting_info(gh)
# Sometimes we already have the feedstock created. We need to deal with that case.
if repo_exists(gh, 'conda-forge', name + '-feedstock'):
subprocess.check_call(['git', 'fetch', 'upstream_with_token'], cwd=feedstock_dir)
@@ -153,8 +153,9 @@ if __name__ == '__main__':
except subprocess.CalledProcessError:
# Sometimes, we have a repo, but there are no commits on it! Just catch that case.
subprocess.check_call(['git', 'checkout', '-b' 'master'], cwd=feedstock_dir)
-
+ print_rate_limiting_info(gh)
subprocess.check_call(['conda', 'smithy', 'register-github', feedstock_dir] + owner_info + ['--extra-admin-users', 'cf-blacksmithy'])
+ print_rate_limiting_info(gh)
from conda_smithy.ci_register import drone_sync
print("Running drone sync (can take ~100s)")
