airbyte-source-github 2.1.16.dev202603190200__tar.gz → 2.1.18__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/PKG-INFO +1 -1
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/pyproject.toml +1 -1
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/source.py +1 -2
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/spec.json +9 -18
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/streams.py +9 -7
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/README.md +0 -0
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/__init__.py +0 -0
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/backoff_strategies.py +0 -0
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/config_migrations.py +0 -0
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/constants.py +0 -0
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/errors_handlers.py +0 -0
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/github_schema.py +0 -0
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/graphql.py +0 -0
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/run.py +0 -0
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/schemas/assignees.json +0 -0
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/schemas/branches.json +0 -0
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/schemas/collaborators.json +0 -0
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/schemas/comments.json +0 -0
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/schemas/commit_comment_reactions.json +0 -0
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/schemas/commit_comments.json +0 -0
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/schemas/commits.json +0 -0
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/schemas/contributor_activity.json +0 -0
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/schemas/deployments.json +0 -0
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/schemas/events.json +0 -0
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/schemas/issue_comment_reactions.json +0 -0
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/schemas/issue_events.json +0 -0
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/schemas/issue_labels.json +0 -0
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/schemas/issue_milestones.json +0 -0
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/schemas/issue_reactions.json +0 -0
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/schemas/issue_timeline_events.json +0 -0
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/schemas/issues.json +0 -0
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/schemas/organizations.json +0 -0
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/schemas/project_cards.json +0 -0
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/schemas/project_columns.json +0 -0
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/schemas/projects.json +0 -0
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/schemas/projects_v2.json +0 -0
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/schemas/pull_request_comment_reactions.json +0 -0
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/schemas/pull_request_commits.json +0 -0
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/schemas/pull_request_stats.json +0 -0
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/schemas/pull_requests.json +0 -0
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/schemas/releases.json +0 -0
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/schemas/repositories.json +0 -0
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/schemas/review_comments.json +0 -0
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/schemas/reviews.json +0 -0
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/schemas/shared/events/comment.json +0 -0
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/schemas/shared/events/commented.json +0 -0
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/schemas/shared/events/committed.json +0 -0
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/schemas/shared/events/cross_referenced.json +0 -0
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/schemas/shared/events/reviewed.json +0 -0
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/schemas/shared/reaction.json +0 -0
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/schemas/shared/reactions.json +0 -0
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/schemas/shared/user.json +0 -0
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/schemas/shared/user_graphql.json +0 -0
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/schemas/stargazers.json +0 -0
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/schemas/tags.json +0 -0
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/schemas/team_members.json +0 -0
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/schemas/team_memberships.json +0 -0
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/schemas/teams.json +0 -0
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/schemas/users.json +0 -0
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/schemas/workflow_jobs.json +0 -0
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/schemas/workflow_runs.json +0 -0
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/schemas/workflows.json +0 -0
- {airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/utils.py +0 -0
{airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/pyproject.toml
RENAMED
|
@@ -3,7 +3,7 @@ requires = [ "poetry-core>=1.0.0",]
|
|
|
3
3
|
build-backend = "poetry.core.masonry.api"
|
|
4
4
|
|
|
5
5
|
[tool.poetry]
|
|
6
|
-
version = "2.1.
|
|
6
|
+
version = "2.1.18"
|
|
7
7
|
name = "airbyte-source-github"
|
|
8
8
|
description = "Source implementation for GitHub."
|
|
9
9
|
authors = [ "Airbyte <contact@airbyte.io>",]
|
|
@@ -9,7 +9,6 @@ from urllib.parse import urlparse
|
|
|
9
9
|
from airbyte_cdk.models import FailureType
|
|
10
10
|
from airbyte_cdk.sources import AbstractSource
|
|
11
11
|
from airbyte_cdk.sources.streams import Stream
|
|
12
|
-
from airbyte_cdk.sources.streams.http.http_client import MessageRepresentationAirbyteTracedErrors
|
|
13
12
|
from airbyte_cdk.sources.streams.http.requests_native_auth import MultipleTokenAuthenticator
|
|
14
13
|
from airbyte_cdk.utils.traced_exception import AirbyteTracedException
|
|
15
14
|
from source_github.utils import MultipleTokenAuthenticatorWithRateLimiter
|
|
@@ -204,7 +203,7 @@ class SourceGithub(AbstractSource):
|
|
|
204
203
|
)
|
|
205
204
|
return True, None
|
|
206
205
|
|
|
207
|
-
except
|
|
206
|
+
except AirbyteTracedException as e:
|
|
208
207
|
user_message = self.user_friendly_error_message(e.message)
|
|
209
208
|
return False, user_message or e.message
|
|
210
209
|
except Exception as e:
|
|
@@ -150,26 +150,17 @@
|
|
|
150
150
|
"predicate_value": "OAuth Credentials",
|
|
151
151
|
"oauth_config_specification": {
|
|
152
152
|
"oauth_connector_input_specification": {
|
|
153
|
-
"consent_url": "https://github.com/login/oauth/authorize?client_id={{client_id_value}}&redirect_uri={{redirect_uri_value}}&state={{state_value}}&scope={{scopes_value | urlencode}}",
|
|
154
|
-
"access_token_url": "https://github.com/login/oauth/access_token",
|
|
155
|
-
"access_token_headers": {
|
|
156
|
-
"Content-Type": "application/x-www-form-urlencoded"
|
|
157
|
-
},
|
|
158
|
-
"access_token_params": {
|
|
159
|
-
"code": "{{ auth_code_value }}",
|
|
160
|
-
"client_id": "{{ client_id_value }}",
|
|
161
|
-
"client_secret": "{{ client_secret_value }}",
|
|
162
|
-
"redirect_uri": "{{ redirect_uri_value }}"
|
|
163
|
-
},
|
|
164
153
|
"scopes": [
|
|
165
|
-
{"scope": "repo"},
|
|
166
|
-
{"scope": "read:org"},
|
|
167
|
-
{"scope": "read:repo_hook"},
|
|
168
|
-
{"scope": "read:user"},
|
|
169
|
-
{"scope": "read:project"},
|
|
170
|
-
{"scope": "read:discussion"},
|
|
171
|
-
{"scope": "workflow"}
|
|
154
|
+
{ "scope": "repo" },
|
|
155
|
+
{ "scope": "read:org" },
|
|
156
|
+
{ "scope": "read:repo_hook" },
|
|
157
|
+
{ "scope": "read:user" },
|
|
158
|
+
{ "scope": "read:project" },
|
|
159
|
+
{ "scope": "read:discussion" },
|
|
160
|
+
{ "scope": "workflow" }
|
|
172
161
|
],
|
|
162
|
+
"consent_url": "https://github.com/login/oauth/authorize?{{client_id_param}}&{{redirect_uri_param}}&{{scopes_param}}&{{state_param}}",
|
|
163
|
+
"access_token_url": "https://github.com/login/oauth/access_token?{{client_id_param}}&{{client_secret_param}}&{{auth_code_param}}&{{redirect_uri_param}}",
|
|
173
164
|
"extract_output": ["access_token"]
|
|
174
165
|
},
|
|
175
166
|
"complete_oauth_output_specification": {
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
#
|
|
4
4
|
|
|
5
5
|
import base64
|
|
6
|
+
import binascii
|
|
6
7
|
import re
|
|
7
8
|
import struct
|
|
8
9
|
from abc import ABC, abstractmethod
|
|
@@ -22,7 +23,6 @@ from airbyte_cdk.sources.streams.core import CheckpointMixin, Stream
|
|
|
22
23
|
from airbyte_cdk.sources.streams.http import HttpStream
|
|
23
24
|
from airbyte_cdk.sources.streams.http.error_handlers import ErrorHandler, ErrorResolution, HttpStatusErrorHandler, ResponseAction
|
|
24
25
|
from airbyte_cdk.sources.streams.http.exceptions import DefaultBackoffException, UserDefinedBackoffException
|
|
25
|
-
from airbyte_cdk.sources.streams.http.http_client import MessageRepresentationAirbyteTracedErrors
|
|
26
26
|
from airbyte_cdk.utils import AirbyteTracedException
|
|
27
27
|
from airbyte_cdk.utils.datetime_helpers import ab_datetime_format, ab_datetime_parse
|
|
28
28
|
|
|
@@ -133,12 +133,12 @@ class GithubStreamABC(HttpStream, ABC):
|
|
|
133
133
|
# Reading records while handling the errors
|
|
134
134
|
try:
|
|
135
135
|
yield from super().read_records(stream_slice=stream_slice, **kwargs)
|
|
136
|
-
# HTTP Client wraps DefaultBackoffException into
|
|
137
|
-
except
|
|
136
|
+
# HTTP Client wraps DefaultBackoffException into AirbyteTracedException
|
|
137
|
+
except AirbyteTracedException as e:
|
|
138
138
|
# This whole try/except situation in `read_records()` isn't good but right now in `self._send_request()`
|
|
139
139
|
# function we have `response.raise_for_status()` so we don't have much choice on how to handle errors.
|
|
140
140
|
# Bocked on https://github.com/airbytehq/airbyte/issues/3514.
|
|
141
|
-
if not hasattr(e, "_exception")
|
|
141
|
+
if not hasattr(e, "_exception") or not hasattr(e._exception, "response"):
|
|
142
142
|
raise e
|
|
143
143
|
if e._exception.response.status_code == requests.codes.NOT_FOUND:
|
|
144
144
|
# A lot of streams are not available for repositories owned by a user instead of an organization.
|
|
@@ -828,7 +828,7 @@ class Releases(SemiIncrementalMixin, GitHubGraphQLStream):
|
|
|
828
828
|
decoded = base64.urlsafe_b64decode(encoded + "==")
|
|
829
829
|
if len(decoded) >= 4:
|
|
830
830
|
return struct.unpack(">I", decoded[-4:])[0]
|
|
831
|
-
except
|
|
831
|
+
except (ValueError, struct.error, binascii.Error):
|
|
832
832
|
return None
|
|
833
833
|
return None
|
|
834
834
|
|
|
@@ -1811,8 +1811,8 @@ class ContributorActivity(GithubStream):
|
|
|
1811
1811
|
repository = stream_slice.get("repository", "")
|
|
1812
1812
|
try:
|
|
1813
1813
|
yield from super().read_records(stream_slice=stream_slice, **kwargs)
|
|
1814
|
-
# HTTP Client wraps BackoffException into
|
|
1815
|
-
except
|
|
1814
|
+
# HTTP Client wraps BackoffException into AirbyteTracedException
|
|
1815
|
+
except AirbyteTracedException as e:
|
|
1816
1816
|
if hasattr(e, "_exception") and hasattr(e._exception, "response"):
|
|
1817
1817
|
if e._exception.response.status_code == requests.codes.ACCEPTED:
|
|
1818
1818
|
yield AirbyteMessage(
|
|
@@ -1829,6 +1829,8 @@ class ContributorActivity(GithubStream):
|
|
|
1829
1829
|
partition_obj = stream_slice.get("partition")
|
|
1830
1830
|
if self.cursor and partition_obj:
|
|
1831
1831
|
self.cursor.close_slice(StreamSlice(cursor_slice={}, partition=partition_obj))
|
|
1832
|
+
else:
|
|
1833
|
+
raise e
|
|
1832
1834
|
else:
|
|
1833
1835
|
raise e
|
|
1834
1836
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/run.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{airbyte_source_github-2.1.16.dev202603190200 → airbyte_source_github-2.1.18}/source_github/utils.py
RENAMED
|
File without changes
|