diff --git a/airbyte-integrations/connectors/source-github/source_github/streams.py b/airbyte-integrations/connectors/source-github/source_github/streams.py index 6de0111aad8c..e51b7445a960 100644 --- a/airbyte-integrations/connectors/source-github/source_github/streams.py +++ b/airbyte-integrations/connectors/source-github/source_github/streams.py @@ -331,6 +331,10 @@ def path(self, stream_slice: Mapping[str, Any] = None, **kwargs) -> str: def parse_response(self, response: requests.Response, **kwargs) -> Iterable[Mapping]: yield response.json() + def transform(self, record: MutableMapping[str, Any], stream_slice: Mapping[str, Any]) -> MutableMapping[str, Any]: + record["organization"] = stream_slice["organization"] + return record + class Repositories(Organizations): """ @@ -344,10 +348,6 @@ def parse_response(self, response: requests.Response, stream_slice: Mapping[str, for record in response.json(): # GitHub puts records in an array. yield self.transform(record=record, stream_slice=stream_slice) - def transform(self, record: MutableMapping[str, Any], stream_slice: Mapping[str, Any]) -> MutableMapping[str, Any]: - record["organization"] = stream_slice["organization"] - return record - class Tags(GithubStream): """ @@ -372,10 +372,6 @@ def parse_response(self, response: requests.Response, stream_slice: Mapping[str, for record in response.json(): yield self.transform(record=record, stream_slice=stream_slice) - def transform(self, record: MutableMapping[str, Any], stream_slice: Mapping[str, Any]) -> MutableMapping[str, Any]: - record["organization"] = stream_slice["organization"] - return record - class Users(Organizations): """ @@ -389,10 +385,6 @@ def parse_response(self, response: requests.Response, stream_slice: Mapping[str, for record in response.json(): yield self.transform(record=record, stream_slice=stream_slice) - def transform(self, record: MutableMapping[str, Any], stream_slice: Mapping[str, Any]) -> MutableMapping[str, Any]: - record["organization"] = stream_slice["organization"] - return record - # Below are semi incremental streams