airbyte-source-github 1.5.7__py3-none-any.whl → 1.6.1__py3-none-any.whl

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 (40) hide show
  1. airbyte_source_github-1.6.1.dist-info/METADATA +111 -0
  2. {airbyte_source_github-1.5.7.dist-info → airbyte_source_github-1.6.1.dist-info}/RECORD +22 -48
  3. {airbyte_source_github-1.5.7.dist-info → airbyte_source_github-1.6.1.dist-info}/WHEEL +1 -2
  4. airbyte_source_github-1.6.1.dist-info/entry_points.txt +3 -0
  5. source_github/schemas/collaborators.json +8 -2
  6. source_github/schemas/issue_events.json +93 -0
  7. source_github/schemas/issue_timeline_events.json +1 -1
  8. source_github/schemas/pull_requests.json +9 -0
  9. source_github/schemas/repositories.json +16 -0
  10. source_github/schemas/shared/events/cross_referenced.json +38 -0
  11. source_github/source.py +3 -0
  12. source_github/streams.py +4 -4
  13. airbyte_source_github-1.5.7.dist-info/METADATA +0 -144
  14. airbyte_source_github-1.5.7.dist-info/entry_points.txt +0 -2
  15. airbyte_source_github-1.5.7.dist-info/top_level.txt +0 -3
  16. integration_tests/__init__.py +0 -0
  17. integration_tests/abnormal_state.json +0 -237
  18. integration_tests/acceptance.py +0 -16
  19. integration_tests/configured_catalog.json +0 -435
  20. integration_tests/configured_catalog_full_refresh_test.json +0 -415
  21. integration_tests/invalid_config.json +0 -5
  22. integration_tests/sample_config.json +0 -5
  23. integration_tests/sample_state.json +0 -137
  24. unit_tests/__init__.py +0 -3
  25. unit_tests/conftest.py +0 -29
  26. unit_tests/projects_v2_pull_requests_query.json +0 -3
  27. unit_tests/pull_request_stats_query.json +0 -3
  28. unit_tests/responses/contributor_activity_response.json +0 -33
  29. unit_tests/responses/graphql_reviews_responses.json +0 -405
  30. unit_tests/responses/issue_timeline_events.json +0 -166
  31. unit_tests/responses/issue_timeline_events_response.json +0 -170
  32. unit_tests/responses/projects_v2_response.json +0 -45
  33. unit_tests/responses/pull_request_comment_reactions.json +0 -744
  34. unit_tests/responses/pull_request_stats_response.json +0 -317
  35. unit_tests/test_migrations/test_config.json +0 -8
  36. unit_tests/test_migrations/test_new_config.json +0 -8
  37. unit_tests/test_multiple_token_authenticator.py +0 -160
  38. unit_tests/test_source.py +0 -326
  39. unit_tests/test_stream.py +0 -1471
  40. unit_tests/utils.py +0 -78
@@ -0,0 +1,111 @@
1
+ Metadata-Version: 2.1
2
+ Name: airbyte-source-github
3
+ Version: 1.6.1
4
+ Summary: Source implementation for Github.
5
+ Home-page: https://airbyte.com
6
+ License: MIT
7
+ Author: Airbyte
8
+ Author-email: contact@airbyte.io
9
+ Requires-Python: >=3.9,<3.12
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.9
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Requires-Dist: airbyte-cdk (==0.60.1)
16
+ Requires-Dist: sgqlc (==16.3)
17
+ Project-URL: Documentation, https://docs.airbyte.com/integrations/sources/github
18
+ Project-URL: Repository, https://github.com/airbytehq/airbyte
19
+ Description-Content-Type: text/markdown
20
+
21
+ # Github source connector
22
+
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
+ * Python (~=3.9)
31
+ * Poetry (~=1.7) - installation instructions [here](https://python-poetry.org/docs/#installation)
32
+
33
+
34
+ ### Installing the connector
35
+ From this connector directory, run:
36
+ ```bash
37
+ poetry install --with dev
38
+ ```
39
+
40
+
41
+ ### Create credentials
42
+ **If you are a community contributor**, follow the instructions in the [documentation](https://docs.airbyte.com/integrations/sources/github)
43
+ to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `source_github/spec.yaml` file.
44
+ Note that any directory named `secrets` is gitignored across the entire Airbyte repo, so there is no danger of accidentally checking in sensitive information.
45
+ See `sample_files/sample_config.json` for a sample config file.
46
+
47
+
48
+ ### Locally running the connector
49
+ ```
50
+ poetry run source-github spec
51
+ poetry run source-github check --config secrets/config.json
52
+ poetry run source-github discover --config secrets/config.json
53
+ poetry run source-github read --config secrets/config.json --catalog sample_files/configured_catalog.json
54
+ ```
55
+
56
+ ### Running unit tests
57
+ To run unit tests locally, from the connector directory run:
58
+ ```
59
+ poetry run pytest unit_tests
60
+ ```
61
+
62
+ ### Building the docker image
63
+ 1. Install [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md)
64
+ 2. Run the following command to build the docker image:
65
+ ```bash
66
+ airbyte-ci connectors --name=source-github build
67
+ ```
68
+
69
+ An image will be available on your host with the tag `airbyte/source-github:dev`.
70
+
71
+
72
+ ### Running as a docker container
73
+ Then run any of the connector commands as follows:
74
+ ```
75
+ docker run --rm airbyte/source-github:dev spec
76
+ docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-github:dev check --config /secrets/config.json
77
+ docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-github:dev discover --config /secrets/config.json
78
+ 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
79
+ ```
80
+
81
+ ### Running our CI test suite
82
+ You can run our full test suite locally using [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md):
83
+ ```bash
84
+ airbyte-ci connectors --name=source-github test
85
+ ```
86
+
87
+ ### Customizing acceptance Tests
88
+ 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.
89
+ 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.
90
+
91
+ ### Dependency Management
92
+ All of your dependencies should be managed via Poetry.
93
+ To add a new dependency, run:
94
+ ```bash
95
+ poetry add <package-name>
96
+ ```
97
+
98
+ Please commit the changes to `pyproject.toml` and `poetry.lock` files.
99
+
100
+ ## Publishing a new version of the connector
101
+ You've checked out the repo, implemented a million dollar feature, and you're ready to share your changes with the world. Now what?
102
+ 1. Make sure your changes are passing our test suite: `airbyte-ci connectors --name=source-github test`
103
+ 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)):
104
+ - bump the `dockerImageTag` value in in `metadata.yaml`
105
+ - bump the `version` value in `pyproject.toml`
106
+ 3. Make sure the `metadata.yaml` content is up to date.
107
+ 4. Make sure the connector documentation and its changelog is up to date (`docs/integrations/sources/github.md`).
108
+ 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).
109
+ 6. Pat yourself on the back for being an awesome contributor.
110
+ 7. Someone from Airbyte will take a look at your PR and iterate with you to merge it into master.
111
+ 8. Once your PR is merged, the new version of the connector will be automatically published to Docker Hub and our connector registry.
@@ -1,24 +1,12 @@
1
- integration_tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- integration_tests/abnormal_state.json,sha256=y8KcPpt_OrNyCI3oIlMNOIavEchdDl4x2hcIhiWDN_c,5789
3
- integration_tests/acceptance.py,sha256=8eU9iSDbmHyufPvAouJGhPMgPAFTCP8IKIKHLm7u5TE,435
4
- integration_tests/configured_catalog.json,sha256=rV_ZlX9TzzRiF5D_W8K-2g5zkxPZwIc89r-3Fl-xS8w,12972
5
- integration_tests/configured_catalog_full_refresh_test.json,sha256=0IScHUkjFyXVtygzpbi8uB2sRCUBlD0v4dr2idnQ2lw,12384
6
- integration_tests/invalid_config.json,sha256=2Qf61mlb3GGPncBW_KP-icx-9KPn6fDVMpsoN0-X3p8,139
7
- integration_tests/sample_config.json,sha256=oaMjKF6oIJVIcXzg0iRIw_PCRQ1jBXa5vvoo5b497n0,123
8
- integration_tests/sample_state.json,sha256=Uk-rg2pglkjGYF3PB5616ASOjUD3pHfQZQp8nAJAuXE,3272
9
1
  source_github/__init__.py,sha256=punPc3v0mXEYOun7cbkfM5KUhgjv72B9DgDhI4VtzcQ,1134
10
2
  source_github/config_migrations.py,sha256=Dq-x0yoQNLpcO6ZwRJDfd3Mhuk4SSQDjEVfhOpto_Xc,3849
11
3
  source_github/constants.py,sha256=Hj3Q4y7OoU-Iff4m9gEC2CjwmWJYXhNbHVNjg8EBLmQ,238
12
4
  source_github/github_schema.py,sha256=JHFeNATAjLjB2RvdPJks1JMrCotipLBAOnpikp30oUI,1600314
13
5
  source_github/graphql.py,sha256=csp3C9Mgf5MIzShbRlb1DWffZ1qRnZzmXwmfHpfUP5U,11625
14
6
  source_github/run.py,sha256=onA-rP2aVhWHvDquKZdR1381CU66rnzqJ7EFMS5dd4Q,407
15
- source_github/source.py,sha256=ezpU8PjkVPwsNxN5BJYrI4bLNAUwTNkMlo2b0LwFwQs,15567
16
- source_github/spec.json,sha256=_L8sFYPPMeUTRqXOza0IISyR3c2E5u4aHThKMQA2r4s,7096
17
- source_github/streams.py,sha256=WFoKCAcIU6D0iD2f9Nww10ZOEA_-vLz-5h76nUdSft8,74739
18
- source_github/utils.py,sha256=DfAHFjsF8hzDXeSCR6qtfs7W_av6o2BkkEVhtHpWbis,5462
19
7
  source_github/schemas/assignees.json,sha256=NBC1_AfEC2CSSdijrrt6m5hBBcdTiWpkZTYxJGCmqJ4,1232
20
8
  source_github/schemas/branches.json,sha256=6A4HWJbmPzWCftc2r6qkOsDRQGSQZcXb5AcIrrOYi2M,1015
21
- source_github/schemas/collaborators.json,sha256=wecCoA5aVQmM3p1hssZIRrRcuvZZKogy61qH0qIyPwo,1584
9
+ source_github/schemas/collaborators.json,sha256=MhphW6Nw0sUmO_fZ4il90mUQ2Izgd_VdGJBqflRyei0,1724
22
10
  source_github/schemas/comments.json,sha256=GpUi1ZWpuer0prYLqbwCvKLPWU687qsgiabqlYAb3og,2191
23
11
  source_github/schemas/commit_comment_reactions.json,sha256=OxGmHXvft7upViZReEOmhT1jLJcQv2O0sH9WLMY8rBo,87
24
12
  source_github/schemas/commit_comments.json,sha256=4ys_Sq_MqFIY8zrt9TVU-brKJLNnpfi0fcR9zmROmQg,984
@@ -27,11 +15,11 @@ source_github/schemas/contributor_activity.json,sha256=K06885JTGNa9ECWHR1NaL66fn
27
15
  source_github/schemas/deployments.json,sha256=kGIXwF0UOQ6kxErJczpKSIb6DlOg76OwI-lak71C-ws,1478
28
16
  source_github/schemas/events.json,sha256=NMvo8wwjSwyMppnKCai6wepWRCndIJtt3VWGDQvUJkE,1228
29
17
  source_github/schemas/issue_comment_reactions.json,sha256=OxGmHXvft7upViZReEOmhT1jLJcQv2O0sH9WLMY8rBo,87
30
- source_github/schemas/issue_events.json,sha256=g6p11u4Gkw3gcAKi_9Y1Fojm25pXOKZ3d7CyhGk-Z2c,7690
18
+ source_github/schemas/issue_events.json,sha256=9IOYcBiaqEC-g2ES2spJ36fowWwHfRshWt8VBZ8pFpY,10180
31
19
  source_github/schemas/issue_labels.json,sha256=uRZhZTLByG8pIH5pkaKk-PJVDvgIymp5YMuRz11OzK4,543
32
20
  source_github/schemas/issue_milestones.json,sha256=FZsUGAN6VXKZnp0dj8pEO1PWIMqctSW3JVqQCrPW-8w,1168
33
21
  source_github/schemas/issue_reactions.json,sha256=ZZvVDcTgI2_2VL6L5WRj6XJ6Jb5lzxL5Rfc3U4Rw6WE,516
34
- source_github/schemas/issue_timeline_events.json,sha256=5b4t_TDC9pz3_vVcjoqPynZAmad2huf5zaYopBcs0q0,26852
22
+ source_github/schemas/issue_timeline_events.json,sha256=vWugbBHa73spxVEPsxbhAdsDZcR_ysus3a0uKA59y8A,26850
35
23
  source_github/schemas/issues.json,sha256=xKBjH2f8-yn15nzH0YWhf3UhmUzgyIQ1EXoSnRBVOMc,6210
36
24
  source_github/schemas/organizations.json,sha256=ml4GWlkK7Jtj5qWENDE6RuZXkX8XRX6317W4QfIUM7U,4605
37
25
  source_github/schemas/project_cards.json,sha256=-5hHtTlkD3ixf8GhcHJYOW_gXRABKYF372INBEOL7HM,910
@@ -41,11 +29,20 @@ source_github/schemas/projects_v2.json,sha256=hfVTsSWo927HLWyTbFAFX1I_SQ7fydqavT
41
29
  source_github/schemas/pull_request_comment_reactions.json,sha256=7OMdy2lJD3RIjfliCdWXOZZAeYLPDPOC8HPNWnEPLYs,504
42
30
  source_github/schemas/pull_request_commits.json,sha256=nT_dxQgjcYbWfOTQ9m3g09iA4OCHN_TYNDPxq4tjsZM,2619
43
31
  source_github/schemas/pull_request_stats.json,sha256=Q5Y8pglDQZz1NWQFsKd0wFQjlRRPmfQUguKLqbmIVQc,1717
44
- source_github/schemas/pull_requests.json,sha256=VxO6GHrl1s037MYvtOi1nGIuW9QoG3Vf8WL7RsDoBLI,7944
32
+ source_github/schemas/pull_requests.json,sha256=Va67DsN86B-iCP-aWpVcBMlY-UMJoIxuENNsprsIEW4,8128
45
33
  source_github/schemas/releases.json,sha256=giNYrIBROn9lmloB_PwA1t9w6FOF93-cK6fbi6gIaFo,2682
46
- source_github/schemas/repositories.json,sha256=nSUz6viF5QsntsLsuuzVAk3aQHy_Rs4v7qs2Iyvquq8,6460
34
+ source_github/schemas/repositories.json,sha256=2csKt-kNrap3pY3GIwIqQY-HrJNMoEdsRXELnwAc1jM,6878
47
35
  source_github/schemas/review_comments.json,sha256=tR0LLf3MUp_xaZ4lE8NCSHg7019zAta-MhvjHljLBRc,2394
48
36
  source_github/schemas/reviews.json,sha256=yKJsTgfs4tTLDKi6v7sLFxIY_n-Z6IBz6_0FT1oiTYY,1374
37
+ source_github/schemas/shared/events/comment.json,sha256=w8xBeZh1t2RDn920iEuIkkny3sPH5GgGD-GKytlCrVk,7387
38
+ source_github/schemas/shared/events/commented.json,sha256=_orCbQap7x_WwFI7mOhNWl7fo8l6yu-wrgJSVhD3jBA,4197
39
+ source_github/schemas/shared/events/committed.json,sha256=3JBZKGgZ3zAjrOwfTDNexmmQKDvlx_TWQTBcxtBSAPY,1443
40
+ source_github/schemas/shared/events/cross_referenced.json,sha256=GWJAp9xIB_Sbg_K8T3la2EcWk3h9vJ6A6WsMjPLn3dw,36914
41
+ source_github/schemas/shared/events/reviewed.json,sha256=DSsE2RDjoqWtn9ZZKj0w5DPSB5WM5jV6TdxhCsSyI6w,2764
42
+ source_github/schemas/shared/reaction.json,sha256=CqZDoD0tp1dqv_kCYD7RCxGABcZzrHmv7Dx4I9zcJTU,449
43
+ source_github/schemas/shared/reactions.json,sha256=8vo2QDUoqX8U88LJasRw6XtBxWeWqKxMeolXac3sOOQ,616
44
+ source_github/schemas/shared/user.json,sha256=IkeVSNG_2qsRMV2TorrzCIKxZjNXYjG6WVyXcKQ14es,1135
45
+ source_github/schemas/shared/user_graphql.json,sha256=gdTR-fzvWK8403eJYDlOt-7uWqtDvYQDlafOAiiw0PM,453
49
46
  source_github/schemas/stargazers.json,sha256=dov682MekgOtalXf3yGXTnU5VyQXm-jn5067FrYBdDw,336
50
47
  source_github/schemas/tags.json,sha256=v7Ls_hykDXiKmCH7ImC8dEFBx7qCt20ayKKX_taqZL8,601
51
48
  source_github/schemas/team_members.json,sha256=TuH4Ina5BIiZI6hCgh7pF2EIZkxhMNsNQqXXWgscqUk,1273
@@ -55,34 +52,11 @@ source_github/schemas/users.json,sha256=xASJmm56AqLYxSCfn5qlPy0xUVJOW8K3gWlwRr4J
55
52
  source_github/schemas/workflow_jobs.json,sha256=ORowQYqvJhJE2EEV1jXyQSPCFmtO6NyhJZGTgpXte1Q,2089
56
53
  source_github/schemas/workflow_runs.json,sha256=JWK1p1HQI2dDnutF4rd7gPG7Nx1_RJL2VXIka4KQwMQ,10171
57
54
  source_github/schemas/workflows.json,sha256=zvtOslS-veNo5_iXmMxMNlY8OOt8DdvTZ3hjtdJbdvY,753
58
- source_github/schemas/shared/reaction.json,sha256=CqZDoD0tp1dqv_kCYD7RCxGABcZzrHmv7Dx4I9zcJTU,449
59
- source_github/schemas/shared/reactions.json,sha256=8vo2QDUoqX8U88LJasRw6XtBxWeWqKxMeolXac3sOOQ,616
60
- source_github/schemas/shared/user.json,sha256=IkeVSNG_2qsRMV2TorrzCIKxZjNXYjG6WVyXcKQ14es,1135
61
- source_github/schemas/shared/user_graphql.json,sha256=gdTR-fzvWK8403eJYDlOt-7uWqtDvYQDlafOAiiw0PM,453
62
- source_github/schemas/shared/events/comment.json,sha256=w8xBeZh1t2RDn920iEuIkkny3sPH5GgGD-GKytlCrVk,7387
63
- source_github/schemas/shared/events/commented.json,sha256=_orCbQap7x_WwFI7mOhNWl7fo8l6yu-wrgJSVhD3jBA,4197
64
- source_github/schemas/shared/events/committed.json,sha256=3JBZKGgZ3zAjrOwfTDNexmmQKDvlx_TWQTBcxtBSAPY,1443
65
- source_github/schemas/shared/events/cross_referenced.json,sha256=lwVhZoT3KX7c6Nnuco9bQI6VoiwuXyyNIUjux7cECJY,35782
66
- source_github/schemas/shared/events/reviewed.json,sha256=DSsE2RDjoqWtn9ZZKj0w5DPSB5WM5jV6TdxhCsSyI6w,2764
67
- unit_tests/__init__.py,sha256=ZnqYNxHsKCgO38IwB34RQyRMXTs4GTvlRi3ImKnIioo,61
68
- unit_tests/conftest.py,sha256=SzD4lWLi1xIp00JiAzwL8-4r8Nn5RdPh2a4x0Ezmi4Y,737
69
- unit_tests/projects_v2_pull_requests_query.json,sha256=TIYBCl-cVkVbwFbLMT4M9bJFpQpr5EuGoi6ufpPdtS0,854
70
- unit_tests/pull_request_stats_query.json,sha256=GAdAbqkgCTxpGvdJGOk_rf88Z1hwk1HcBJj5XSbtiRk,1202
71
- unit_tests/test_multiple_token_authenticator.py,sha256=dTorYcfowqwX_b4K7gQ1KGRsXJBeRq2Jp7x6fA0Sa7c,6605
72
- unit_tests/test_source.py,sha256=lw6iAovpv894_6O6vs9a6IsBz6nVTAmfTeGnCKnO9e0,12447
73
- unit_tests/test_stream.py,sha256=K9C_Fgf-f7imJR-UG9pS84nOLhWaoVla4DcZVaBH5jw,57819
74
- unit_tests/utils.py,sha256=X0sgDSMYxBXGfvCbQO3rFEgfL4rxExjVu_FPsLzDDBw,3198
75
- unit_tests/responses/contributor_activity_response.json,sha256=I7ha5cp6AHSStgs5PT7sczjAXJA8nDNTIMeRBz1C2rA,1186
76
- unit_tests/responses/graphql_reviews_responses.json,sha256=y6wc8mR8Qglbm_TbfUorcqk6jUzAHpg95AnuQn-mJeE,11725
77
- unit_tests/responses/issue_timeline_events.json,sha256=myZPxHB3go2pXA-WKVH6-sfs5Siyqo4U0gIEU8bAknU,7800
78
- unit_tests/responses/issue_timeline_events_response.json,sha256=2wqFrIlhY-Cs7JD2Pclc6ul-ZM80GkTQWa39UWc1ceo,8243
79
- unit_tests/responses/projects_v2_response.json,sha256=DI_sZ5cjY6GNnR4JNZwmS6-g46xUd-Ri_-K3cbIT6bM,1380
80
- unit_tests/responses/pull_request_comment_reactions.json,sha256=RIv5DZ2u0k_iMpKth9We3dldVMewJpHeSt3qODXThH0,22304
81
- unit_tests/responses/pull_request_stats_response.json,sha256=kDftXyjxGnMQSLt71rXmTTh9S2Ih1rtBAXV4Ytgo3w8,9059
82
- unit_tests/test_migrations/test_config.json,sha256=EO3VwmDU1C76VU2utbBISKIzX7HQYT_L4jutzEct9JQ,256
83
- unit_tests/test_migrations/test_new_config.json,sha256=gLIR04cyblFxS9JKbL-AM6y2Czuklq1EdzJuzC5_-Qo,270
84
- airbyte_source_github-1.5.7.dist-info/METADATA,sha256=gWpLSoeMhIAas1MjWUX2VwseRpyLj-KR6XKEyzBmiAg,7566
85
- airbyte_source_github-1.5.7.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
86
- airbyte_source_github-1.5.7.dist-info/entry_points.txt,sha256=PJ6agLA7LwES2PTquhQdOvoWYCfXWQQqvPdyAzVZi8U,56
87
- airbyte_source_github-1.5.7.dist-info/top_level.txt,sha256=dTXVjjrRCSUCL5rRbxwFIdanxAk9q5mRuBxfuaM9hqI,43
88
- airbyte_source_github-1.5.7.dist-info/RECORD,,
55
+ source_github/source.py,sha256=MSAwf6DCNMhu6Pu6ADPR7EfOIYYDnYf8bnx1LHG6LY4,15612
56
+ source_github/spec.json,sha256=_L8sFYPPMeUTRqXOza0IISyR3c2E5u4aHThKMQA2r4s,7096
57
+ source_github/streams.py,sha256=kpE6FAdkT9w3Uqh3A8RHryeju0uU0LHfWYDcY8Zr8F8,74813
58
+ source_github/utils.py,sha256=DfAHFjsF8hzDXeSCR6qtfs7W_av6o2BkkEVhtHpWbis,5462
59
+ airbyte_source_github-1.6.1.dist-info/METADATA,sha256=TzRTvuksTWgZKWFmvLgDsMsPaTywp7XeTdwT2Zbgews,5230
60
+ airbyte_source_github-1.6.1.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
61
+ airbyte_source_github-1.6.1.dist-info/entry_points.txt,sha256=gYhqVrTAZvMwuYByg0b_-o115yUFLLcfNxMrLZmiW9k,55
62
+ airbyte_source_github-1.6.1.dist-info/RECORD,,
@@ -1,5 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.42.0)
2
+ Generator: poetry-core 1.8.1
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
-
@@ -0,0 +1,3 @@
1
+ [console_scripts]
2
+ source-github=source_github.run:run
3
+
@@ -65,13 +65,19 @@
65
65
  "permissions": {
66
66
  "type": ["null", "object"],
67
67
  "properties": {
68
- "pull": {
68
+ "admin": {
69
+ "type": ["null", "boolean"]
70
+ },
71
+ "maintain": {
69
72
  "type": ["null", "boolean"]
70
73
  },
71
74
  "push": {
72
75
  "type": ["null", "boolean"]
73
76
  },
74
- "admin": {
77
+ "pull": {
78
+ "type": ["null", "boolean"]
79
+ },
80
+ "triage": {
75
81
  "type": ["null", "boolean"]
76
82
  }
77
83
  }
@@ -50,6 +50,99 @@
50
50
  "issue": {
51
51
  "type": ["null", "object"],
52
52
  "properties": {
53
+ "active_lock_reason": {
54
+ "type": ["null", "string"]
55
+ },
56
+ "assignee": {
57
+ "$ref": "user.json"
58
+ },
59
+ "assignees": {
60
+ "type": ["null", "array"],
61
+ "items": {
62
+ "$ref": "user.json"
63
+ }
64
+ },
65
+ "author_association": {
66
+ "type": ["null", "string"]
67
+ },
68
+ "closed_at": {
69
+ "type": ["null", "string"],
70
+ "format": "date-time"
71
+ },
72
+ "updated_at": {
73
+ "type": ["null", "string"],
74
+ "format": "date-time"
75
+ },
76
+ "comments": {
77
+ "type": ["null", "integer"]
78
+ },
79
+ "draft": {
80
+ "type": ["null", "boolean"]
81
+ },
82
+ "created_at": {
83
+ "type": ["null", "string"],
84
+ "format": "date-time"
85
+ },
86
+ "labels": {
87
+ "type": ["null", "array"],
88
+ "items": {
89
+ "type": ["null", "object"],
90
+ "properties": {
91
+ "id": {
92
+ "type": ["null", "integer"]
93
+ },
94
+ "node_id": {
95
+ "type": ["null", "string"]
96
+ },
97
+ "url": {
98
+ "type": ["null", "string"]
99
+ },
100
+ "name": {
101
+ "type": ["null", "string"]
102
+ },
103
+ "description": {
104
+ "type": ["null", "string"]
105
+ },
106
+ "color": {
107
+ "type": ["null", "string"]
108
+ },
109
+ "default": {
110
+ "type": ["null", "boolean"]
111
+ }
112
+ }
113
+ }
114
+ },
115
+ "locked": {
116
+ "type": ["null", "boolean"]
117
+ },
118
+ "milestone": {
119
+ "type": ["null", "object"]
120
+ },
121
+ "performed_via_github_app": {
122
+ "type": ["null", "object"]
123
+ },
124
+ "state_reason": {
125
+ "type": ["null", "string"]
126
+ },
127
+ "pull_request": {
128
+ "type": ["null", "object"],
129
+ "properties": {
130
+ "merged_at": {
131
+ "type": ["string", "null"],
132
+ "format": "date-time"
133
+ },
134
+ "diff_url": { "type": ["string", "null"] },
135
+ "html_url": { "type": ["string", "null"] },
136
+ "patch_url": { "type": ["string", "null"] },
137
+ "url": { "type": ["string", "null"] }
138
+ }
139
+ },
140
+ "timeline_url": {
141
+ "type": ["null", "string"]
142
+ },
143
+ "reactions": {
144
+ "$ref": "reactions.json"
145
+ },
53
146
  "id": {
54
147
  "type": ["null", "integer"]
55
148
  },
@@ -970,7 +970,7 @@
970
970
  "$ref": "events/reviewed.json"
971
971
  },
972
972
  "commented": {
973
- "$ref": "events/commented.json"
973
+ "$ref": "events/comment.json"
974
974
  },
975
975
  "commit_commented": {
976
976
  "$ref": "events/commented.json"
@@ -244,6 +244,9 @@
244
244
  },
245
245
  "repo_id": {
246
246
  "type": ["null", "integer"]
247
+ },
248
+ "user": {
249
+ "$ref": "user.json"
247
250
  }
248
251
  }
249
252
  },
@@ -264,6 +267,12 @@
264
267
  },
265
268
  "repo_id": {
266
269
  "type": ["null", "integer"]
270
+ },
271
+ "repo": {
272
+ "type": ["null", "object"]
273
+ },
274
+ "user": {
275
+ "$ref": "user.json"
267
276
  }
268
277
  }
269
278
  },
@@ -306,6 +306,22 @@
306
306
  "type": ["null", "string"]
307
307
  }
308
308
  }
309
+ },
310
+ "secret_scanning_validity_checks": {
311
+ "type": ["null", "object"],
312
+ "properties": {
313
+ "status": {
314
+ "type": ["null", "string"]
315
+ }
316
+ }
317
+ },
318
+ "dependabot_security_updates": {
319
+ "type": ["null", "object"],
320
+ "properties": {
321
+ "status": {
322
+ "type": ["null", "string"]
323
+ }
324
+ }
309
325
  }
310
326
  }
311
327
  }
@@ -43,6 +43,8 @@
43
43
  "description": "Issues are a great way to keep track of tasks, enhancements, and bugs for your projects.",
44
44
  "type": "object",
45
45
  "properties": {
46
+ "author_association": { "type": ["string", "null"] },
47
+ "performed_via_github_app": { "type": ["object", "null"] },
46
48
  "id": { "type": "integer" },
47
49
  "node_id": { "type": "string" },
48
50
  "url": { "type": "string" },
@@ -247,6 +249,7 @@
247
249
  "locked": { "type": "boolean" },
248
250
  "active_lock_reason": { "type": ["string", "null"] },
249
251
  "comments": { "type": "integer" },
252
+ "draft": { "type": ["boolean", "null"] },
250
253
  "pull_request": {
251
254
  "type": "object",
252
255
  "properties": {
@@ -775,6 +778,41 @@
775
778
  }
776
779
  }
777
780
  }
781
+ },
782
+ "reactions": {
783
+ "type": "object",
784
+ "properties": {
785
+ "url": {
786
+ "type": "string"
787
+ },
788
+ "total_count": {
789
+ "type": "integer"
790
+ },
791
+ "+1": {
792
+ "type": "integer"
793
+ },
794
+ "-1": {
795
+ "type": "integer"
796
+ },
797
+ "laugh": {
798
+ "type": "integer"
799
+ },
800
+ "confused": {
801
+ "type": "integer"
802
+ },
803
+ "heart": {
804
+ "type": "integer"
805
+ },
806
+ "hooray": {
807
+ "type": "integer"
808
+ },
809
+ "eyes": {
810
+ "type": "integer"
811
+ },
812
+ "rocket": {
813
+ "type": "integer"
814
+ }
815
+ }
778
816
  }
779
817
  }
780
818
  }
source_github/source.py CHANGED
@@ -61,6 +61,9 @@ from .utils import read_full_refresh
61
61
 
62
62
 
63
63
  class SourceGithub(AbstractSource):
64
+
65
+ continue_sync_on_stream_failure = True
66
+
64
67
  @staticmethod
65
68
  def _get_org_repositories(config: Mapping[str, Any], authenticator: MultipleTokenAuthenticator) -> Tuple[List[str], List[str]]:
66
69
  """
source_github/streams.py CHANGED
@@ -14,6 +14,7 @@ from airbyte_cdk.models import Type as MessageType
14
14
  from airbyte_cdk.sources.streams.availability_strategy import AvailabilityStrategy
15
15
  from airbyte_cdk.sources.streams.http import HttpStream
16
16
  from airbyte_cdk.sources.streams.http.exceptions import DefaultBackoffException
17
+ from airbyte_cdk.utils import AirbyteTracedException
17
18
  from requests.exceptions import HTTPError
18
19
 
19
20
  from . import constants
@@ -214,10 +215,9 @@ class GithubStreamABC(HttpStream, ABC):
214
215
  raise e
215
216
 
216
217
  self.logger.warning(error_msg)
217
- except GitHubAPILimitException:
218
- self.logger.warning(
219
- f"Stream: `{self.name}`, slice: `{stream_slice}`. Limits for all provided tokens are reached, please try again later"
220
- )
218
+ except GitHubAPILimitException as e:
219
+ message = f"Stream: `{self.name}`, slice: `{stream_slice}`. Limits for all provided tokens are reached, please try again later"
220
+ raise AirbyteTracedException(message) from e
221
221
 
222
222
 
223
223
  class GithubStream(GithubStreamABC):
@@ -1,144 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: airbyte-source-github
3
- Version: 1.5.7
4
- Summary: Source implementation for Github.
5
- Author: Airbyte
6
- Author-email: contact@airbyte.io
7
- Description-Content-Type: text/markdown
8
- Requires-Dist: airbyte-cdk
9
- Requires-Dist: sgqlc
10
- Provides-Extra: tests
11
- Requires-Dist: requests-mock ~=1.9.3 ; extra == 'tests'
12
- Requires-Dist: pytest-mock ~=3.6.1 ; extra == 'tests'
13
- Requires-Dist: pytest ~=6.2 ; extra == 'tests'
14
- Requires-Dist: responses ~=0.23.1 ; extra == 'tests'
15
- Requires-Dist: freezegun ~=1.2 ; extra == 'tests'
16
-
17
- # Github Source
18
-
19
- This is the repository for the Github source connector, written in Python.
20
- For information about how to use this connector within Airbyte, see [the documentation](https://docs.airbyte.io/integrations/sources/github).
21
-
22
-
23
- **To iterate on this connector, make sure to complete this prerequisites section.**
24
-
25
-
26
- From this connector directory, create a virtual environment:
27
- ```
28
- python -m venv .venv
29
- ```
30
-
31
- This will generate a virtualenv for this module in `.venv/`. Make sure this venv is active in your
32
- development environment of choice. To activate it from the terminal, run:
33
- ```
34
- source .venv/bin/activate
35
- pip install -r requirements.txt
36
- pip install '.[tests]'
37
- ```
38
- If you are in an IDE, follow your IDE's instructions to activate the virtualenv.
39
-
40
- Note that while we are installing dependencies from `requirements.txt`, you should only edit `setup.py` for your dependencies. `requirements.txt` is
41
- used for editable installs (`pip install -e`) to pull in Python dependencies from the monorepo and will call `setup.py`.
42
- If this is mumbo jumbo to you, don't worry about it, just put your deps in `setup.py` but install using `pip install -r requirements.txt` and everything
43
- should work as you expect.
44
-
45
- **If you are a community contributor**, follow the instructions in the [documentation](https://docs.airbyte.io/integrations/sources/github)
46
- to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `source_github/spec.json` file.
47
- Note that any directory named `secrets` is gitignored across the entire Airbyte repo, so there is no danger of accidentally checking in sensitive information.
48
- See `integration_tests/sample_config.json` for a sample config file.
49
-
50
- **If you are an Airbyte core member**, copy the credentials in Lastpass under the secret name `source github test creds`
51
- and place them into `secrets/config.json`.
52
-
53
- ```
54
- python main.py spec
55
- python main.py check --config secrets/config.json
56
- python main.py discover --config secrets/config.json
57
- python main.py read --config secrets/config.json --catalog integration_tests/configured_catalog.json
58
- ```
59
-
60
-
61
-
62
-
63
- The Airbyte way of building this connector is to use our `airbyte-ci` tool.
64
- You can follow install instructions [here](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md#L1).
65
- Then running the following command will build your connector:
66
-
67
- ```bash
68
- airbyte-ci connectors --name=source-github build
69
- ```
70
- Once the command is done, you will find your connector image in your local docker registry: `airbyte/source-github:dev`.
71
-
72
- When contributing on our connector you might need to customize the build process to add a system dependency or set an env var.
73
- You can customize our build process by adding a `build_customization.py` module to your connector.
74
- This module should contain a `pre_connector_install` and `post_connector_install` async function that will mutate the base image and the connector container respectively.
75
- It will be imported at runtime by our build process and the functions will be called if they exist.
76
-
77
- Here is an example of a `build_customization.py` module:
78
- ```python
79
- from __future__ import annotations
80
-
81
- from typing import TYPE_CHECKING
82
-
83
- if TYPE_CHECKING:
84
- from dagger import Container
85
-
86
-
87
- async def pre_connector_install(base_image_container: Container) -> Container:
88
- return await base_image_container.with_env_variable("MY_PRE_BUILD_ENV_VAR", "my_pre_build_env_var_value")
89
-
90
- async def post_connector_install(connector_container: Container) -> Container:
91
- return await connector_container.with_env_variable("MY_POST_BUILD_ENV_VAR", "my_post_build_env_var_value")
92
- ```
93
-
94
- This connector is built using our dynamic built process in `airbyte-ci`.
95
- The base image used to build it is defined within the metadata.yaml file under the `connectorBuildOptions`.
96
- The build logic is defined using [Dagger](https://dagger.io/) [here](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/pipelines/builds/python_connectors.py).
97
- It does not rely on a Dockerfile.
98
-
99
- If you would like to patch our connector and build your own a simple approach would be to:
100
-
101
- 1. Create your own Dockerfile based on the latest version of the connector image.
102
- ```Dockerfile
103
- FROM airbyte/source-github:latest
104
-
105
- COPY . ./airbyte/integration_code
106
- RUN pip install ./airbyte/integration_code
107
-
108
- ```
109
- Please use this as an example. This is not optimized.
110
-
111
- 2. Build your image:
112
- ```bash
113
- docker build -t airbyte/source-github:dev .
114
- docker run airbyte/source-github:dev spec
115
- ```
116
- Then run any of the connector commands as follows:
117
- ```
118
- docker run --rm airbyte/source-github:dev spec
119
- docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-github:dev check --config /secrets/config.json
120
- docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-github:dev discover --config /secrets/config.json
121
- 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
122
- ```
123
-
124
- You can run our full test suite locally using [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md):
125
- ```bash
126
- airbyte-ci connectors --name=source-github test
127
- ```
128
-
129
- Customize `acceptance-test-config.yml` file to configure tests. See [Connector Acceptance Tests](https://docs.airbyte.com/connector-development/testing-connectors/connector-acceptance-tests-reference) for more information.
130
- 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.
131
-
132
- All of your dependencies should go in `setup.py`, NOT `requirements.txt`. The requirements file is only used to connect internal Airbyte dependencies in the monorepo for local development.
133
- We split dependencies between two groups, dependencies that are:
134
- * required for your connector to work need to go to `MAIN_REQUIREMENTS` list.
135
- * required for the testing need to go to `TEST_REQUIREMENTS` list
136
-
137
- You've checked out the repo, implemented a million dollar feature, and you're ready to share your changes with the world. Now what?
138
- 1. Make sure your changes are passing our test suite: `airbyte-ci connectors --name=source-github test`
139
- 2. Bump the connector version in `metadata.yaml`: increment the `dockerImageTag` value. Please follow [semantic versioning for connectors](https://docs.airbyte.com/contributing-to-airbyte/resources/pull-requests-handbook/#semantic-versioning-for-connectors).
140
- 3. Make sure the `metadata.yaml` content is up to date.
141
- 4. Make the connector documentation and its changelog is up to date (`docs/integrations/sources/github.md`).
142
- 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).
143
- 6. Pat yourself on the back for being an awesome contributor.
144
- 7. Someone from Airbyte will take a look at your PR and iterate with you to merge it into master.
@@ -1,2 +0,0 @@
1
- [console_scripts]
2
- source-github = source_github.run:run