Skip to content

Commit

Permalink
🐛 Source Github: handle case where user is None (#15420)
Browse files Browse the repository at this point in the history
* fix(source-github): handle case where user is None

Signed-off-by: Sergey Chvalyuk <grubberr@gmail.com>
Co-authored-by: Marcos Marx <marcosmarxm@users.noreply.github.com>
Co-authored-by: Sergey Chvalyuk <grubberr@gmail.com>
  • Loading branch information
3 people authored Aug 12, 2022
1 parent c1d9ff0 commit 9d44dc2
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@
- name: GitHub
sourceDefinitionId: ef69ef6e-aa7f-4af1-a01d-ef775033524e
dockerRepository: airbyte/source-github
dockerImageTag: 0.2.44
dockerImageTag: 0.2.45
documentationUrl: https://docs.airbyte.io/integrations/sources/github
icon: github.svg
sourceType: api
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2665,7 +2665,7 @@
supportsNormalization: false
supportsDBT: false
supported_destination_sync_modes: []
- dockerImage: "airbyte/source-github:0.2.44"
- dockerImage: "airbyte/source-github:0.2.45"
spec:
documentationUrl: "https://docs.airbyte.com/integrations/sources/github"
connectionSpecification:
Expand Down
2 changes: 1 addition & 1 deletion airbyte-integrations/connectors/source-github/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ RUN pip install .
ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]

LABEL io.airbyte.version=0.2.44
LABEL io.airbyte.version=0.2.45
LABEL io.airbyte.name=airbyte/source-github
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,8 @@ def _get_records(self, pull_request, repository_name):
record["pull_request_url"] = pull_request["url"]
if record["commit"]:
record["commit_id"] = record.pop("commit")["oid"]
record["user"]["type"] = record["user"].pop("__typename")
if record["user"]:
record["user"]["type"] = record["user"].pop("__typename")
# for backward compatibility with REST API response
record["_links"] = {
"html": {"href": record["html_url"]},
Expand Down Expand Up @@ -1019,7 +1020,8 @@ def _get_reactions_from_comment(self, comment, repository):
for reaction in comment["reactions"]["nodes"]:
reaction["repository"] = self._get_name(repository)
reaction["comment_id"] = comment["id"]
reaction["user"]["type"] = "User"
if reaction["user"]:
reaction["user"]["type"] = "User"
yield reaction

def _get_reactions_from_review(self, review, repository):
Expand Down
1 change: 1 addition & 0 deletions docs/integrations/sources/github.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ The GitHub connector should not run into GitHub API limitations under normal usa

| Version | Date | Pull Request | Subject |
|:--------|:-----------| :--- |:-------------------------------------------------------------------------------------------------------------|
| 0.2.45 | 2022-08-11 | [15420](https://github.com/airbytehq/airbyte/pull/15420) | "User" object can be "null" |
| 0.2.44 | 2022-08-01 | [14795](https://github.com/airbytehq/airbyte/pull/14795) | Use GraphQL for `pull_request_comment_reactions` stream |
| 0.2.43 | 2022-07-26 | [15049](https://github.com/airbytehq/airbyte/pull/15049) | Bugfix schemas for streams `deployments`, `workflow_runs`, `teams` |
| 0.2.42 | 2022-07-12 | [14613](https://github.com/airbytehq/airbyte/pull/14613) | Improve schema for stream `pull_request_commits` added "null" |
Expand Down

0 comments on commit 9d44dc2

Please sign in to comment.