airbyte-source-github 1.8.29__tar.gz → 1.8.29.dev202506231149__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.
Files changed (63) hide show
  1. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/PKG-INFO +1 -1
  2. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/pyproject.toml +1 -1
  3. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/source_github/errors_handlers.py +15 -0
  4. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/source_github/streams.py +10 -0
  5. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/README.md +0 -0
  6. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/source_github/__init__.py +0 -0
  7. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/source_github/backoff_strategies.py +0 -0
  8. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/source_github/config_migrations.py +0 -0
  9. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/source_github/constants.py +0 -0
  10. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/source_github/github_schema.py +0 -0
  11. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/source_github/graphql.py +0 -0
  12. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/source_github/run.py +0 -0
  13. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/source_github/schemas/assignees.json +0 -0
  14. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/source_github/schemas/branches.json +0 -0
  15. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/source_github/schemas/collaborators.json +0 -0
  16. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/source_github/schemas/comments.json +0 -0
  17. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/source_github/schemas/commit_comment_reactions.json +0 -0
  18. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/source_github/schemas/commit_comments.json +0 -0
  19. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/source_github/schemas/commits.json +0 -0
  20. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/source_github/schemas/contributor_activity.json +0 -0
  21. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/source_github/schemas/deployments.json +0 -0
  22. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/source_github/schemas/events.json +0 -0
  23. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/source_github/schemas/issue_comment_reactions.json +0 -0
  24. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/source_github/schemas/issue_events.json +0 -0
  25. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/source_github/schemas/issue_labels.json +0 -0
  26. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/source_github/schemas/issue_milestones.json +0 -0
  27. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/source_github/schemas/issue_reactions.json +0 -0
  28. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/source_github/schemas/issue_timeline_events.json +0 -0
  29. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/source_github/schemas/issues.json +0 -0
  30. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/source_github/schemas/organizations.json +0 -0
  31. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/source_github/schemas/project_cards.json +0 -0
  32. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/source_github/schemas/project_columns.json +0 -0
  33. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/source_github/schemas/projects.json +0 -0
  34. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/source_github/schemas/projects_v2.json +0 -0
  35. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/source_github/schemas/pull_request_comment_reactions.json +0 -0
  36. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/source_github/schemas/pull_request_commits.json +0 -0
  37. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/source_github/schemas/pull_request_stats.json +0 -0
  38. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/source_github/schemas/pull_requests.json +0 -0
  39. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/source_github/schemas/releases.json +0 -0
  40. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/source_github/schemas/repositories.json +0 -0
  41. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/source_github/schemas/review_comments.json +0 -0
  42. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/source_github/schemas/reviews.json +0 -0
  43. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/source_github/schemas/shared/events/comment.json +0 -0
  44. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/source_github/schemas/shared/events/commented.json +0 -0
  45. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/source_github/schemas/shared/events/committed.json +0 -0
  46. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/source_github/schemas/shared/events/cross_referenced.json +0 -0
  47. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/source_github/schemas/shared/events/reviewed.json +0 -0
  48. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/source_github/schemas/shared/reaction.json +0 -0
  49. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/source_github/schemas/shared/reactions.json +0 -0
  50. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/source_github/schemas/shared/user.json +0 -0
  51. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/source_github/schemas/shared/user_graphql.json +0 -0
  52. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/source_github/schemas/stargazers.json +0 -0
  53. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/source_github/schemas/tags.json +0 -0
  54. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/source_github/schemas/team_members.json +0 -0
  55. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/source_github/schemas/team_memberships.json +0 -0
  56. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/source_github/schemas/teams.json +0 -0
  57. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/source_github/schemas/users.json +0 -0
  58. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/source_github/schemas/workflow_jobs.json +0 -0
  59. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/source_github/schemas/workflow_runs.json +0 -0
  60. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/source_github/schemas/workflows.json +0 -0
  61. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/source_github/source.py +0 -0
  62. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/source_github/spec.json +0 -0
  63. {airbyte_source_github-1.8.29 → airbyte_source_github-1.8.29.dev202506231149}/source_github/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: airbyte-source-github
3
- Version: 1.8.29
3
+ Version: 1.8.29.dev202506231149
4
4
  Summary: Source implementation for GitHub.
5
5
  License: MIT
6
6
  Author: Airbyte
@@ -5,7 +5,7 @@ requires = [
5
5
  build-backend = "poetry.core.masonry.api"
6
6
 
7
7
  [tool.poetry]
8
- version = "1.8.29"
8
+ version = "1.8.29.dev202506231149"
9
9
  name = "airbyte-source-github"
10
10
  description = "Source implementation for GitHub."
11
11
  authors = [
@@ -135,3 +135,18 @@ class GitHubGraphQLErrorHandler(GithubStreamABCErrorHandler):
135
135
  )
136
136
 
137
137
  return super().interpret_response(response_or_exception)
138
+
139
+
140
+ class CommitsErrorHandler(GithubStreamABCErrorHandler):
141
+ def interpret_response(self, response_or_exception: Optional[Union[requests.Response, Exception]] = None) -> ErrorResolution:
142
+ if isinstance(response_or_exception, requests.Response):
143
+ if response_or_exception.status_code == requests.codes.CONFLICT:
144
+ response_data = response_or_exception.json()
145
+ if response_data.get("message") == "Git Repository is empty.":
146
+ return ErrorResolution(
147
+ response_action=ResponseAction.IGNORE,
148
+ failure_type=FailureType.config_error,
149
+ error_message="Git Repository is empty.",
150
+ )
151
+
152
+ return super().interpret_response(response_or_exception)
@@ -26,6 +26,7 @@ from . import constants
26
26
  from .backoff_strategies import ContributorActivityBackoffStrategy, GithubStreamABCBackoffStrategy
27
27
  from .errors_handlers import (
28
28
  GITHUB_DEFAULT_ERROR_MAPPING,
29
+ CommitsErrorHandler,
29
30
  ContributorActivityErrorHandler,
30
31
  GitHubGraphQLErrorHandler,
31
32
  GithubStreamABCErrorHandler,
@@ -100,6 +101,10 @@ class GithubStreamABC(HttpStream, ABC):
100
101
  stream_slice: Mapping[str, Any] = None,
101
102
  next_page_token: Mapping[str, Any] = None,
102
103
  ) -> Iterable[Mapping]:
104
+ if response.status_code == 409:
105
+ response_data = response.json()
106
+ if response_data.get("message") == "Git Repository is empty.":
107
+ return
103
108
  for record in response.json(): # GitHub puts records in an array.
104
109
  yield self.transform(record=record, stream_slice=stream_slice)
105
110
 
@@ -663,6 +668,11 @@ class Commits(IncrementalMixin, GithubStream):
663
668
  self.branches_stream = Branches(**kwargs)
664
669
  self.repositories_stream = RepositoryStats(**kwargs)
665
670
 
671
+ def get_error_handler(self) -> Optional[ErrorHandler]:
672
+ return CommitsErrorHandler(
673
+ logger=self.logger, max_retries=self.max_retries, error_mapping=GITHUB_DEFAULT_ERROR_MAPPING, stream=self
674
+ )
675
+
666
676
  def request_params(self, stream_state: Mapping[str, Any], stream_slice: Mapping[str, Any] = None, **kwargs) -> MutableMapping[str, Any]:
667
677
  params = super(IncrementalMixin, self).request_params(stream_state=stream_state, stream_slice=stream_slice, **kwargs)
668
678
  since = self.get_starting_point(stream_state=stream_state, stream_slice=stream_slice)