airbyte-source-github 2.1.27__tar.gz → 2.1.29__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.29/.airbyte-pypi-readme.md +7 -0
- airbyte_source_github-2.1.29/PKG-INFO +29 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/pyproject.toml +2 -2
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/errors_handlers.py +20 -3
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/streams.py +22 -2
- airbyte_source_github-2.1.27/PKG-INFO +0 -126
- airbyte_source_github-2.1.27/README.md +0 -104
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/__init__.py +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/backoff_strategies.py +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/config_migrations.py +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/constants.py +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/github_schema.py +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/graphql.py +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/run.py +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/assignees.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/branches.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/collaborators.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/comments.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/commit_comment_reactions.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/commit_comments.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/commits.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/contributor_activity.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/deployments.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/events.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/issue_comment_reactions.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/issue_events.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/issue_labels.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/issue_milestones.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/issue_reactions.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/issue_timeline_events.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/issues.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/organizations.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/project_cards.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/project_columns.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/projects.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/projects_v2.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/pull_request_comment_reactions.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/pull_request_commits.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/pull_request_stats.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/pull_requests.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/releases.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/repositories.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/review_comments.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/reviews.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/shared/events/comment.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/shared/events/commented.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/shared/events/committed.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/shared/events/cross_referenced.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/shared/events/reviewed.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/shared/reaction.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/shared/reactions.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/shared/user.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/shared/user_graphql.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/stargazers.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/tags.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/team_members.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/team_memberships.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/teams.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/users.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/workflow_jobs.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/workflow_runs.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/workflows.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/source.py +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/spec.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/utils.py +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# GitHub
|
|
2
|
+
|
|
3
|
+
This package contains the Airbyte GitHub connector.
|
|
4
|
+
|
|
5
|
+
Airbyte is open-source data movement for ELT pipelines and AI agents. It moves data from APIs, databases, and files to warehouses, lakes, and AI applications.
|
|
6
|
+
|
|
7
|
+
Airbyte provides a catalog of 600+ connectors for APIs, databases, data warehouses, data lakes, and AI applications. Use this package with [PyAirbyte](https://docs.airbyte.com/developers/pyairbyte) to run the connector from Python.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: airbyte-source-github
|
|
3
|
+
Version: 2.1.29
|
|
4
|
+
Summary: Source implementation for GitHub.
|
|
5
|
+
Home-page: https://airbyte.com
|
|
6
|
+
License: ELv2
|
|
7
|
+
Author: Airbyte
|
|
8
|
+
Author-email: contact@airbyte.io
|
|
9
|
+
Requires-Python: >=3.10,<3.14
|
|
10
|
+
Classifier: License :: Other/Proprietary License
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
+
Requires-Dist: airbyte-cdk (>=7.12.0,<8.0.0)
|
|
17
|
+
Requires-Dist: sgqlc (==16.3)
|
|
18
|
+
Project-URL: Documentation, https://docs.airbyte.com/integrations/sources/github
|
|
19
|
+
Project-URL: Repository, https://github.com/airbytehq/airbyte
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
|
|
22
|
+
# GitHub
|
|
23
|
+
|
|
24
|
+
This package contains the Airbyte GitHub connector.
|
|
25
|
+
|
|
26
|
+
Airbyte is open-source data movement for ELT pipelines and AI agents. It moves data from APIs, databases, and files to warehouses, lakes, and AI applications.
|
|
27
|
+
|
|
28
|
+
Airbyte provides a catalog of 600+ connectors for APIs, databases, data warehouses, data lakes, and AI applications. Use this package with [PyAirbyte](https://docs.airbyte.com/developers/pyairbyte) to run the connector from Python.
|
|
29
|
+
|
|
@@ -3,12 +3,12 @@ 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.29"
|
|
7
7
|
name = "airbyte-source-github"
|
|
8
8
|
description = "Source implementation for GitHub."
|
|
9
9
|
authors = [ "Airbyte <contact@airbyte.io>",]
|
|
10
10
|
license = "ELv2"
|
|
11
|
-
readme = "
|
|
11
|
+
readme = ".airbyte-pypi-readme.md"
|
|
12
12
|
documentation = "https://docs.airbyte.com/integrations/sources/github"
|
|
13
13
|
homepage = "https://airbyte.com"
|
|
14
14
|
repository = "https://github.com/airbytehq/airbyte"
|
{airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/errors_handlers.py
RENAMED
|
@@ -199,11 +199,25 @@ class GitHubGraphQLErrorHandler(GithubStreamABCErrorHandler):
|
|
|
199
199
|
def interpret_response(self, response_or_exception: Optional[Union[requests.Response, Exception]] = None) -> ErrorResolution:
|
|
200
200
|
if isinstance(response_or_exception, requests.Response):
|
|
201
201
|
if response_or_exception.status_code in (requests.codes.BAD_GATEWAY, requests.codes.GATEWAY_TIMEOUT):
|
|
202
|
-
|
|
202
|
+
# Halve the page size on every 502/504 to reduce GraphQL query cost,
|
|
203
|
+
# but never let it drop below 1 — a page_size of 0 would request no
|
|
204
|
+
# records and cause infinite paging.
|
|
205
|
+
previous_page_size = self.stream.page_size
|
|
206
|
+
self.stream.page_size = max(1, int(self.stream.page_size / 2))
|
|
207
|
+
self._logger.info(
|
|
208
|
+
"GitHub GraphQL endpoint returned HTTP %s for stream `%s`; reducing GraphQL page_size from %s to %s and retrying.",
|
|
209
|
+
response_or_exception.status_code,
|
|
210
|
+
self.stream.name,
|
|
211
|
+
previous_page_size,
|
|
212
|
+
self.stream.page_size,
|
|
213
|
+
)
|
|
203
214
|
return ErrorResolution(
|
|
204
215
|
response_action=ResponseAction.RETRY,
|
|
205
216
|
failure_type=FailureType.transient_error,
|
|
206
|
-
error_message=
|
|
217
|
+
error_message=(
|
|
218
|
+
f"GitHub GraphQL endpoint returned HTTP {response_or_exception.status_code} "
|
|
219
|
+
f"for stream `{self.stream.name}`. Reducing GraphQL page size and retrying."
|
|
220
|
+
),
|
|
207
221
|
)
|
|
208
222
|
|
|
209
223
|
self.stream.page_size = (
|
|
@@ -214,7 +228,10 @@ class GitHubGraphQLErrorHandler(GithubStreamABCErrorHandler):
|
|
|
214
228
|
return ErrorResolution(
|
|
215
229
|
response_action=ResponseAction.RETRY,
|
|
216
230
|
failure_type=FailureType.transient_error,
|
|
217
|
-
error_message=
|
|
231
|
+
error_message=(
|
|
232
|
+
f"GitHub GraphQL endpoint returned errors in the response body "
|
|
233
|
+
f"for stream `{self.stream.name}` (HTTP {response_or_exception.status_code}). Retrying."
|
|
234
|
+
),
|
|
218
235
|
)
|
|
219
236
|
|
|
220
237
|
return super().interpret_response(response_or_exception)
|
|
@@ -201,6 +201,12 @@ class GithubStreamABC(HttpStream, ABC):
|
|
|
201
201
|
f"GitHub returned HTTP 502 Bad Gateway for stream `{self.name}` after exhausting retries. "
|
|
202
202
|
f"This is usually transient — the next sync attempt should succeed."
|
|
203
203
|
)
|
|
204
|
+
elif e._exception.response.status_code == requests.codes.GATEWAY_TIMEOUT:
|
|
205
|
+
error_msg = (
|
|
206
|
+
f"GitHub returned HTTP 504 Gateway Timeout for stream `{self.name}` after exhausting retries "
|
|
207
|
+
f"and reducing the GraphQL page size. The next sync attempt should succeed; "
|
|
208
|
+
f'if 504s persist, lower "Page size for large streams" in the source configuration.'
|
|
209
|
+
)
|
|
204
210
|
else:
|
|
205
211
|
self.logger.error(f"Undefined error while reading records: {e._exception.response.text}")
|
|
206
212
|
raise e
|
|
@@ -232,11 +238,15 @@ class GithubStream(GithubStreamABC):
|
|
|
232
238
|
def get_error_display_message(self, exception: BaseException) -> Optional[str]:
|
|
233
239
|
if (
|
|
234
240
|
isinstance(exception, DefaultBackoffException)
|
|
235
|
-
and exception.response.status_code
|
|
241
|
+
and exception.response.status_code in (requests.codes.BAD_GATEWAY, requests.codes.GATEWAY_TIMEOUT)
|
|
236
242
|
and self.large_stream
|
|
237
243
|
and self.page_size > 1
|
|
238
244
|
):
|
|
239
|
-
return
|
|
245
|
+
return (
|
|
246
|
+
f'Please try to decrease the "Page size for large streams" below {self.page_size}. '
|
|
247
|
+
f'The stream "{self.name}" is a large stream, such streams can fail with '
|
|
248
|
+
f'{exception.response.status_code} for high "page_size" values.'
|
|
249
|
+
)
|
|
240
250
|
return super().get_error_display_message(exception)
|
|
241
251
|
|
|
242
252
|
def transform(self, record: MutableMapping[str, Any], stream_slice: Mapping[str, Any]) -> MutableMapping[str, Any]:
|
|
@@ -850,6 +860,16 @@ class Releases(SemiIncrementalMixin, GitHubGraphQLStream):
|
|
|
850
860
|
|
|
851
861
|
cursor_field = "created_at"
|
|
852
862
|
is_sorted = "asc"
|
|
863
|
+
# The Releases GraphQL query is high-cost on the server side: every node
|
|
864
|
+
# materializes `description` and `descriptionHTML`, which forces GitHub
|
|
865
|
+
# to render each release body to HTML. On repositories with long release
|
|
866
|
+
# notes, a page_size of 100 pushes the resolver past its internal 10s
|
|
867
|
+
# deadline and returns 504 Gateway Timeout (reproduced deterministically
|
|
868
|
+
# against nodejs/node: first=100 -> 504 in ~11s; first=10 -> 200 in ~3s).
|
|
869
|
+
# `releaseAssets` / `reactionGroups` / `mentions` are NOT the cost driver
|
|
870
|
+
# — stripping them does not fix the timeout, only lowering `first` does.
|
|
871
|
+
# Mark as large_stream so it picks up the smaller default page size.
|
|
872
|
+
large_stream = True
|
|
853
873
|
|
|
854
874
|
GRAPHQL_REACTION_TO_REST = {
|
|
855
875
|
"THUMBS_UP": "plus_one",
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: airbyte-source-github
|
|
3
|
-
Version: 2.1.27
|
|
4
|
-
Summary: Source implementation for GitHub.
|
|
5
|
-
Home-page: https://airbyte.com
|
|
6
|
-
License: ELv2
|
|
7
|
-
Author: Airbyte
|
|
8
|
-
Author-email: contact@airbyte.io
|
|
9
|
-
Requires-Python: >=3.10,<3.14
|
|
10
|
-
Classifier: License :: Other/Proprietary License
|
|
11
|
-
Classifier: Programming Language :: Python :: 3
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
-
Requires-Dist: airbyte-cdk (>=7.12.0,<8.0.0)
|
|
17
|
-
Requires-Dist: sgqlc (==16.3)
|
|
18
|
-
Project-URL: Documentation, https://docs.airbyte.com/integrations/sources/github
|
|
19
|
-
Project-URL: Repository, https://github.com/airbytehq/airbyte
|
|
20
|
-
Description-Content-Type: text/markdown
|
|
21
|
-
|
|
22
|
-
# Github source connector
|
|
23
|
-
|
|
24
|
-
This is the repository for the Github source connector, written in Python.
|
|
25
|
-
For information about how to use this connector within Airbyte, see [the documentation](https://docs.airbyte.com/integrations/sources/github).
|
|
26
|
-
|
|
27
|
-
## Local development
|
|
28
|
-
|
|
29
|
-
### Prerequisites
|
|
30
|
-
|
|
31
|
-
- Python (~=3.9)
|
|
32
|
-
- Poetry (~=1.7) - installation instructions [here](https://python-poetry.org/docs/#installation)
|
|
33
|
-
|
|
34
|
-
### Installing the connector
|
|
35
|
-
|
|
36
|
-
From this connector directory, run:
|
|
37
|
-
|
|
38
|
-
```bash
|
|
39
|
-
poetry install --with dev
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
### Create credentials
|
|
43
|
-
|
|
44
|
-
**If you are a community contributor**, follow the instructions in the [documentation](https://docs.airbyte.com/integrations/sources/github)
|
|
45
|
-
to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `source_github/spec.yaml` file.
|
|
46
|
-
Note that any directory named `secrets` is gitignored across the entire Airbyte repo, so there is no danger of accidentally checking in sensitive information.
|
|
47
|
-
See `sample_files/sample_config.json` for a sample config file.
|
|
48
|
-
|
|
49
|
-
### Locally running the connector
|
|
50
|
-
|
|
51
|
-
```
|
|
52
|
-
poetry run source-github spec
|
|
53
|
-
poetry run source-github check --config secrets/config.json
|
|
54
|
-
poetry run source-github discover --config secrets/config.json
|
|
55
|
-
poetry run source-github read --config secrets/config.json --catalog sample_files/configured_catalog.json
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
### Running unit tests
|
|
59
|
-
|
|
60
|
-
To run unit tests locally, from the connector directory run:
|
|
61
|
-
|
|
62
|
-
```
|
|
63
|
-
poetry run pytest unit_tests
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
### Building the docker image
|
|
67
|
-
|
|
68
|
-
1. Install [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md)
|
|
69
|
-
2. Run the following command to build the docker image:
|
|
70
|
-
|
|
71
|
-
```bash
|
|
72
|
-
airbyte-ci connectors --name=source-github build
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
An image will be available on your host with the tag `airbyte/source-github:dev`.
|
|
76
|
-
|
|
77
|
-
### Running as a docker container
|
|
78
|
-
|
|
79
|
-
Then run any of the connector commands as follows:
|
|
80
|
-
|
|
81
|
-
```
|
|
82
|
-
docker run --rm airbyte/source-github:dev spec
|
|
83
|
-
docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-github:dev check --config /secrets/config.json
|
|
84
|
-
docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-github:dev discover --config /secrets/config.json
|
|
85
|
-
docker run --rm -v $(pwd)/secrets:/secrets -v $(pwd)/integration_tests:/integration_tests airbyte/source-github:dev read --config /secrets/config.json --catalog /integration_tests/configured_catalog.json
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
### Running our CI test suite
|
|
89
|
-
|
|
90
|
-
You can run our full test suite locally using [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md):
|
|
91
|
-
|
|
92
|
-
```bash
|
|
93
|
-
airbyte-ci connectors --name=source-github test
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
### Customizing acceptance Tests
|
|
97
|
-
|
|
98
|
-
Customize `acceptance-test-config.yml` file to configure acceptance tests. See [Connector Acceptance Tests](https://docs.airbyte.com/connector-development/testing-connectors/connector-acceptance-tests-reference) for more information.
|
|
99
|
-
If your connector requires to create or destroy resources for use during acceptance tests create fixtures for it and place them inside integration_tests/acceptance.py.
|
|
100
|
-
|
|
101
|
-
### Dependency Management
|
|
102
|
-
|
|
103
|
-
All of your dependencies should be managed via Poetry.
|
|
104
|
-
To add a new dependency, run:
|
|
105
|
-
|
|
106
|
-
```bash
|
|
107
|
-
poetry add <package-name>
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
Please commit the changes to `pyproject.toml` and `poetry.lock` files.
|
|
111
|
-
|
|
112
|
-
## Publishing a new version of the connector
|
|
113
|
-
|
|
114
|
-
You've checked out the repo, implemented a million dollar feature, and you're ready to share your changes with the world. Now what?
|
|
115
|
-
|
|
116
|
-
1. Make sure your changes are passing our test suite: `airbyte-ci connectors --name=source-github test`
|
|
117
|
-
2. Bump the connector version (please follow [semantic versioning for connectors](https://docs.airbyte.com/contributing-to-airbyte/resources/pull-requests-handbook/#semantic-versioning-for-connectors)):
|
|
118
|
-
- bump the `dockerImageTag` value in in `metadata.yaml`
|
|
119
|
-
- bump the `version` value in `pyproject.toml`
|
|
120
|
-
3. Make sure the `metadata.yaml` content is up to date.
|
|
121
|
-
4. Make sure the connector documentation and its changelog is up to date (`docs/integrations/sources/github.md`).
|
|
122
|
-
5. Create a Pull Request: use [our PR naming conventions](https://docs.airbyte.com/contributing-to-airbyte/resources/pull-requests-handbook/#pull-request-title-convention).
|
|
123
|
-
6. Pat yourself on the back for being an awesome contributor.
|
|
124
|
-
7. Someone from Airbyte will take a look at your PR and iterate with you to merge it into master.
|
|
125
|
-
8. Once your PR is merged, the new version of the connector will be automatically published to Docker Hub and our connector registry.
|
|
126
|
-
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
# Github source connector
|
|
2
|
-
|
|
3
|
-
This is the repository for the Github source connector, written in Python.
|
|
4
|
-
For information about how to use this connector within Airbyte, see [the documentation](https://docs.airbyte.com/integrations/sources/github).
|
|
5
|
-
|
|
6
|
-
## Local development
|
|
7
|
-
|
|
8
|
-
### Prerequisites
|
|
9
|
-
|
|
10
|
-
- Python (~=3.9)
|
|
11
|
-
- Poetry (~=1.7) - installation instructions [here](https://python-poetry.org/docs/#installation)
|
|
12
|
-
|
|
13
|
-
### Installing the connector
|
|
14
|
-
|
|
15
|
-
From this connector directory, run:
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
poetry install --with dev
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
### Create credentials
|
|
22
|
-
|
|
23
|
-
**If you are a community contributor**, follow the instructions in the [documentation](https://docs.airbyte.com/integrations/sources/github)
|
|
24
|
-
to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `source_github/spec.yaml` file.
|
|
25
|
-
Note that any directory named `secrets` is gitignored across the entire Airbyte repo, so there is no danger of accidentally checking in sensitive information.
|
|
26
|
-
See `sample_files/sample_config.json` for a sample config file.
|
|
27
|
-
|
|
28
|
-
### Locally running the connector
|
|
29
|
-
|
|
30
|
-
```
|
|
31
|
-
poetry run source-github spec
|
|
32
|
-
poetry run source-github check --config secrets/config.json
|
|
33
|
-
poetry run source-github discover --config secrets/config.json
|
|
34
|
-
poetry run source-github read --config secrets/config.json --catalog sample_files/configured_catalog.json
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
### Running unit tests
|
|
38
|
-
|
|
39
|
-
To run unit tests locally, from the connector directory run:
|
|
40
|
-
|
|
41
|
-
```
|
|
42
|
-
poetry run pytest unit_tests
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
### Building the docker image
|
|
46
|
-
|
|
47
|
-
1. Install [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md)
|
|
48
|
-
2. Run the following command to build the docker image:
|
|
49
|
-
|
|
50
|
-
```bash
|
|
51
|
-
airbyte-ci connectors --name=source-github build
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
An image will be available on your host with the tag `airbyte/source-github:dev`.
|
|
55
|
-
|
|
56
|
-
### Running as a docker container
|
|
57
|
-
|
|
58
|
-
Then run any of the connector commands as follows:
|
|
59
|
-
|
|
60
|
-
```
|
|
61
|
-
docker run --rm airbyte/source-github:dev spec
|
|
62
|
-
docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-github:dev check --config /secrets/config.json
|
|
63
|
-
docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-github:dev discover --config /secrets/config.json
|
|
64
|
-
docker run --rm -v $(pwd)/secrets:/secrets -v $(pwd)/integration_tests:/integration_tests airbyte/source-github:dev read --config /secrets/config.json --catalog /integration_tests/configured_catalog.json
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
### Running our CI test suite
|
|
68
|
-
|
|
69
|
-
You can run our full test suite locally using [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md):
|
|
70
|
-
|
|
71
|
-
```bash
|
|
72
|
-
airbyte-ci connectors --name=source-github test
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
### Customizing acceptance Tests
|
|
76
|
-
|
|
77
|
-
Customize `acceptance-test-config.yml` file to configure acceptance tests. See [Connector Acceptance Tests](https://docs.airbyte.com/connector-development/testing-connectors/connector-acceptance-tests-reference) for more information.
|
|
78
|
-
If your connector requires to create or destroy resources for use during acceptance tests create fixtures for it and place them inside integration_tests/acceptance.py.
|
|
79
|
-
|
|
80
|
-
### Dependency Management
|
|
81
|
-
|
|
82
|
-
All of your dependencies should be managed via Poetry.
|
|
83
|
-
To add a new dependency, run:
|
|
84
|
-
|
|
85
|
-
```bash
|
|
86
|
-
poetry add <package-name>
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
Please commit the changes to `pyproject.toml` and `poetry.lock` files.
|
|
90
|
-
|
|
91
|
-
## Publishing a new version of the connector
|
|
92
|
-
|
|
93
|
-
You've checked out the repo, implemented a million dollar feature, and you're ready to share your changes with the world. Now what?
|
|
94
|
-
|
|
95
|
-
1. Make sure your changes are passing our test suite: `airbyte-ci connectors --name=source-github test`
|
|
96
|
-
2. Bump the connector version (please follow [semantic versioning for connectors](https://docs.airbyte.com/contributing-to-airbyte/resources/pull-requests-handbook/#semantic-versioning-for-connectors)):
|
|
97
|
-
- bump the `dockerImageTag` value in in `metadata.yaml`
|
|
98
|
-
- bump the `version` value in `pyproject.toml`
|
|
99
|
-
3. Make sure the `metadata.yaml` content is up to date.
|
|
100
|
-
4. Make sure the connector documentation and its changelog is up to date (`docs/integrations/sources/github.md`).
|
|
101
|
-
5. Create a Pull Request: use [our PR naming conventions](https://docs.airbyte.com/contributing-to-airbyte/resources/pull-requests-handbook/#pull-request-title-convention).
|
|
102
|
-
6. Pat yourself on the back for being an awesome contributor.
|
|
103
|
-
7. Someone from Airbyte will take a look at your PR and iterate with you to merge it into master.
|
|
104
|
-
8. Once your PR is merged, the new version of the connector will be automatically published to Docker Hub and our connector registry.
|
|
File without changes
|
{airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/backoff_strategies.py
RENAMED
|
File without changes
|
{airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/config_migrations.py
RENAMED
|
File without changes
|
|
File without changes
|
{airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/github_schema.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/assignees.json
RENAMED
|
File without changes
|
{airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/branches.json
RENAMED
|
File without changes
|
|
File without changes
|
{airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/comments.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/commits.json
RENAMED
|
File without changes
|
|
File without changes
|
{airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/deployments.json
RENAMED
|
File without changes
|
{airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/events.json
RENAMED
|
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.27 → airbyte_source_github-2.1.29}/source_github/schemas/issues.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/projects.json
RENAMED
|
File without changes
|
{airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/projects_v2.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/releases.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/reviews.json
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
|
{airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/shared/user.json
RENAMED
|
File without changes
|
|
File without changes
|
{airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/stargazers.json
RENAMED
|
File without changes
|
{airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/tags.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/teams.json
RENAMED
|
File without changes
|
{airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/users.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{airbyte_source_github-2.1.27 → airbyte_source_github-2.1.29}/source_github/schemas/workflows.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|