From e5933ecd14bd112b7decb42eb83a715fbb419849 Mon Sep 17 00:00:00 2001 From: Joao Amaral <7281460+joaopamaral@users.noreply.github.com> Date: Mon, 7 Oct 2024 09:19:17 -0300 Subject: [PATCH 1/2] Revert "Remove the exception if no X-RateLimit-Remaining is found in the header" --- setup.py | 2 +- tap_github/client.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 3be29e12..2271e6ea 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ from setuptools import setup, find_packages setup(name='tap-github', - version='2.0.7', + version='2.0.6', description='Singer.io tap for extracting data from the GitHub API', author='Stitch', url='http://singer.io', diff --git a/tap_github/client.py b/tap_github/client.py index 6686fc30..92c02f35 100644 --- a/tap_github/client.py +++ b/tap_github/client.py @@ -160,6 +160,10 @@ def rate_throttling(response, max_sleep_seconds, min_remain_rate_limit): LOGGER.info("API rate limit exceeded. Tap will retry the data collection after %s seconds.", seconds_to_sleep) time.sleep(seconds_to_sleep) + else: + # Raise an exception if `X-RateLimit-Remaining` is not found in the header. + # API does include this key header if provided base URL is not a valid github custom domain. + raise GithubException("The API call using the specified base url was unsuccessful. Please double-check the provided base URL.") class GithubClient: """ From cadb36551b38fd56d26df70f498c366c8ded3896 Mon Sep 17 00:00:00 2001 From: Joao Amaral <7281460+joaopamaral@users.noreply.github.com> Date: Mon, 7 Oct 2024 09:20:48 -0300 Subject: [PATCH 2/2] Bump correct version --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 2271e6ea..1236da87 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ from setuptools import setup, find_packages setup(name='tap-github', - version='2.0.6', + version='2.0.8', description='Singer.io tap for extracting data from the GitHub API', author='Stitch', url='http://singer.io',