diff --git a/airbyte-integrations/connectors/source-github/Dockerfile b/airbyte-integrations/connectors/source-github/Dockerfile index 1329fae4daa6..189ba05ed838 100644 --- a/airbyte-integrations/connectors/source-github/Dockerfile +++ b/airbyte-integrations/connectors/source-github/Dockerfile @@ -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=1.3.1 +LABEL io.airbyte.version=1.4.0 LABEL io.airbyte.name=airbyte/source-github diff --git a/airbyte-integrations/connectors/source-github/integration_tests/configured_catalog.json b/airbyte-integrations/connectors/source-github/integration_tests/configured_catalog.json index 99273b93547e..abd43868c68e 100644 --- a/airbyte-integrations/connectors/source-github/integration_tests/configured_catalog.json +++ b/airbyte-integrations/connectors/source-github/integration_tests/configured_catalog.json @@ -420,6 +420,16 @@ }, "sync_mode": "full_refresh", "destination_sync_mode": "overwrite" + }, + { + "stream": { + "name": "issue_timeline_events", + "json_schema": {}, + "supported_sync_modes": ["full_refresh"], + "source_defined_primary_key": [["repository"], ["issue_number"]] + }, + "sync_mode": "full_refresh", + "destination_sync_mode": "overwrite" } ] } diff --git a/airbyte-integrations/connectors/source-github/integration_tests/expected_records.jsonl b/airbyte-integrations/connectors/source-github/integration_tests/expected_records.jsonl index 663db891575b..196f2eb12d50 100644 --- a/airbyte-integrations/connectors/source-github/integration_tests/expected_records.jsonl +++ b/airbyte-integrations/connectors/source-github/integration_tests/expected_records.jsonl @@ -35,4 +35,7 @@ {"stream":"workflow_runs","data":{"id":3184250176,"name":"Pull Request Labeler","node_id":"WFR_kwLOF9hP9c69y81A","head_branch":"feature/branch_5","head_sha":"f71e5f6894578148d52b487dff07e55804fd9cfd","path":".github/workflows/labeler.yml","display_title":"New PR from feature/branch_5","run_number":3,"event":"pull_request_target","status":"completed","conclusion":"success","workflow_id":22952989,"check_suite_id":8611635614,"check_suite_node_id":"CS_kwDOF9hP9c8AAAACAUshng","url":"https://api.github.com/repos/airbytehq/integration-test/actions/runs/3184250176","html_url":"https://github.com/airbytehq/integration-test/actions/runs/3184250176","pull_requests":[{"url":"https://api.github.com/repos/airbytehq/integration-test/pulls/14","id":984835098,"number":14,"head":{"ref":"feature/branch_5","sha":"f71e5f6894578148d52b487dff07e55804fd9cfd","repo":{"id":400052213,"url":"https://api.github.com/repos/airbytehq/integration-test","name":"integration-test"}},"base":{"ref":"master","sha":"a12c9379604f7b32e54e5459122aa48473f806ee","repo":{"id":400052213,"url":"https://api.github.com/repos/airbytehq/integration-test","name":"integration-test"}}}],"created_at":"2022-10-04T17:41:18Z","updated_at":"2022-10-04T17:41:32Z","actor":{"login":"grubberr","id":195743,"node_id":"MDQ6VXNlcjE5NTc0Mw==","avatar_url":"https://avatars.githubusercontent.com/u/195743?v=4","gravatar_id":"","url":"https://api.github.com/users/grubberr","html_url":"https://github.com/grubberr","followers_url":"https://api.github.com/users/grubberr/followers","following_url":"https://api.github.com/users/grubberr/following{/other_user}","gists_url":"https://api.github.com/users/grubberr/gists{/gist_id}","starred_url":"https://api.github.com/users/grubberr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grubberr/subscriptions","organizations_url":"https://api.github.com/users/grubberr/orgs","repos_url":"https://api.github.com/users/grubberr/repos","events_url":"https://api.github.com/users/grubberr/events{/privacy}","received_events_url":"https://api.github.com/users/grubberr/received_events","type":"User","site_admin":false},"run_attempt":1,"referenced_workflows":[],"run_started_at":"2022-10-04T17:41:18Z","triggering_actor":{"login":"grubberr","id":195743,"node_id":"MDQ6VXNlcjE5NTc0Mw==","avatar_url":"https://avatars.githubusercontent.com/u/195743?v=4","gravatar_id":"","url":"https://api.github.com/users/grubberr","html_url":"https://github.com/grubberr","followers_url":"https://api.github.com/users/grubberr/followers","following_url":"https://api.github.com/users/grubberr/following{/other_user}","gists_url":"https://api.github.com/users/grubberr/gists{/gist_id}","starred_url":"https://api.github.com/users/grubberr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grubberr/subscriptions","organizations_url":"https://api.github.com/users/grubberr/orgs","repos_url":"https://api.github.com/users/grubberr/repos","events_url":"https://api.github.com/users/grubberr/events{/privacy}","received_events_url":"https://api.github.com/users/grubberr/received_events","type":"User","site_admin":false},"jobs_url":"https://api.github.com/repos/airbytehq/integration-test/actions/runs/3184250176/jobs","logs_url":"https://api.github.com/repos/airbytehq/integration-test/actions/runs/3184250176/logs","check_suite_url":"https://api.github.com/repos/airbytehq/integration-test/check-suites/8611635614","artifacts_url":"https://api.github.com/repos/airbytehq/integration-test/actions/runs/3184250176/artifacts","cancel_url":"https://api.github.com/repos/airbytehq/integration-test/actions/runs/3184250176/cancel","rerun_url":"https://api.github.com/repos/airbytehq/integration-test/actions/runs/3184250176/rerun","previous_attempt_url":null,"workflow_url":"https://api.github.com/repos/airbytehq/integration-test/actions/workflows/22952989","head_commit":{"id":"f71e5f6894578148d52b487dff07e55804fd9cfd","tree_id":"bb78ec62be8c5c640010e7c897f40932ce59e725","message":"file_5.txt updated\n\nSigned-off-by: Sergey Chvalyuk ","timestamp":"2022-10-04T17:41:08Z","author":{"name":"Sergey Chvalyuk","email":"grubberr@gmail.com"},"committer":{"name":"Sergey Chvalyuk","email":"grubberr@gmail.com"}},"repository":{"id":400052213,"node_id":"MDEwOlJlcG9zaXRvcnk0MDAwNTIyMTM=","name":"integration-test","full_name":"airbytehq/integration-test","private":false,"owner":{"login":"airbytehq","id":59758427,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU5NzU4NDI3","avatar_url":"https://avatars.githubusercontent.com/u/59758427?v=4","gravatar_id":"","url":"https://api.github.com/users/airbytehq","html_url":"https://github.com/airbytehq","followers_url":"https://api.github.com/users/airbytehq/followers","following_url":"https://api.github.com/users/airbytehq/following{/other_user}","gists_url":"https://api.github.com/users/airbytehq/gists{/gist_id}","starred_url":"https://api.github.com/users/airbytehq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/airbytehq/subscriptions","organizations_url":"https://api.github.com/users/airbytehq/orgs","repos_url":"https://api.github.com/users/airbytehq/repos","events_url":"https://api.github.com/users/airbytehq/events{/privacy}","received_events_url":"https://api.github.com/users/airbytehq/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/airbytehq/integration-test","description":"Used for integration testing the Github source connector","fork":false,"url":"https://api.github.com/repos/airbytehq/integration-test","forks_url":"https://api.github.com/repos/airbytehq/integration-test/forks","keys_url":"https://api.github.com/repos/airbytehq/integration-test/keys{/key_id}","collaborators_url":"https://api.github.com/repos/airbytehq/integration-test/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/airbytehq/integration-test/teams","hooks_url":"https://api.github.com/repos/airbytehq/integration-test/hooks","issue_events_url":"https://api.github.com/repos/airbytehq/integration-test/issues/events{/number}","events_url":"https://api.github.com/repos/airbytehq/integration-test/events","assignees_url":"https://api.github.com/repos/airbytehq/integration-test/assignees{/user}","branches_url":"https://api.github.com/repos/airbytehq/integration-test/branches{/branch}","tags_url":"https://api.github.com/repos/airbytehq/integration-test/tags","blobs_url":"https://api.github.com/repos/airbytehq/integration-test/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/airbytehq/integration-test/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/airbytehq/integration-test/git/refs{/sha}","trees_url":"https://api.github.com/repos/airbytehq/integration-test/git/trees{/sha}","statuses_url":"https://api.github.com/repos/airbytehq/integration-test/statuses/{sha}","languages_url":"https://api.github.com/repos/airbytehq/integration-test/languages","stargazers_url":"https://api.github.com/repos/airbytehq/integration-test/stargazers","contributors_url":"https://api.github.com/repos/airbytehq/integration-test/contributors","subscribers_url":"https://api.github.com/repos/airbytehq/integration-test/subscribers","subscription_url":"https://api.github.com/repos/airbytehq/integration-test/subscription","commits_url":"https://api.github.com/repos/airbytehq/integration-test/commits{/sha}","git_commits_url":"https://api.github.com/repos/airbytehq/integration-test/git/commits{/sha}","comments_url":"https://api.github.com/repos/airbytehq/integration-test/comments{/number}","issue_comment_url":"https://api.github.com/repos/airbytehq/integration-test/issues/comments{/number}","contents_url":"https://api.github.com/repos/airbytehq/integration-test/contents/{+path}","compare_url":"https://api.github.com/repos/airbytehq/integration-test/compare/{base}...{head}","merges_url":"https://api.github.com/repos/airbytehq/integration-test/merges","archive_url":"https://api.github.com/repos/airbytehq/integration-test/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/airbytehq/integration-test/downloads","issues_url":"https://api.github.com/repos/airbytehq/integration-test/issues{/number}","pulls_url":"https://api.github.com/repos/airbytehq/integration-test/pulls{/number}","milestones_url":"https://api.github.com/repos/airbytehq/integration-test/milestones{/number}","notifications_url":"https://api.github.com/repos/airbytehq/integration-test/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/airbytehq/integration-test/labels{/name}","releases_url":"https://api.github.com/repos/airbytehq/integration-test/releases{/id}","deployments_url":"https://api.github.com/repos/airbytehq/integration-test/deployments"},"head_repository":{"id":400052213,"node_id":"MDEwOlJlcG9zaXRvcnk0MDAwNTIyMTM=","name":"integration-test","full_name":"airbytehq/integration-test","private":false,"owner":{"login":"airbytehq","id":59758427,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU5NzU4NDI3","avatar_url":"https://avatars.githubusercontent.com/u/59758427?v=4","gravatar_id":"","url":"https://api.github.com/users/airbytehq","html_url":"https://github.com/airbytehq","followers_url":"https://api.github.com/users/airbytehq/followers","following_url":"https://api.github.com/users/airbytehq/following{/other_user}","gists_url":"https://api.github.com/users/airbytehq/gists{/gist_id}","starred_url":"https://api.github.com/users/airbytehq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/airbytehq/subscriptions","organizations_url":"https://api.github.com/users/airbytehq/orgs","repos_url":"https://api.github.com/users/airbytehq/repos","events_url":"https://api.github.com/users/airbytehq/events{/privacy}","received_events_url":"https://api.github.com/users/airbytehq/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/airbytehq/integration-test","description":"Used for integration testing the Github source connector","fork":false,"url":"https://api.github.com/repos/airbytehq/integration-test","forks_url":"https://api.github.com/repos/airbytehq/integration-test/forks","keys_url":"https://api.github.com/repos/airbytehq/integration-test/keys{/key_id}","collaborators_url":"https://api.github.com/repos/airbytehq/integration-test/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/airbytehq/integration-test/teams","hooks_url":"https://api.github.com/repos/airbytehq/integration-test/hooks","issue_events_url":"https://api.github.com/repos/airbytehq/integration-test/issues/events{/number}","events_url":"https://api.github.com/repos/airbytehq/integration-test/events","assignees_url":"https://api.github.com/repos/airbytehq/integration-test/assignees{/user}","branches_url":"https://api.github.com/repos/airbytehq/integration-test/branches{/branch}","tags_url":"https://api.github.com/repos/airbytehq/integration-test/tags","blobs_url":"https://api.github.com/repos/airbytehq/integration-test/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/airbytehq/integration-test/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/airbytehq/integration-test/git/refs{/sha}","trees_url":"https://api.github.com/repos/airbytehq/integration-test/git/trees{/sha}","statuses_url":"https://api.github.com/repos/airbytehq/integration-test/statuses/{sha}","languages_url":"https://api.github.com/repos/airbytehq/integration-test/languages","stargazers_url":"https://api.github.com/repos/airbytehq/integration-test/stargazers","contributors_url":"https://api.github.com/repos/airbytehq/integration-test/contributors","subscribers_url":"https://api.github.com/repos/airbytehq/integration-test/subscribers","subscription_url":"https://api.github.com/repos/airbytehq/integration-test/subscription","commits_url":"https://api.github.com/repos/airbytehq/integration-test/commits{/sha}","git_commits_url":"https://api.github.com/repos/airbytehq/integration-test/git/commits{/sha}","comments_url":"https://api.github.com/repos/airbytehq/integration-test/comments{/number}","issue_comment_url":"https://api.github.com/repos/airbytehq/integration-test/issues/comments{/number}","contents_url":"https://api.github.com/repos/airbytehq/integration-test/contents/{+path}","compare_url":"https://api.github.com/repos/airbytehq/integration-test/compare/{base}...{head}","merges_url":"https://api.github.com/repos/airbytehq/integration-test/merges","archive_url":"https://api.github.com/repos/airbytehq/integration-test/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/airbytehq/integration-test/downloads","issues_url":"https://api.github.com/repos/airbytehq/integration-test/issues{/number}","pulls_url":"https://api.github.com/repos/airbytehq/integration-test/pulls{/number}","milestones_url":"https://api.github.com/repos/airbytehq/integration-test/milestones{/number}","notifications_url":"https://api.github.com/repos/airbytehq/integration-test/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/airbytehq/integration-test/labels{/name}","releases_url":"https://api.github.com/repos/airbytehq/integration-test/releases{/id}","deployments_url":"https://api.github.com/repos/airbytehq/integration-test/deployments"}},"emitted_at":1677668766993} {"stream":"workflow_jobs","data":{"id": 8705992587, "run_id": 3184250176, "workflow_name": "Pull Request Labeler", "head_branch": "feature/branch_5", "run_url": "https://api.github.com/repos/airbytehq/integration-test/actions/runs/3184250176", "run_attempt": 1, "node_id": "CR_kwDOF9hP9c8AAAACBurniw", "head_sha": "f71e5f6894578148d52b487dff07e55804fd9cfd", "url": "https://api.github.com/repos/airbytehq/integration-test/actions/jobs/8705992587", "html_url": "https://github.com/airbytehq/integration-test/actions/runs/3184250176/job/8705992587", "status": "completed", "conclusion": "success", "created_at": "2022-10-04T17:41:20Z", "started_at": "2022-10-04T17:41:27Z", "completed_at": "2022-10-04T17:41:30Z", "name": "triage", "steps": [{"name": "Set up job", "status": "completed", "conclusion": "success", "number": 1, "started_at": "2022-10-04T20:41:26.000+03:00", "completed_at": "2022-10-04T20:41:27.000+03:00"}, {"name": "Run actions/labeler@v3", "status": "completed", "conclusion": "success", "number": 2, "started_at": "2022-10-04T20:41:27.000+03:00", "completed_at": "2022-10-04T20:41:29.000+03:00"}, {"name": "Complete job", "status": "completed", "conclusion": "success", "number": 3, "started_at": "2022-10-04T20:41:29.000+03:00", "completed_at": "2022-10-04T20:41:29.000+03:00"}], "check_run_url": "https://api.github.com/repos/airbytehq/integration-test/check-runs/8705992587", "labels": ["ubuntu-latest"], "runner_id": 1, "runner_name": "Hosted Agent", "runner_group_id": 2, "runner_group_name": "GitHub Actions", "repository": "airbytehq/integration-test"},"emitted_at":1677668767830} {"stream":"team_members","data":{"login":"sherifnada","id":6246757,"node_id":"MDQ6VXNlcjYyNDY3NTc=","avatar_url":"https://avatars.githubusercontent.com/u/6246757?v=4","gravatar_id":"","url":"https://api.github.com/users/sherifnada","html_url":"https://github.com/sherifnada","followers_url":"https://api.github.com/users/sherifnada/followers","following_url":"https://api.github.com/users/sherifnada/following{/other_user}","gists_url":"https://api.github.com/users/sherifnada/gists{/gist_id}","starred_url":"https://api.github.com/users/sherifnada/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sherifnada/subscriptions","organizations_url":"https://api.github.com/users/sherifnada/orgs","repos_url":"https://api.github.com/users/sherifnada/repos","events_url":"https://api.github.com/users/sherifnada/events{/privacy}","received_events_url":"https://api.github.com/users/sherifnada/received_events","type":"User","site_admin":false,"organization":"airbytehq","team_slug":"zazmic"},"emitted_at":1677668768649} -{"stream":"team_memberships","data":{"state":"active","role":"maintainer","url":"https://api.github.com/organizations/59758427/team/4432406/memberships/sherifnada","organization":"airbytehq","team_slug":"zazmic","username":"sherifnada"},"emitted_at":1677668779034} \ No newline at end of file +{"stream":"team_memberships","data":{"state":"active","role":"maintainer","url":"https://api.github.com/organizations/59758427/team/4432406/memberships/sherifnada","organization":"airbytehq","team_slug":"zazmic","username":"sherifnada"},"emitted_at":1677668779034} +{"stream": "issue_timeline_events", "data": {"repository": "airbytehq/integration-test", "issue_number": 6, "labeled": {"id": 5219398390, "node_id": "MDEyOkxhYmVsZWRFdmVudDUyMTkzOTgzOTA=", "url": "https://api.github.com/repos/airbytehq/integration-test/issues/events/5219398390", "actor": {"login": "gaart", "id": 743901, "node_id": "MDQ6VXNlcjc0MzkwMQ==", "avatar_url": "https://avatars.githubusercontent.com/u/743901?v=4", "gravatar_id": "", "url": "https://api.github.com/users/gaart", "html_url": "https://github.com/gaart", "followers_url": "https://api.github.com/users/gaart/followers", "following_url": "https://api.github.com/users/gaart/following{/other_user}", "gists_url": "https://api.github.com/users/gaart/gists{/gist_id}", "starred_url": "https://api.github.com/users/gaart/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gaart/subscriptions", "organizations_url": "https://api.github.com/users/gaart/orgs", "repos_url": "https://api.github.com/users/gaart/repos", "events_url": "https://api.github.com/users/gaart/events{/privacy}", "received_events_url": "https://api.github.com/users/gaart/received_events", "type": "User", "site_admin": false}, "event": "labeled", "commit_id": null, "commit_url": null, "created_at": "2021-08-27T15:43:58Z", "label": {"name": "critical", "color": "ededed"}, "performed_via_github_app": null}, "milestoned": {"id": 5219398392, "node_id": "MDE1Ok1pbGVzdG9uZWRFdmVudDUyMTkzOTgzOTI=", "url": "https://api.github.com/repos/airbytehq/integration-test/issues/events/5219398392", "actor": {"login": "gaart", "id": 743901, "node_id": "MDQ6VXNlcjc0MzkwMQ==", "avatar_url": "https://avatars.githubusercontent.com/u/743901?v=4", "gravatar_id": "", "url": "https://api.github.com/users/gaart", "html_url": "https://github.com/gaart", "followers_url": "https://api.github.com/users/gaart/followers", "following_url": "https://api.github.com/users/gaart/following{/other_user}", "gists_url": "https://api.github.com/users/gaart/gists{/gist_id}", "starred_url": "https://api.github.com/users/gaart/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gaart/subscriptions", "organizations_url": "https://api.github.com/users/gaart/orgs", "repos_url": "https://api.github.com/users/gaart/repos", "events_url": "https://api.github.com/users/gaart/events{/privacy}", "received_events_url": "https://api.github.com/users/gaart/received_events", "type": "User", "site_admin": false}, "event": "milestoned", "commit_id": null, "commit_url": null, "created_at": "2021-08-27T15:43:58Z", "milestone": {"title": "main"}, "performed_via_github_app": null}, "commented": {"url": "https://api.github.com/repos/airbytehq/integration-test/issues/comments/907296167", "html_url": "https://github.com/airbytehq/integration-test/issues/6#issuecomment-907296167", "issue_url": "https://api.github.com/repos/airbytehq/integration-test/issues/6", "id": 907296167, "node_id": "IC_kwDOF9hP9c42FD2n", "user": {"login": "gaart", "id": 743901, "node_id": "MDQ6VXNlcjc0MzkwMQ==", "avatar_url": "https://avatars.githubusercontent.com/u/743901?v=4", "gravatar_id": "", "url": "https://api.github.com/users/gaart", "html_url": "https://github.com/gaart", "followers_url": "https://api.github.com/users/gaart/followers", "following_url": "https://api.github.com/users/gaart/following{/other_user}", "gists_url": "https://api.github.com/users/gaart/gists{/gist_id}", "starred_url": "https://api.github.com/users/gaart/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gaart/subscriptions", "organizations_url": "https://api.github.com/users/gaart/orgs", "repos_url": "https://api.github.com/users/gaart/repos", "events_url": "https://api.github.com/users/gaart/events{/privacy}", "received_events_url": "https://api.github.com/users/gaart/received_events", "type": "User", "site_admin": false}, "created_at": "2021-08-27T15:43:59Z", "updated_at": "2021-08-27T15:43:59Z", "author_association": "CONTRIBUTOR", "body": "comment for issues https://api.github.com/repos/airbytehq/integration-test/issues/6/comments", "reactions": {"url": "https://api.github.com/repos/airbytehq/integration-test/issues/comments/907296167/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}, "performed_via_github_app": null, "event": "commented", "actor": {"login": "gaart", "id": 743901, "node_id": "MDQ6VXNlcjc0MzkwMQ==", "avatar_url": "https://avatars.githubusercontent.com/u/743901?v=4", "gravatar_id": "", "url": "https://api.github.com/users/gaart", "html_url": "https://github.com/gaart", "followers_url": "https://api.github.com/users/gaart/followers", "following_url": "https://api.github.com/users/gaart/following{/other_user}", "gists_url": "https://api.github.com/users/gaart/gists{/gist_id}", "starred_url": "https://api.github.com/users/gaart/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gaart/subscriptions", "organizations_url": "https://api.github.com/users/gaart/orgs", "repos_url": "https://api.github.com/users/gaart/repos", "events_url": "https://api.github.com/users/gaart/events{/privacy}", "received_events_url": "https://api.github.com/users/gaart/received_events", "type": "User", "site_admin": false}}}, "emitted_at": 1695815681406} +{"stream": "issue_timeline_events", "data": {"repository": "airbytehq/integration-test", "issue_number": 9, "labeled": {"id": 5219398888, "node_id": "MDEyOkxhYmVsZWRFdmVudDUyMTkzOTg4ODg=", "url": "https://api.github.com/repos/airbytehq/integration-test/issues/events/5219398888", "actor": {"login": "gaart", "id": 743901, "node_id": "MDQ6VXNlcjc0MzkwMQ==", "avatar_url": "https://avatars.githubusercontent.com/u/743901?v=4", "gravatar_id": "", "url": "https://api.github.com/users/gaart", "html_url": "https://github.com/gaart", "followers_url": "https://api.github.com/users/gaart/followers", "following_url": "https://api.github.com/users/gaart/following{/other_user}", "gists_url": "https://api.github.com/users/gaart/gists{/gist_id}", "starred_url": "https://api.github.com/users/gaart/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gaart/subscriptions", "organizations_url": "https://api.github.com/users/gaart/orgs", "repos_url": "https://api.github.com/users/gaart/repos", "events_url": "https://api.github.com/users/gaart/events{/privacy}", "received_events_url": "https://api.github.com/users/gaart/received_events", "type": "User", "site_admin": false}, "event": "labeled", "commit_id": null, "commit_url": null, "created_at": "2021-08-27T15:44:04Z", "label": {"name": "important", "color": "ededed"}, "performed_via_github_app": null}, "milestoned": {"id": 5219398894, "node_id": "MDE1Ok1pbGVzdG9uZWRFdmVudDUyMTkzOTg4OTQ=", "url": "https://api.github.com/repos/airbytehq/integration-test/issues/events/5219398894", "actor": {"login": "gaart", "id": 743901, "node_id": "MDQ6VXNlcjc0MzkwMQ==", "avatar_url": "https://avatars.githubusercontent.com/u/743901?v=4", "gravatar_id": "", "url": "https://api.github.com/users/gaart", "html_url": "https://github.com/gaart", "followers_url": "https://api.github.com/users/gaart/followers", "following_url": "https://api.github.com/users/gaart/following{/other_user}", "gists_url": "https://api.github.com/users/gaart/gists{/gist_id}", "starred_url": "https://api.github.com/users/gaart/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gaart/subscriptions", "organizations_url": "https://api.github.com/users/gaart/orgs", "repos_url": "https://api.github.com/users/gaart/repos", "events_url": "https://api.github.com/users/gaart/events{/privacy}", "received_events_url": "https://api.github.com/users/gaart/received_events", "type": "User", "site_admin": false}, "event": "milestoned", "commit_id": null, "commit_url": null, "created_at": "2021-08-27T15:44:04Z", "milestone": {"title": "main"}, "performed_via_github_app": null}, "commented": {"url": "https://api.github.com/repos/airbytehq/integration-test/issues/comments/907296239", "html_url": "https://github.com/airbytehq/integration-test/issues/9#issuecomment-907296239", "issue_url": "https://api.github.com/repos/airbytehq/integration-test/issues/9", "id": 907296239, "node_id": "IC_kwDOF9hP9c42FD3v", "user": {"login": "gaart", "id": 743901, "node_id": "MDQ6VXNlcjc0MzkwMQ==", "avatar_url": "https://avatars.githubusercontent.com/u/743901?v=4", "gravatar_id": "", "url": "https://api.github.com/users/gaart", "html_url": "https://github.com/gaart", "followers_url": "https://api.github.com/users/gaart/followers", "following_url": "https://api.github.com/users/gaart/following{/other_user}", "gists_url": "https://api.github.com/users/gaart/gists{/gist_id}", "starred_url": "https://api.github.com/users/gaart/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gaart/subscriptions", "organizations_url": "https://api.github.com/users/gaart/orgs", "repos_url": "https://api.github.com/users/gaart/repos", "events_url": "https://api.github.com/users/gaart/events{/privacy}", "received_events_url": "https://api.github.com/users/gaart/received_events", "type": "User", "site_admin": false}, "created_at": "2021-08-27T15:44:05Z", "updated_at": "2021-08-27T15:44:05Z", "author_association": "CONTRIBUTOR", "body": "comment for issues https://api.github.com/repos/airbytehq/integration-test/issues/9/comments", "reactions": {"url": "https://api.github.com/repos/airbytehq/integration-test/issues/comments/907296239/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}, "performed_via_github_app": null, "event": "commented", "actor": {"login": "gaart", "id": 743901, "node_id": "MDQ6VXNlcjc0MzkwMQ==", "avatar_url": "https://avatars.githubusercontent.com/u/743901?v=4", "gravatar_id": "", "url": "https://api.github.com/users/gaart", "html_url": "https://github.com/gaart", "followers_url": "https://api.github.com/users/gaart/followers", "following_url": "https://api.github.com/users/gaart/following{/other_user}", "gists_url": "https://api.github.com/users/gaart/gists{/gist_id}", "starred_url": "https://api.github.com/users/gaart/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gaart/subscriptions", "organizations_url": "https://api.github.com/users/gaart/orgs", "repos_url": "https://api.github.com/users/gaart/repos", "events_url": "https://api.github.com/users/gaart/events{/privacy}", "received_events_url": "https://api.github.com/users/gaart/received_events", "type": "User", "site_admin": false}}}, "emitted_at": 1695815681650} +{"stream": "issue_timeline_events", "data": {"repository": "airbytehq/integration-test", "issue_number": 11, "labeled": {"id": 5219399223, "node_id": "MDEyOkxhYmVsZWRFdmVudDUyMTkzOTkyMjM=", "url": "https://api.github.com/repos/airbytehq/integration-test/issues/events/5219399223", "actor": {"login": "gaart", "id": 743901, "node_id": "MDQ6VXNlcjc0MzkwMQ==", "avatar_url": "https://avatars.githubusercontent.com/u/743901?v=4", "gravatar_id": "", "url": "https://api.github.com/users/gaart", "html_url": "https://github.com/gaart", "followers_url": "https://api.github.com/users/gaart/followers", "following_url": "https://api.github.com/users/gaart/following{/other_user}", "gists_url": "https://api.github.com/users/gaart/gists{/gist_id}", "starred_url": "https://api.github.com/users/gaart/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gaart/subscriptions", "organizations_url": "https://api.github.com/users/gaart/orgs", "repos_url": "https://api.github.com/users/gaart/repos", "events_url": "https://api.github.com/users/gaart/events{/privacy}", "received_events_url": "https://api.github.com/users/gaart/received_events", "type": "User", "site_admin": false}, "event": "labeled", "commit_id": null, "commit_url": null, "created_at": "2021-08-27T15:44:08Z", "label": {"name": "important", "color": "ededed"}, "performed_via_github_app": null}, "milestoned": {"id": 5219399233, "node_id": "MDE1Ok1pbGVzdG9uZWRFdmVudDUyMTkzOTkyMzM=", "url": "https://api.github.com/repos/airbytehq/integration-test/issues/events/5219399233", "actor": {"login": "gaart", "id": 743901, "node_id": "MDQ6VXNlcjc0MzkwMQ==", "avatar_url": "https://avatars.githubusercontent.com/u/743901?v=4", "gravatar_id": "", "url": "https://api.github.com/users/gaart", "html_url": "https://github.com/gaart", "followers_url": "https://api.github.com/users/gaart/followers", "following_url": "https://api.github.com/users/gaart/following{/other_user}", "gists_url": "https://api.github.com/users/gaart/gists{/gist_id}", "starred_url": "https://api.github.com/users/gaart/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gaart/subscriptions", "organizations_url": "https://api.github.com/users/gaart/orgs", "repos_url": "https://api.github.com/users/gaart/repos", "events_url": "https://api.github.com/users/gaart/events{/privacy}", "received_events_url": "https://api.github.com/users/gaart/received_events", "type": "User", "site_admin": false}, "event": "milestoned", "commit_id": null, "commit_url": null, "created_at": "2021-08-27T15:44:08Z", "milestone": {"title": "main"}, "performed_via_github_app": null}, "commented": {"url": "https://api.github.com/repos/airbytehq/integration-test/issues/comments/907296275", "html_url": "https://github.com/airbytehq/integration-test/issues/11#issuecomment-907296275", "issue_url": "https://api.github.com/repos/airbytehq/integration-test/issues/11", "id": 907296275, "node_id": "IC_kwDOF9hP9c42FD4T", "user": {"login": "gaart", "id": 743901, "node_id": "MDQ6VXNlcjc0MzkwMQ==", "avatar_url": "https://avatars.githubusercontent.com/u/743901?v=4", "gravatar_id": "", "url": "https://api.github.com/users/gaart", "html_url": "https://github.com/gaart", "followers_url": "https://api.github.com/users/gaart/followers", "following_url": "https://api.github.com/users/gaart/following{/other_user}", "gists_url": "https://api.github.com/users/gaart/gists{/gist_id}", "starred_url": "https://api.github.com/users/gaart/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gaart/subscriptions", "organizations_url": "https://api.github.com/users/gaart/orgs", "repos_url": "https://api.github.com/users/gaart/repos", "events_url": "https://api.github.com/users/gaart/events{/privacy}", "received_events_url": "https://api.github.com/users/gaart/received_events", "type": "User", "site_admin": false}, "created_at": "2021-08-27T15:44:09Z", "updated_at": "2021-08-27T15:44:09Z", "author_association": "CONTRIBUTOR", "body": "comment for issues https://api.github.com/repos/airbytehq/integration-test/issues/11/comments", "reactions": {"url": "https://api.github.com/repos/airbytehq/integration-test/issues/comments/907296275/reactions", "total_count": 3, "+1": 1, "-1": 0, "laugh": 1, "hooray": 1, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}, "performed_via_github_app": null, "event": "commented", "actor": {"login": "gaart", "id": 743901, "node_id": "MDQ6VXNlcjc0MzkwMQ==", "avatar_url": "https://avatars.githubusercontent.com/u/743901?v=4", "gravatar_id": "", "url": "https://api.github.com/users/gaart", "html_url": "https://github.com/gaart", "followers_url": "https://api.github.com/users/gaart/followers", "following_url": "https://api.github.com/users/gaart/following{/other_user}", "gists_url": "https://api.github.com/users/gaart/gists{/gist_id}", "starred_url": "https://api.github.com/users/gaart/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gaart/subscriptions", "organizations_url": "https://api.github.com/users/gaart/orgs", "repos_url": "https://api.github.com/users/gaart/repos", "events_url": "https://api.github.com/users/gaart/events{/privacy}", "received_events_url": "https://api.github.com/users/gaart/received_events", "type": "User", "site_admin": false}}}, "emitted_at": 1695815681995} diff --git a/airbyte-integrations/connectors/source-github/metadata.yaml b/airbyte-integrations/connectors/source-github/metadata.yaml index 043ceeadef18..b63b0bd13ccf 100644 --- a/airbyte-integrations/connectors/source-github/metadata.yaml +++ b/airbyte-integrations/connectors/source-github/metadata.yaml @@ -5,7 +5,7 @@ data: connectorSubtype: api connectorType: source definitionId: ef69ef6e-aa7f-4af1-a01d-ef775033524e - dockerImageTag: 1.3.1 + dockerImageTag: 1.4.0 maxSecondsBetweenMessages: 5400 dockerRepository: airbyte/source-github githubIssueLabel: source-github diff --git a/airbyte-integrations/connectors/source-github/source_github/schemas/issue_timeline_events.json b/airbyte-integrations/connectors/source-github/source_github/schemas/issue_timeline_events.json new file mode 100644 index 000000000000..6f520aea2641 --- /dev/null +++ b/airbyte-integrations/connectors/source-github/source_github/schemas/issue_timeline_events.json @@ -0,0 +1,1050 @@ +{ + "definitions": { + "base_event": { + "id": { + "type": ["null", "integer"] + }, + "node_id": { + "type": ["null", "string"] + }, + "url": { + "type": ["null", "string"] + }, + "actor": { + "title": "Simple User", + "description": "A GitHub user.", + "type": ["null", "object"], + "properties": { + "name": { + "type": ["string", "null"] + }, + "email": { + "type": ["string", "null"] + }, + "login": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": ["string", "null"] + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + }, + "starred_at": { + "type": "string" + } + } + }, + "event": { + "type": ["null", "string"] + }, + "commit_id": { + "type": ["string", "null"] + }, + "commit_url": { + "type": ["string", "null"] + }, + "created_at": { + "type": ["null", "string"], + "format": "date-time" + }, + "performed_via_github_app": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "slug": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "owner": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "name": { + "type": ["string", "null"] + }, + "email": { + "type": ["string", "null"] + }, + "login": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": ["string", "null"] + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + }, + "starred_at": { + "type": "string" + } + } + } + ] + }, + "name": { + "type": "string" + }, + "description": { + "type": ["string", "null"] + }, + "external_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "permissions": { + "type": "object", + "properties": { + "issues": { + "type": "string" + }, + "checks": { + "type": "string" + }, + "metadata": { + "type": "string" + }, + "contents": { + "type": "string" + }, + "deployments": { + "type": "string" + } + }, + "additionalProperties": true + }, + "events": { + "type": "array", + "items": { + "type": "string" + } + }, + "installations_count": { + "type": "integer" + }, + "client_id": { + "type": "string" + }, + "client_secret": { + "type": "string" + }, + "webhook_secret": { + "type": ["string", "null"] + }, + "pem": { + "type": "string" + } + } + } + ] + } + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": true, + "properties": { + "repository": { + "type": "string" + }, + "issue_number": { + "type": "integer" + }, + "labeled": { + "$ref": "#/definitions/base_event", + "label": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "color": { + "type": ["null", "string"] + } + } + } + }, + "unlabeled": { + "$ref": "#/definitions/base_event", + "label": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "color": { + "type": "string" + } + } + } + }, + "milestoned": { + "$ref": "#/definitions/base_event", + "milestone": { + "type": "object", + "properties": { + "title": { + "type": "string" + } + } + } + }, + "demilestoned": { + "$ref": "#/definitions/base_event", + "milestone": { + "type": "object", + "properties": { + "title": { + "type": "string" + } + } + } + }, + "renamed": { + "$ref": "#/definitions/base_event", + "rename": { + "type": "object", + "properties": { + "from": { + "type": "string" + }, + "to": { + "type": "string" + } + } + } + }, + "review_requested": { + "$ref": "#/definitions/base_event", + "review_requester": { + "type": "object", + "properties": { + "name": { + "type": ["string", "null"] + }, + "email": { + "type": ["string", "null"] + }, + "login": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": ["string", "null"] + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + }, + "starred_at": { + "type": "string" + } + } + }, + "requested_team": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "description": { + "type": ["string", "null"] + }, + "privacy": { + "type": "string" + }, + "notification_setting": { + "type": "string" + }, + "permission": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "pull": { + "type": "boolean" + }, + "triage": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "maintain": { + "type": "boolean" + }, + "admin": { + "type": "boolean" + } + } + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "repositories_url": { + "type": "string" + }, + "parent": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": ["string", "null"] + }, + "permission": { + "type": "string" + }, + "privacy": { + "type": "string" + }, + "notification_setting": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "repositories_url": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "ldap_dn": { + "type": "string" + } + } + } + ] + } + } + }, + "requested_reviewer": { + "type": "object", + "properties": { + "name": { + "type": ["string", "null"] + }, + "email": { + "type": ["string", "null"] + }, + "login": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": ["string", "null"] + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + }, + "starred_at": { + "type": "string" + } + } + } + }, + "review_request_removed": { + "$ref": "#/definitions/base_event", + "review_requester": { + "type": "object", + "properties": { + "name": { + "type": ["string", "null"] + }, + "email": { + "type": ["string", "null"] + }, + "login": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": ["string", "null"] + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + }, + "starred_at": { + "type": "string" + } + } + }, + "requested_team": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "node_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "description": { + "type": ["string", "null"] + }, + "privacy": { + "type": "string" + }, + "notification_setting": { + "type": "string" + }, + "permission": { + "type": "string" + }, + "permissions": { + "type": "object", + "properties": { + "pull": { + "type": "boolean" + }, + "triage": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "maintain": { + "type": "boolean" + }, + "admin": { + "type": "boolean" + } + } + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "repositories_url": { + "type": "string" + }, + "parent": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "node_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "members_url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": ["string", "null"] + }, + "permission": { + "type": "string" + }, + "privacy": { + "type": "string" + }, + "notification_setting": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "repositories_url": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "ldap_dn": { + "type": "string" + } + } + } + ] + } + } + }, + "requested_reviewer": { + "type": "object", + "properties": { + "name": { + "type": ["string", "null"] + }, + "email": { + "type": ["string", "null"] + }, + "login": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": ["string", "null"] + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + }, + "starred_at": { + "type": "string" + } + } + } + }, + "review_dismissed": { + "$ref": "#/definitions/base_event", + "dismissed_review": { + "type": "object", + "properties": { + "state": { + "type": "string" + }, + "review_id": { + "type": "integer" + }, + "dismissal_message": { + "type": ["string", "null"] + }, + "dismissal_commit_id": { + "type": "string" + } + } + } + }, + "locked": { + "$ref": "#/definitions/base_event", + "lock_reason": { + "type": ["string", "null"] + } + }, + "added_to_project": { + "$ref": "#/definitions/base_event", + "project_card": { + "type": "object", + "properties": { + "id": { "type": "integer" }, + "url": { "type": "string" }, + "project_id": { "type": "integer" }, + "project_url": { "type": "string" }, + "column_name": { "type": "string" }, + "previous_column_name": { "type": "string" } + } + } + }, + "moved_columns_in_project": { + "$ref": "#/definitions/base_event", + "project_card": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "url": { + "type": "string", + "format": "uri" + }, + "project_id": { + "type": "integer" + }, + "project_url": { + "type": "string", + "format": "uri" + }, + "column_name": { + "type": "string" + }, + "previous_column_name": { + "type": "string" + } + } + } + }, + "removed_from_project": { + "$ref": "#/definitions/base_event", + "project_card": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "url": { + "type": "string", + "format": "uri" + }, + "project_id": { + "type": "integer" + }, + "project_url": { + "type": "string", + "format": "uri" + }, + "column_name": { + "type": "string" + }, + "previous_column_name": { + "type": "string" + } + } + } + }, + "converted_note_to_issue": { + "$ref": "#/definitions/base_event", + "project_card": { + "type": "object", + "properties": { + "id": { "type": "integer" }, + "url": { "type": "string" }, + "project_id": { "type": "integer" }, + "project_url": { "type": "string" }, + "column_name": { "type": "string" }, + "previous_column_name": { "type": "string" } + } + } + }, + "comment": { + "$ref": "events/comment.json" + }, + "cross-referenced": { + "$ref": "events/cross_referenced.json" + }, + "committed": { + "$ref": "events/committed.json" + }, + "closed": { + "$ref": "#/definitions/base_event" + }, + "head_ref_deleted": { + "$ref": "#/definitions/base_event" + }, + "head_ref_restored": { + "$ref": "#/definitions/base_event" + }, + "reopened": { + "$ref": "#/definitions/base_event" + }, + "reviewed": { + "$ref": "events/reviewed.json" + }, + "commented": { + "$ref": "events/commented.json" + }, + "commit_commented": { + "$ref": "events/commented.json" + }, + "assigned": { + "$ref": "#/definitions/base_event", + "assignee": { + "title": "Simple User", + "description": "A GitHub user.", + "type": "object", + "properties": { + "name": { "type": ["string", "null"] }, + "email": { "type": ["string", "null"] }, + "login": { "type": "string" }, + "id": { "type": "integer" }, + "node_id": { "type": "string" }, + "avatar_url": { "type": "string" }, + "gravatar_id": { "type": ["string", "null"] }, + "url": { "type": "string" }, + "html_url": { "type": "string" }, + "followers_url": { "type": "string" }, + "following_url": { "type": "string" }, + "gists_url": { "type": "string" }, + "starred_url": { "type": "string" }, + "subscriptions_url": { "type": "string" }, + "organizations_url": { "type": "string" }, + "repos_url": { "type": "string" }, + "events_url": { "type": "string" }, + "received_events_url": { "type": "string" }, + "type": { "type": "string" }, + "site_admin": { "type": "boolean" }, + "starred_at": { "type": "string" } + } + } + }, + "unassigned": { + "$ref": "#/definitions/base_event", + "assignee": { + "title": "Simple User", + "description": "A GitHub user.", + "type": "object", + "properties": { + "name": { "type": ["string", "null"] }, + "email": { "type": ["string", "null"] }, + "login": { "type": "string" }, + "id": { "type": "integer" }, + "node_id": { "type": "string" }, + "avatar_url": { "type": "string" }, + "gravatar_id": { "type": ["string", "null"] }, + "url": { "type": "string" }, + "html_url": { "type": "string" }, + "followers_url": { "type": "string" }, + "following_url": { "type": "string" }, + "gists_url": { "type": "string" }, + "starred_url": { "type": "string" }, + "subscriptions_url": { "type": "string" }, + "organizations_url": { "type": "string" }, + "repos_url": { "type": "string" }, + "events_url": { "type": "string" }, + "received_events_url": { "type": "string" }, + "type": { "type": "string" }, + "site_admin": { "type": "boolean" }, + "starred_at": { "type": "string" } + } + } + }, + "state_change": { + "$ref": "#/definitions/base_event", + "state_reason": { + "type": ["string", "null"] + } + }, + "connected": { + "$ref": "#/definitions/base_event" + }, + "auto_squash_enabled": { + "$ref": "#/definitions/base_event" + }, + "merged": { + "$ref": "#/definitions/base_event" + } + } +} diff --git a/airbyte-integrations/connectors/source-github/source_github/schemas/shared/events/comment.json b/airbyte-integrations/connectors/source-github/source_github/schemas/shared/events/comment.json new file mode 100644 index 000000000000..3163cdc70c36 --- /dev/null +++ b/airbyte-integrations/connectors/source-github/source_github/schemas/shared/events/comment.json @@ -0,0 +1,188 @@ +{ + "title": "Timeline Comment Event", + "description": "Timeline Comment Event", + "type": "object", + "properties": { + "event": { "type": "string" }, + "actor": { + "title": "Simple User", + "description": "A GitHub user.", + "type": "object", + "properties": { + "name": { "type": ["string", "null"] }, + "email": { "type": ["string", "null"] }, + "login": { "type": "string" }, + "id": { "type": "integer" }, + "node_id": { "type": "string" }, + "avatar_url": { "type": "string" }, + "gravatar_id": { "type": ["string", "null"] }, + "url": { "type": "string" }, + "html_url": { "type": "string" }, + "followers_url": { "type": "string" }, + "following_url": { "type": "string" }, + "gists_url": { "type": "string" }, + "starred_url": { "type": "string" }, + "subscriptions_url": { "type": "string" }, + "organizations_url": { "type": "string" }, + "repos_url": { "type": "string" }, + "events_url": { "type": "string" }, + "received_events_url": { "type": "string" }, + "type": { "type": "string" }, + "site_admin": { "type": "boolean" }, + "starred_at": { "type": "string" } + } + }, + "id": { + "description": "Unique identifier of the issue comment", + "type": "integer" + }, + "node_id": { "type": "string" }, + "url": { "description": "URL for the issue comment", "type": "string" }, + "body": { + "description": "Contents of the issue comment", + "type": "string" + }, + "body_text": { "type": "string" }, + "body_html": { "type": "string" }, + "html_url": { "type": "string" }, + "user": { + "title": "Simple User", + "description": "A GitHub user.", + "type": "object", + "properties": { + "name": { "type": ["string", "null"] }, + "email": { "type": ["string", "null"] }, + "login": { "type": "string" }, + "id": { "type": "integer" }, + "node_id": { "type": "string" }, + "avatar_url": { "type": "string" }, + "gravatar_id": { "type": ["string", "null"] }, + "url": { "type": "string" }, + "html_url": { "type": "string" }, + "followers_url": { "type": "string" }, + "following_url": { "type": "string" }, + "gists_url": { "type": "string" }, + "starred_url": { "type": "string" }, + "subscriptions_url": { "type": "string" }, + "organizations_url": { "type": "string" }, + "repos_url": { "type": "string" }, + "events_url": { "type": "string" }, + "received_events_url": { "type": "string" }, + "type": { "type": "string" }, + "site_admin": { "type": "boolean" }, + "starred_at": { "type": "string" } + } + }, + "created_at": { "type": "string", "format": "date-time" }, + "updated_at": { "type": "string", "format": "date-time" }, + "issue_url": { "type": "string" }, + "author_association": { "type": "string" }, + "performed_via_github_app": { + "anyOf": [ + { + "type": "null" + }, + { + "title": "GitHub app", + "description": "GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub.", + "type": "object", + "properties": { + "id": { + "description": "Unique identifier of the GitHub app", + "type": "integer" + }, + "slug": { + "description": "The slug name of the GitHub app", + "type": "string" + }, + "node_id": { "type": "string" }, + "owner": { + "anyOf": [ + { + "type": "null" + }, + { + "title": "Simple User", + "description": "A GitHub user.", + "type": "object", + "properties": { + "name": { "type": ["string", "null"] }, + "email": { "type": ["string", "null"] }, + "login": { "type": "string" }, + "id": { "type": "integer" }, + "node_id": { "type": "string" }, + "avatar_url": { "type": "string" }, + "gravatar_id": { "type": ["string", "null"] }, + "url": { "type": "string" }, + "html_url": { "type": "string" }, + "followers_url": { "type": "string" }, + "following_url": { "type": "string" }, + "gists_url": { "type": "string" }, + "starred_url": { "type": "string" }, + "subscriptions_url": { "type": "string" }, + "organizations_url": { "type": "string" }, + "repos_url": { "type": "string" }, + "events_url": { "type": "string" }, + "received_events_url": { "type": "string" }, + "type": { "type": "string" }, + "site_admin": { "type": "boolean" }, + "starred_at": { "type": "string" } + } + } + ] + }, + "name": { + "description": "The name of the GitHub app", + "type": "string" + }, + "description": { "type": ["string", "null"] }, + "external_url": { "type": "string" }, + "html_url": { "type": "string" }, + "created_at": { "type": "string", "format": "date-time" }, + "updated_at": { "type": "string", "format": "date-time" }, + "permissions": { + "description": "The set of permissions for the GitHub app", + "type": "object", + "properties": { + "issues": { "type": "string" }, + "checks": { "type": "string" }, + "metadata": { "type": "string" }, + "contents": { "type": "string" }, + "deployments": { "type": "string" } + } + }, + "events": { + "description": "The list of events for the GitHub app", + "type": "array", + "items": { "type": "string" } + }, + "installations_count": { + "description": "The number of installations associated with the GitHub app", + "type": "integer" + }, + "client_id": { "type": "string" }, + "client_secret": { "type": "string" }, + "webhook_secret": { "type": ["string", "null"] }, + "pem": { "type": "string" } + } + } + ] + }, + "reactions": { + "title": "Reaction Rollup", + "type": "object", + "properties": { + "url": { "type": "string" }, + "total_count": { "type": "integer" }, + "+1": { "type": "integer" }, + "-1": { "type": "integer" }, + "laugh": { "type": "integer" }, + "confused": { "type": "integer" }, + "heart": { "type": "integer" }, + "hooray": { "type": "integer" }, + "eyes": { "type": "integer" }, + "rocket": { "type": "integer" } + } + } + } +} diff --git a/airbyte-integrations/connectors/source-github/source_github/schemas/shared/events/commented.json b/airbyte-integrations/connectors/source-github/source_github/schemas/shared/events/commented.json new file mode 100644 index 000000000000..cd982b7e426a --- /dev/null +++ b/airbyte-integrations/connectors/source-github/source_github/schemas/shared/events/commented.json @@ -0,0 +1,118 @@ +{ + "title": "Timeline Line Commented Event", + "description": "Timeline Line Commented Event", + "type": "object", + "properties": { + "event": { "type": "string" }, + "node_id": { "type": "string" }, + "comments": { + "type": "array", + "items": { + "title": "Pull Request Review Comment", + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "pull_request_review_id": { + "type": ["integer", "null"] + }, + "id": { "type": "integer" }, + "node_id": { "type": "string" }, + "diff_hunk": { "type": "string" }, + "path": { "type": "string" }, + "position": { "type": "integer" }, + "original_position": { "type": "integer" }, + "commit_id": { "type": "string" }, + "original_commit_id": { "type": "string" }, + "in_reply_to_id": { "type": "integer" }, + "user": { + "type": "object", + "properties": { + "name": { "type": ["string", "null"] }, + "email": { "type": ["string", "null"] }, + "login": { "type": "string" }, + "id": { "type": "integer" }, + "node_id": { "type": "string" }, + "avatar_url": { "type": "string" }, + "gravatar_id": { "type": ["string", "null"] }, + "url": { "type": "string" }, + "html_url": { "type": "string" }, + "followers_url": { "type": "string" }, + "following_url": { "type": "string" }, + "gists_url": { "type": "string" }, + "starred_url": { "type": "string" }, + "subscriptions_url": { "type": "string" }, + "organizations_url": { "type": "string" }, + "repos_url": { "type": "string" }, + "events_url": { "type": "string" }, + "received_events_url": { "type": "string" }, + "type": { "type": "string" }, + "site_admin": { "type": "boolean" }, + "starred_at": { "type": "string" } + } + }, + "body": { "type": "string" }, + "created_at": { "type": "string", "format": "date-time" }, + "updated_at": { "type": "string", "format": "date-time" }, + "html_url": { "type": "string" }, + "pull_request_url": { "type": "string" }, + "author_association": { "type": "string" }, + "_links": { + "type": "object", + "properties": { + "self": { + "type": "object", + "properties": { + "href": { "type": "string" } + } + }, + "html": { + "type": "object", + "properties": { + "href": { "type": "string" } + } + }, + "pull_request": { + "type": "object", + "properties": { + "href": { "type": "string" } + } + } + } + }, + "start_line": { + "type": ["integer", "null"] + }, + "original_start_line": { + "type": ["integer", "null"] + }, + "start_side": { + "type": ["string", "null"] + }, + "line": { "type": "integer" }, + "original_line": { "type": "integer" }, + "side": { "type": "string" }, + "subject_type": { "type": "string" }, + "reactions": { + "type": "object", + "properties": { + "url": { "type": "string" }, + "total_count": { "type": "integer" }, + "+1": { "type": "integer" }, + "-1": { "type": "integer" }, + "laugh": { "type": "integer" }, + "confused": { "type": "integer" }, + "heart": { "type": "integer" }, + "hooray": { "type": "integer" }, + "eyes": { "type": "integer" }, + "rocket": { "type": "integer" } + } + }, + "body_html": { "type": "string" }, + "body_text": { "type": "string" } + } + } + } + } +} diff --git a/airbyte-integrations/connectors/source-github/source_github/schemas/shared/events/committed.json b/airbyte-integrations/connectors/source-github/source_github/schemas/shared/events/committed.json new file mode 100644 index 000000000000..2cbcd16fb13a --- /dev/null +++ b/airbyte-integrations/connectors/source-github/source_github/schemas/shared/events/committed.json @@ -0,0 +1,56 @@ +{ + "title": "Timeline Committed Event", + "description": "Timeline Committed Event", + "type": "object", + "properties": { + "event": { "type": "string" }, + "sha": { "type": "string" }, + "node_id": { "type": "string" }, + "url": { "type": "string" }, + "author": { + "type": "object", + "properties": { + "date": { "format": "date-time", "type": "string" }, + "email": { "type": "string" }, + "name": { "type": "string" } + } + }, + "committer": { + "type": "object", + "properties": { + "date": { "format": "date-time", "type": "string" }, + "email": { "type": "string" }, + "name": { "type": "string" } + } + }, + "message": { "type": "string" }, + "tree": { + "type": "object", + "properties": { + "sha": { "type": "string" }, + "url": { "type": "string" } + } + }, + "parents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "sha": { "type": "string" }, + "url": { "type": "string" }, + "html_url": { "type": "string" } + } + } + }, + "verification": { + "type": "object", + "properties": { + "verified": { "type": "boolean" }, + "reason": { "type": "string" }, + "signature": { "type": ["string", "null"] }, + "payload": { "type": ["string", "null"] } + } + }, + "html_url": { "type": "string" } + } +} diff --git a/airbyte-integrations/connectors/source-github/source_github/schemas/shared/events/cross_referenced.json b/airbyte-integrations/connectors/source-github/source_github/schemas/shared/events/cross_referenced.json new file mode 100644 index 000000000000..36b9aa9d9f85 --- /dev/null +++ b/airbyte-integrations/connectors/source-github/source_github/schemas/shared/events/cross_referenced.json @@ -0,0 +1,775 @@ +{ + "title": "Timeline Cross Referenced Event", + "description": "Timeline Cross Referenced Event", + "type": "object", + "properties": { + "event": { "type": "string" }, + "actor": { + "type": "object", + "properties": { + "name": { "type": ["string", "null"] }, + "email": { "type": ["string", "null"] }, + "login": { "type": "string" }, + "id": { "type": "integer" }, + "node_id": { "type": "string" }, + "avatar_url": { "type": "string" }, + "gravatar_id": { "type": ["string", "null"] }, + "url": { "type": "string" }, + "html_url": { "type": "string" }, + "followers_url": { "type": "string" }, + "following_url": { "type": "string" }, + "gists_url": { "type": "string" }, + "starred_url": { "type": "string" }, + "subscriptions_url": { "type": "string" }, + "organizations_url": { "type": "string" }, + "repos_url": { "type": "string" }, + "events_url": { "type": "string" }, + "received_events_url": { "type": "string" }, + "type": { "type": "string" }, + "site_admin": { "type": "boolean" }, + "starred_at": { "type": "string" } + } + }, + "created_at": { "type": "string", "format": "date-time" }, + "updated_at": { "type": "string", "format": "date-time" }, + "source": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "issue": { + "title": "Issue", + "description": "Issues are a great way to keep track of tasks, enhancements, and bugs for your projects.", + "type": "object", + "properties": { + "id": { "type": "integer" }, + "node_id": { "type": "string" }, + "url": { "type": "string" }, + "repository_url": { "type": "string" }, + "labels_url": { "type": "string" }, + "comments_url": { "type": "string" }, + "events_url": { "type": "string" }, + "html_url": { "type": "string" }, + "number": { "type": "integer" }, + "state": { "type": "string" }, + "state_reason": { "type": ["string", "null"] }, + "title": { "type": "string" }, + "body": { "type": ["string", "null"] }, + "user": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "name": { "type": ["string", "null"] }, + "email": { "type": ["string", "null"] }, + "login": { "type": "string" }, + "id": { "type": "integer" }, + "node_id": { "type": "string" }, + "avatar_url": { "type": "string" }, + "gravatar_id": { "type": ["string", "null"] }, + "url": { "type": "string" }, + "html_url": { "type": "string" }, + "followers_url": { "type": "string" }, + "following_url": { "type": "string" }, + "gists_url": { "type": "string" }, + "starred_url": { "type": "string" }, + "subscriptions_url": { "type": "string" }, + "organizations_url": { "type": "string" }, + "repos_url": { "type": "string" }, + "events_url": { "type": "string" }, + "received_events_url": { "type": "string" }, + "type": { "type": "string" }, + "site_admin": { "type": "boolean" }, + "starred_at": { "type": "string" } + } + } + ] + }, + "labels": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "id": { "type": "integer" }, + "node_id": { "type": "string" }, + "url": { "type": "string" }, + "name": { "type": "string" }, + "description": { "type": ["string", "null"] }, + "color": { "type": ["string", "null"] }, + "default": { "type": "boolean" } + } + } + ] + } + }, + "assignee": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "name": { "type": ["string", "null"] }, + "email": { "type": ["string", "null"] }, + "login": { "type": "string" }, + "id": { "type": "integer" }, + "node_id": { "type": "string" }, + "avatar_url": { "type": "string" }, + "gravatar_id": { "type": ["string", "null"] }, + "url": { "type": "string" }, + "html_url": { "type": "string" }, + "followers_url": { "type": "string" }, + "following_url": { "type": "string" }, + "gists_url": { "type": "string" }, + "starred_url": { "type": "string" }, + "subscriptions_url": { "type": "string" }, + "organizations_url": { "type": "string" }, + "repos_url": { "type": "string" }, + "events_url": { "type": "string" }, + "received_events_url": { "type": "string" }, + "type": { "type": "string" }, + "site_admin": { "type": "boolean" }, + "starred_at": { "type": "string" } + } + } + ] + }, + "assignees": { + "type": ["array", "null"], + "items": { + "type": "object", + "properties": { + "name": { "type": ["string", "null"] }, + "email": { "type": ["string", "null"] }, + "login": { "type": "string" }, + "id": { "type": "integer" }, + "node_id": { "type": "string" }, + "avatar_url": { "type": "string" }, + "gravatar_id": { "type": ["string", "null"] }, + "url": { "type": "string" }, + "html_url": { "type": "string" }, + "followers_url": { "type": "string" }, + "following_url": { "type": "string" }, + "gists_url": { "type": "string" }, + "starred_url": { "type": "string" }, + "subscriptions_url": { "type": "string" }, + "organizations_url": { "type": "string" }, + "repos_url": { "type": "string" }, + "events_url": { "type": "string" }, + "received_events_url": { "type": "string" }, + "type": { "type": "string" }, + "site_admin": { + "type": "boolean" + }, + "starred_at": { "type": "string" } + } + } + }, + "milestone": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "url": { "type": "string" }, + "html_url": { "type": "string" }, + "labels_url": { "type": "string" }, + "id": { "type": "integer" }, + "node_id": { "type": "string" }, + "number": { "type": "integer" }, + "state": { "type": "string" }, + "title": { "type": "string" }, + "description": { "type": ["string", "null"] }, + "creator": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "name": { "type": ["string", "null"] }, + "email": { "type": ["string", "null"] }, + "login": { "type": "string" }, + "id": { "type": "integer" }, + "node_id": { "type": "string" }, + "avatar_url": { "type": "string" }, + "gravatar_id": { "type": ["string", "null"] }, + "url": { "type": "string" }, + "html_url": { "type": "string" }, + "followers_url": { "type": "string" }, + "following_url": { "type": "string" }, + "gists_url": { "type": "string" }, + "starred_url": { "type": "string" }, + "subscriptions_url": { "type": "string" }, + "organizations_url": { "type": "string" }, + "repos_url": { "type": "string" }, + "events_url": { "type": "string" }, + "received_events_url": { "type": "string" }, + "type": { "type": "string" }, + "site_admin": { "type": "boolean" }, + "starred_at": { "type": "string" } + } + } + ] + }, + "open_issues": { "type": "integer" }, + "closed_issues": { "type": "integer" }, + "created_at": { "type": "string", "format": "date-time" }, + "updated_at": { "type": "string", "format": "date-time" }, + "closed_at": { + "type": ["string", "null"], + "format": "date-time" + }, + "due_on": { + "type": ["string", "null"], + "format": "date-time" + } + } + } + ] + }, + "locked": { "type": "boolean" }, + "active_lock_reason": { "type": ["string", "null"] }, + "comments": { "type": "integer" }, + "pull_request": { + "type": "object", + "properties": { + "merged_at": { + "type": ["string", "null"], + "format": "date-time" + }, + "diff_url": { "type": ["string", "null"] }, + "html_url": { "type": ["string", "null"] }, + "patch_url": { "type": ["string", "null"] }, + "url": { "type": ["string", "null"] } + } + }, + "closed_at": { "type": ["string", "null"], "format": "date-time" }, + "created_at": { "type": "string", "format": "date-time" }, + "updated_at": { "type": "string", "format": "date-time" }, + "draft": { "type": "boolean" }, + "closed_by": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "name": { "type": ["string", "null"] }, + "email": { "type": ["string", "null"] }, + "login": { "type": "string", "examples": ["octocat"] }, + "id": { "type": "integer" }, + "node_id": { "type": "string" }, + "avatar_url": { "type": "string" }, + "gravatar_id": { "type": ["string", "null"] }, + "url": { "type": "string" }, + "html_url": { "type": "string" }, + "followers_url": { "type": "string" }, + "following_url": { "type": "string" }, + "gists_url": { "type": "string" }, + "starred_url": { "type": "string" }, + "subscriptions_url": { "type": "string" }, + "organizations_url": { "type": "string" }, + "repos_url": { "type": "string" }, + "events_url": { "type": "string" }, + "received_events_url": { "type": "string" }, + "type": { "type": "string" }, + "site_admin": { "type": "boolean" }, + "starred_at": { "type": "string" } + } + } + ] + }, + "body_html": { "type": "string" }, + "body_text": { "type": "string" }, + "timeline_url": { "type": "string" }, + "repository": { + "type": "object", + "properties": { + "id": { "type": "integer" }, + "node_id": { "type": "string" }, + "name": { "type": "string" }, + "full_name": { "type": "string" }, + "license": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "key": { "type": "string" }, + "name": { "type": "string" }, + "url": { "type": ["string", "null"] }, + "spdx_id": { "type": ["string", "null"] }, + "node_id": { "type": "string" }, + "html_url": { "type": "string" } + } + } + ] + }, + "organization": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "name": { "type": ["string", "null"] }, + "email": { "type": ["string", "null"] }, + "login": { "type": "string" }, + "id": { "type": "integer" }, + "node_id": { "type": "string" }, + "avatar_url": { "type": "string" }, + "gravatar_id": { "type": ["string", "null"] }, + "url": { "type": "string" }, + "html_url": { "type": "string" }, + "followers_url": { "type": "string" }, + "following_url": { "type": "string" }, + "gists_url": { "type": "string" }, + "starred_url": { "type": "string" }, + "subscriptions_url": { "type": "string" }, + "organizations_url": { "type": "string" }, + "repos_url": { "type": "string" }, + "events_url": { "type": "string" }, + "received_events_url": { "type": "string" }, + "type": { "type": "string" }, + "site_admin": { "type": "boolean" }, + "starred_at": { "type": "string" } + } + } + ] + }, + "forks": { "type": "integer" }, + "permissions": { + "type": "object", + "properties": { + "admin": { "type": "boolean" }, + "pull": { "type": "boolean" }, + "triage": { "type": "boolean" }, + "push": { "type": "boolean" }, + "maintain": { "type": "boolean" } + } + }, + "owner": { + "type": "object", + "properties": { + "name": { "type": ["string", "null"] }, + "email": { "type": ["string", "null"] }, + "login": { "type": "string" }, + "id": { "type": "integer" }, + "node_id": { "type": "string" }, + "avatar_url": { "type": "string" }, + "gravatar_id": { "type": ["string", "null"] }, + "url": { "type": "string" }, + "html_url": { "type": "string" }, + "followers_url": { "type": "string" }, + "following_url": { "type": "string" }, + "gists_url": { "type": "string" }, + "starred_url": { "type": "string" }, + "subscriptions_url": { "type": "string" }, + "organizations_url": { "type": "string" }, + "repos_url": { "type": "string" }, + "events_url": { "type": "string" }, + "received_events_url": { "type": "string" }, + "type": { "type": "string" }, + "site_admin": { "type": "boolean" }, + "starred_at": { "type": "string" } + } + }, + "private": { "type": "boolean" }, + "html_url": { "type": "string" }, + "description": { "type": ["string", "null"] }, + "fork": { "type": "boolean" }, + "url": { "type": "string" }, + "archive_url": { "type": "string" }, + "assignees_url": { "type": "string" }, + "blobs_url": { "type": "string" }, + "branches_url": { "type": "string" }, + "collaborators_url": { "type": "string" }, + "comments_url": { "type": "string" }, + "commits_url": { "type": "string" }, + "compare_url": { "type": "string" }, + "contents_url": { "type": "string" }, + "contributors_url": { "type": "string" }, + "deployments_url": { "type": "string" }, + "downloads_url": { "type": "string" }, + "events_url": { "type": "string" }, + "forks_url": { "type": "string" }, + "git_commits_url": { "type": "string" }, + "git_refs_url": { "type": "string" }, + "git_tags_url": { "type": "string" }, + "git_url": { "type": "string" }, + "issue_comment_url": { "type": "string" }, + "issue_events_url": { "type": "string" }, + "issues_url": { "type": "string" }, + "keys_url": { "type": "string" }, + "labels_url": { "type": "string" }, + "languages_url": { "type": "string" }, + "merges_url": { "type": "string" }, + "milestones_url": { "type": "string" }, + "notifications_url": { "type": "string" }, + "pulls_url": { "type": "string" }, + "releases_url": { "type": "string" }, + "ssh_url": { "type": "string" }, + "stargazers_url": { "type": "string" }, + "statuses_url": { "type": "string" }, + "subscribers_url": { "type": "string" }, + "subscription_url": { "type": "string" }, + "tags_url": { "type": "string" }, + "teams_url": { "type": "string" }, + "trees_url": { "type": "string" }, + "clone_url": { "type": "string" }, + "mirror_url": { "type": ["string", "null"] }, + "hooks_url": { "type": "string" }, + "svn_url": { "type": "string" }, + "homepage": { "type": ["string", "null"] }, + "language": { "type": ["string", "null"] }, + "forks_count": { "type": "integer" }, + "stargazers_count": { "type": "integer" }, + "watchers_count": { "type": "integer" }, + "size": { "type": "integer" }, + "default_branch": { "type": "string" }, + "open_issues_count": { "type": "integer" }, + "is_template": { "type": "boolean" }, + "topics": { + "type": "array", + "items": { "type": "string" } + }, + "has_issues": { "type": "boolean" }, + "has_projects": { "type": "boolean" }, + "has_wiki": { "type": "boolean" }, + "has_pages": { "type": "boolean" }, + "has_downloads": { "type": "boolean" }, + "has_discussions": { "type": "boolean" }, + "archived": { "type": "boolean" }, + "disabled": { "type": "boolean" }, + "visibility": { "type": "string" }, + "pushed_at": { + "type": ["string", "null"], + "format": "date-time" + }, + "created_at": { + "type": ["string", "null"], + "format": "date-time" + }, + "updated_at": { + "type": ["string", "null"], + "format": "date-time" + }, + "allow_rebase_merge": { "type": "boolean" }, + "template_repository": { + "type": ["object", "null"], + "properties": { + "id": { "type": "integer" }, + "node_id": { "type": "string" }, + "name": { "type": "string" }, + "full_name": { "type": "string" }, + "owner": { + "type": "object", + "properties": { + "login": { "type": "string" }, + "id": { "type": "integer" }, + "node_id": { "type": "string" }, + "avatar_url": { "type": "string" }, + "gravatar_id": { "type": "string" }, + "url": { "type": "string" }, + "html_url": { "type": "string" }, + "followers_url": { "type": "string" }, + "following_url": { "type": "string" }, + "gists_url": { "type": "string" }, + "starred_url": { "type": "string" }, + "subscriptions_url": { "type": "string" }, + "organizations_url": { "type": "string" }, + "repos_url": { "type": "string" }, + "events_url": { "type": "string" }, + "received_events_url": { "type": "string" }, + "type": { "type": "string" }, + "site_admin": { "type": "boolean" } + } + }, + "private": { "type": "boolean" }, + "html_url": { "type": "string" }, + "description": { "type": "string" }, + "fork": { "type": "boolean" }, + "url": { "type": "string" }, + "archive_url": { "type": "string" }, + "assignees_url": { "type": "string" }, + "blobs_url": { "type": "string" }, + "branches_url": { "type": "string" }, + "collaborators_url": { "type": "string" }, + "comments_url": { "type": "string" }, + "commits_url": { "type": "string" }, + "compare_url": { "type": "string" }, + "contents_url": { "type": "string" }, + "contributors_url": { "type": "string" }, + "deployments_url": { "type": "string" }, + "downloads_url": { "type": "string" }, + "events_url": { "type": "string" }, + "forks_url": { "type": "string" }, + "git_commits_url": { "type": "string" }, + "git_refs_url": { "type": "string" }, + "git_tags_url": { "type": "string" }, + "git_url": { "type": "string" }, + "issue_comment_url": { "type": "string" }, + "issue_events_url": { "type": "string" }, + "issues_url": { "type": "string" }, + "keys_url": { "type": "string" }, + "labels_url": { "type": "string" }, + "languages_url": { "type": "string" }, + "merges_url": { "type": "string" }, + "milestones_url": { "type": "string" }, + "notifications_url": { "type": "string" }, + "pulls_url": { "type": "string" }, + "releases_url": { "type": "string" }, + "ssh_url": { "type": "string" }, + "stargazers_url": { "type": "string" }, + "statuses_url": { "type": "string" }, + "subscribers_url": { "type": "string" }, + "subscription_url": { "type": "string" }, + "tags_url": { "type": "string" }, + "teams_url": { "type": "string" }, + "trees_url": { "type": "string" }, + "clone_url": { "type": "string" }, + "mirror_url": { "type": "string" }, + "hooks_url": { "type": "string" }, + "svn_url": { "type": "string" }, + "homepage": { "type": "string" }, + "language": { "type": "string" }, + "forks_count": { "type": "integer" }, + "stargazers_count": { "type": "integer" }, + "watchers_count": { "type": "integer" }, + "size": { "type": "integer" }, + "default_branch": { "type": "string" }, + "open_issues_count": { "type": "integer" }, + "is_template": { "type": "boolean" }, + "topics": { + "type": "array", + "items": { "type": "string" } + }, + "has_issues": { "type": "boolean" }, + "has_projects": { "type": "boolean" }, + "has_wiki": { "type": "boolean" }, + "has_pages": { "type": "boolean" }, + "has_downloads": { "type": "boolean" }, + "archived": { "type": "boolean" }, + "disabled": { "type": "boolean" }, + "visibility": { "type": "string" }, + "pushed_at": { "type": "string" }, + "created_at": { "type": "string" }, + "updated_at": { "type": "string" }, + "permissions": { + "type": "object", + "properties": { + "admin": { "type": "boolean" }, + "maintain": { "type": "boolean" }, + "push": { "type": "boolean" }, + "triage": { "type": "boolean" }, + "pull": { "type": "boolean" } + } + }, + "allow_rebase_merge": { "type": "boolean" }, + "temp_clone_token": { "type": "string" }, + "allow_squash_merge": { "type": "boolean" }, + "allow_auto_merge": { "type": "boolean" }, + "delete_branch_on_merge": { "type": "boolean" }, + "allow_update_branch": { "type": "boolean" }, + "use_squash_pr_title_as_default": { "type": "boolean" }, + "squash_merge_commit_title": { "type": "string" }, + "squash_merge_commit_message": { "type": "string" }, + "merge_commit_title": { "type": "string" }, + "merge_commit_message": { "type": "string" }, + "allow_merge_commit": { "type": "boolean" }, + "subscribers_count": { "type": "integer" }, + "network_count": { "type": "integer" } + } + }, + "temp_clone_token": { "type": "string" }, + "allow_squash_merge": { "type": "boolean" }, + "allow_auto_merge": { "type": "boolean" }, + "delete_branch_on_merge": { "type": "boolean" }, + "allow_update_branch": { "type": "boolean" }, + "use_squash_pr_title_as_default": { "type": "boolean" }, + "squash_merge_commit_title": { "type": "string" }, + "squash_merge_commit_message": { "type": "string" }, + "merge_commit_title": { "type": "string" }, + "merge_commit_message": { "type": "string" }, + "allow_merge_commit": { "type": "boolean" }, + "allow_forking": { "type": "boolean" }, + "web_commit_signoff_required": { "type": "boolean" }, + "subscribers_count": { "type": "integer" }, + "network_count": { "type": "integer" }, + "open_issues": { "type": "integer" }, + "watchers": { "type": "integer" }, + "master_branch": { "type": "string" }, + "starred_at": { "type": "string" }, + "anonymous_access_enabled": { "type": "boolean" } + }, + "performed_via_github_app": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { "type": "integer" }, + "slug": { "type": "string" }, + "node_id": { "type": "string" }, + "owner": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "name": { "type": ["string", "null"] }, + "email": { "type": ["string", "null"] }, + "login": { "type": "string" }, + "id": { "type": "integer" }, + "node_id": { "type": "string" }, + "avatar_url": { "type": "string" }, + "gravatar_id": { "type": ["string", "null"] }, + "url": { "type": "string" }, + "html_url": { "type": "string" }, + "followers_url": { "type": "string" }, + "following_url": { "type": "string" }, + "gists_url": { "type": "string" }, + "starred_url": { "type": "string" }, + "subscriptions_url": { "type": "string" }, + "organizations_url": { "type": "string" }, + "repos_url": { "type": "string" }, + "events_url": { "type": "string" }, + "received_events_url": { "type": "string" }, + "type": { "type": "string" }, + "site_admin": { "type": "boolean" }, + "starred_at": { "type": "string" } + } + } + ] + }, + "name": { "type": "string" }, + "description": { "type": ["string", "null"] }, + "external_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "permissions": { + "type": "object", + "properties": { + "issues": { + "type": "string" + }, + "checks": { + "type": "string" + }, + "metadata": { + "type": "string" + }, + "contents": { + "type": "string" + }, + "deployments": { + "type": "string" + } + }, + "additionalProperties": true + }, + "events": { + "type": "array", + "items": { + "type": "string" + }, + "examples": ["label", "deployment"] + }, + "installations_count": { + "type": "integer", + "examples": [5] + }, + "client_id": { + "type": "string" + }, + "client_secret": { + "type": "string" + }, + "webhook_secret": { + "type": ["string", "null"] + }, + "pem": { + "type": "string" + } + } + } + ] + }, + "author_association": { + "type": "string" + }, + "reactions": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "total_count": { + "type": "integer" + }, + "+1": { + "type": "integer" + }, + "-1": { + "type": "integer" + }, + "laugh": { + "type": "integer" + }, + "confused": { + "type": "integer" + }, + "heart": { + "type": "integer" + }, + "hooray": { + "type": "integer" + }, + "eyes": { + "type": "integer" + }, + "rocket": { + "type": "integer" + } + } + } + } + } + } + } + } + } +} diff --git a/airbyte-integrations/connectors/source-github/source_github/schemas/shared/events/reviewed.json b/airbyte-integrations/connectors/source-github/source_github/schemas/shared/events/reviewed.json new file mode 100644 index 000000000000..e3458ac4b770 --- /dev/null +++ b/airbyte-integrations/connectors/source-github/source_github/schemas/shared/events/reviewed.json @@ -0,0 +1,138 @@ +{ + "title": "Timeline Reviewed Event", + "description": "Timeline Reviewed Event", + "type": "object", + "properties": { + "event": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "node_id": { + "type": "string" + }, + "user": { + "title": "Simple User", + "description": "A GitHub user.", + "type": "object", + "properties": { + "name": { + "type": ["string", "null"] + }, + "email": { + "type": ["string", "null"] + }, + "login": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "node_id": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "gravatar_id": { + "type": ["string", "null"] + }, + "url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "followers_url": { + "type": "string" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "type": "string" + }, + "organizations_url": { + "type": "string" + }, + "repos_url": { + "type": "string" + }, + "events_url": { + "type": "string" + }, + "received_events_url": { + "type": "string" + }, + "type": { + "type": "string" + }, + "site_admin": { + "type": "boolean" + }, + "starred_at": { + "type": "string" + } + } + }, + "body": { + "type": ["string", "null"] + }, + "state": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "pull_request_url": { + "type": "string" + }, + "_links": { + "type": "object", + "properties": { + "html": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + }, + "required": ["href"] + }, + "pull_request": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + }, + "required": ["href"] + } + }, + "required": ["html", "pull_request"] + }, + "submitted_at": { + "type": "string", + "format": "date-time" + }, + "commit_id": { + "type": "string" + }, + "body_html": { + "type": "string" + }, + "body_text": { + "type": "string" + }, + "author_association": { + "type": "string" + } + } +} diff --git a/airbyte-integrations/connectors/source-github/source_github/source.py b/airbyte-integrations/connectors/source-github/source_github/source.py index 96cd0a2d34bf..025028e09c80 100644 --- a/airbyte-integrations/connectors/source-github/source_github/source.py +++ b/airbyte-integrations/connectors/source-github/source_github/source.py @@ -32,6 +32,7 @@ IssueMilestones, IssueReactions, Issues, + IssueTimelineEvents, Organizations, ProjectCards, ProjectColumns, @@ -289,6 +290,7 @@ def streams(self, config: Mapping[str, Any]) -> List[Stream]: workflow_runs_stream = WorkflowRuns(**repository_args_with_start_date) return [ + IssueTimelineEvents(**repository_args), Assignees(**repository_args), Branches(**repository_args), Collaborators(**repository_args), diff --git a/airbyte-integrations/connectors/source-github/source_github/streams.py b/airbyte-integrations/connectors/source-github/source_github/streams.py index b35e04263e33..2e26a0a3c153 100644 --- a/airbyte-integrations/connectors/source-github/source_github/streams.py +++ b/airbyte-integrations/connectors/source-github/source_github/streams.py @@ -1586,3 +1586,44 @@ def parse_response( yield from super().parse_response( response, stream_state=stream_state, stream_slice=stream_slice, next_page_token=next_page_token ) + + +class IssueTimelineEvents(GithubStream): + """ + API docs https://docs.github.com/en/rest/issues/timeline?apiVersion=2022-11-28 + """ + + primary_key = ["repository", "issue_number"] + + def __init__(self, **kwargs): + super().__init__(**kwargs) + self.parent = Issues(**kwargs) + + def path(self, stream_slice: Mapping[str, Any] = None, **kwargs) -> str: + return f"repos/{stream_slice['repository']}/issues/{stream_slice['number']}/timeline" + + def stream_slices( + self, sync_mode: SyncMode, cursor_field: List[str] = None, stream_state: Mapping[str, Any] = None + ) -> Iterable[Optional[Mapping[str, Any]]]: + parent_stream_slices = self.parent.stream_slices( + sync_mode=SyncMode.full_refresh, cursor_field=cursor_field, stream_state=stream_state + ) + for stream_slice in parent_stream_slices: + parent_records = self.parent.read_records( + sync_mode=SyncMode.full_refresh, cursor_field=cursor_field, stream_slice=stream_slice, stream_state=stream_state + ) + for record in parent_records: + yield {"repository": record["repository"], "number": record["number"]} + + def parse_response( + self, + response: requests.Response, + stream_state: Mapping[str, Any], + stream_slice: Mapping[str, Any] = None, + next_page_token: Mapping[str, Any] = None, + ) -> Iterable[Mapping]: + events_list = response.json() + record = {"repository": stream_slice["repository"], "issue_number": stream_slice["number"]} + for event in events_list: + record[event["event"]] = event + yield record diff --git a/airbyte-integrations/connectors/source-github/unit_tests/responses/issue_timeline_events.json b/airbyte-integrations/connectors/source-github/unit_tests/responses/issue_timeline_events.json new file mode 100644 index 000000000000..026243a2c6b7 --- /dev/null +++ b/airbyte-integrations/connectors/source-github/unit_tests/responses/issue_timeline_events.json @@ -0,0 +1,166 @@ +[ + { + "id": 6430295168, + "node_id": "LOE_lADODwFebM5HwC0kzwAAAAF_RoSA", + "url": "https://api.github.com/repos/github/roadmap/issues/events/6430295168", + "actor": { + "login": "github", + "id": 9919, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=", + "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github", + "html_url": "https://github.com/github", + "followers_url": "https://api.github.com/users/github/followers", + "following_url": "https://api.github.com/users/github/following{/other_user}", + "gists_url": "https://api.github.com/users/github/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github/subscriptions", + "organizations_url": "https://api.github.com/users/github/orgs", + "repos_url": "https://api.github.com/users/github/repos", + "events_url": "https://api.github.com/users/github/events{/privacy}", + "received_events_url": "https://api.github.com/users/github/received_events", + "type": "Organization", + "site_admin": false + }, + "event": "locked", + "commit_id": null, + "commit_url": null, + "created_at": "2022-04-13T20:49:13Z", + "lock_reason": null, + "performed_via_github_app": null + }, + { + "id": 6430296748, + "node_id": "LE_lADODwFebM5HwC0kzwAAAAF_Roqs", + "url": "https://api.github.com/repos/github/roadmap/issues/events/6430296748", + "actor": { + "login": "github-product-roadmap", + "id": 67656570, + "node_id": "MDQ6VXNlcjY3NjU2NTcw", + "avatar_url": "https://avatars.githubusercontent.com/u/67656570?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-product-roadmap", + "html_url": "https://github.com/github-product-roadmap", + "followers_url": "https://api.github.com/users/github-product-roadmap/followers", + "following_url": "https://api.github.com/users/github-product-roadmap/following{/other_user}", + "gists_url": "https://api.github.com/users/github-product-roadmap/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-product-roadmap/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-product-roadmap/subscriptions", + "organizations_url": "https://api.github.com/users/github-product-roadmap/orgs", + "repos_url": "https://api.github.com/users/github-product-roadmap/repos", + "events_url": "https://api.github.com/users/github-product-roadmap/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-product-roadmap/received_events", + "type": "User", + "site_admin": false + }, + "event": "labeled", + "commit_id": null, + "commit_url": null, + "created_at": "2022-04-13T20:49:34Z", + "label": { + "name": "beta", + "color": "99dd88" + }, + "performed_via_github_app": null + }, + { + "id": 6635165802, + "node_id": "RTE_lADODwFebM5HwC0kzwAAAAGLfJhq", + "url": "https://api.github.com/repos/github/roadmap/issues/events/6635165802", + "actor": { + "login": "github-product-roadmap", + "id": 67656570, + "node_id": "MDQ6VXNlcjY3NjU2NTcw", + "avatar_url": "https://avatars.githubusercontent.com/u/67656570?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-product-roadmap", + "html_url": "https://github.com/github-product-roadmap", + "followers_url": "https://api.github.com/users/github-product-roadmap/followers", + "following_url": "https://api.github.com/users/github-product-roadmap/following{/other_user}", + "gists_url": "https://api.github.com/users/github-product-roadmap/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-product-roadmap/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-product-roadmap/subscriptions", + "organizations_url": "https://api.github.com/users/github-product-roadmap/orgs", + "repos_url": "https://api.github.com/users/github-product-roadmap/repos", + "events_url": "https://api.github.com/users/github-product-roadmap/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-product-roadmap/received_events", + "type": "User", + "site_admin": false + }, + "event": "renamed", + "commit_id": null, + "commit_url": null, + "created_at": "2022-05-18T19:29:01Z", + "rename": { + "from": "Secret scanning: dry-runs for enterprise-level custom patterns (cloud)", + "to": "Secret scanning: dry-runs for enterprise-level custom patterns" + }, + "performed_via_github_app": null + }, + { + "url": "https://api.github.com/repos/github/roadmap/issues/comments/1130876857", + "html_url": "https://github.com/github/roadmap/issues/493#issuecomment-1130876857", + "issue_url": "https://api.github.com/repos/github/roadmap/issues/493", + "id": 1130876857, + "node_id": "IC_kwDODwFebM5DZ8-5", + "user": { + "login": "octocat", + "id": 94867353, + "node_id": "U_kgDOBaePmQ", + "avatar_url": "https://avatars.githubusercontent.com/u/94867353?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": true + }, + "created_at": "2022-05-19T00:52:15Z", + "updated_at": "2022-05-19T00:52:15Z", + "author_association": "COLLABORATOR", + "body": "🚢 Shipped to the cloud: https://github.blog/changelog/2022-05-12-secret-scanning-dry-runs-for-enterprise-level-custom-patterns/", + "reactions": { + "url": "https://api.github.com/repos/github/roadmap/issues/comments/1130876857/reactions", + "total_count": 0, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "performed_via_github_app": null, + "event": "commented", + "actor": { + "login": "octocat", + "id": 94867353, + "node_id": "U_kgDOBaePmQ", + "avatar_url": "https://avatars.githubusercontent.com/u/94867353?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": true + } + } +] diff --git a/airbyte-integrations/connectors/source-github/unit_tests/responses/issue_timeline_events_response.json b/airbyte-integrations/connectors/source-github/unit_tests/responses/issue_timeline_events_response.json new file mode 100644 index 000000000000..ee6a8dc668b8 --- /dev/null +++ b/airbyte-integrations/connectors/source-github/unit_tests/responses/issue_timeline_events_response.json @@ -0,0 +1,170 @@ +[ + { + "repository": "airbytehq/airbyte", + "issue_number": 1, + "locked": { + "id": 6430295168, + "node_id": "LOE_lADODwFebM5HwC0kzwAAAAF_RoSA", + "url": "https://api.github.com/repos/github/roadmap/issues/events/6430295168", + "actor": { + "login": "github", + "id": 9919, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=", + "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github", + "html_url": "https://github.com/github", + "followers_url": "https://api.github.com/users/github/followers", + "following_url": "https://api.github.com/users/github/following{/other_user}", + "gists_url": "https://api.github.com/users/github/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github/subscriptions", + "organizations_url": "https://api.github.com/users/github/orgs", + "repos_url": "https://api.github.com/users/github/repos", + "events_url": "https://api.github.com/users/github/events{/privacy}", + "received_events_url": "https://api.github.com/users/github/received_events", + "type": "Organization", + "site_admin": false + }, + "event": "locked", + "commit_id": null, + "commit_url": null, + "created_at": "2022-04-13T20:49:13Z", + "lock_reason": null, + "performed_via_github_app": null + }, + "labeled": { + "id": 6430296748, + "node_id": "LE_lADODwFebM5HwC0kzwAAAAF_Roqs", + "url": "https://api.github.com/repos/github/roadmap/issues/events/6430296748", + "actor": { + "login": "github-product-roadmap", + "id": 67656570, + "node_id": "MDQ6VXNlcjY3NjU2NTcw", + "avatar_url": "https://avatars.githubusercontent.com/u/67656570?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-product-roadmap", + "html_url": "https://github.com/github-product-roadmap", + "followers_url": "https://api.github.com/users/github-product-roadmap/followers", + "following_url": "https://api.github.com/users/github-product-roadmap/following{/other_user}", + "gists_url": "https://api.github.com/users/github-product-roadmap/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-product-roadmap/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-product-roadmap/subscriptions", + "organizations_url": "https://api.github.com/users/github-product-roadmap/orgs", + "repos_url": "https://api.github.com/users/github-product-roadmap/repos", + "events_url": "https://api.github.com/users/github-product-roadmap/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-product-roadmap/received_events", + "type": "User", + "site_admin": false + }, + "event": "labeled", + "commit_id": null, + "commit_url": null, + "created_at": "2022-04-13T20:49:34Z", + "label": { + "name": "beta", + "color": "99dd88" + }, + "performed_via_github_app": null + }, + "renamed": { + "id": 6635165802, + "node_id": "RTE_lADODwFebM5HwC0kzwAAAAGLfJhq", + "url": "https://api.github.com/repos/github/roadmap/issues/events/6635165802", + "actor": { + "login": "github-product-roadmap", + "id": 67656570, + "node_id": "MDQ6VXNlcjY3NjU2NTcw", + "avatar_url": "https://avatars.githubusercontent.com/u/67656570?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-product-roadmap", + "html_url": "https://github.com/github-product-roadmap", + "followers_url": "https://api.github.com/users/github-product-roadmap/followers", + "following_url": "https://api.github.com/users/github-product-roadmap/following{/other_user}", + "gists_url": "https://api.github.com/users/github-product-roadmap/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-product-roadmap/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-product-roadmap/subscriptions", + "organizations_url": "https://api.github.com/users/github-product-roadmap/orgs", + "repos_url": "https://api.github.com/users/github-product-roadmap/repos", + "events_url": "https://api.github.com/users/github-product-roadmap/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-product-roadmap/received_events", + "type": "User", + "site_admin": false + }, + "event": "renamed", + "commit_id": null, + "commit_url": null, + "created_at": "2022-05-18T19:29:01Z", + "rename": { + "from": "Secret scanning: dry-runs for enterprise-level custom patterns (cloud)", + "to": "Secret scanning: dry-runs for enterprise-level custom patterns" + }, + "performed_via_github_app": null + }, + "commented": { + "url": "https://api.github.com/repos/github/roadmap/issues/comments/1130876857", + "html_url": "https://github.com/github/roadmap/issues/493#issuecomment-1130876857", + "issue_url": "https://api.github.com/repos/github/roadmap/issues/493", + "id": 1130876857, + "node_id": "IC_kwDODwFebM5DZ8-5", + "user": { + "login": "octocat", + "id": 94867353, + "node_id": "U_kgDOBaePmQ", + "avatar_url": "https://avatars.githubusercontent.com/u/94867353?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": true + }, + "created_at": "2022-05-19T00:52:15Z", + "updated_at": "2022-05-19T00:52:15Z", + "author_association": "COLLABORATOR", + "body": "🚢 Shipped to the cloud: https://github.blog/changelog/2022-05-12-secret-scanning-dry-runs-for-enterprise-level-custom-patterns/", + "reactions": { + "url": "https://api.github.com/repos/github/roadmap/issues/comments/1130876857/reactions", + "total_count": 0, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "performed_via_github_app": null, + "event": "commented", + "actor": { + "login": "octocat", + "id": 94867353, + "node_id": "U_kgDOBaePmQ", + "avatar_url": "https://avatars.githubusercontent.com/u/94867353?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": true + } + } + } +] diff --git a/airbyte-integrations/connectors/source-github/unit_tests/test_stream.py b/airbyte-integrations/connectors/source-github/unit_tests/test_stream.py index dca82c498894..d184bda20f6d 100644 --- a/airbyte-integrations/connectors/source-github/unit_tests/test_stream.py +++ b/airbyte-integrations/connectors/source-github/unit_tests/test_stream.py @@ -10,6 +10,7 @@ import pytest import requests import responses +from airbyte_cdk.models import SyncMode from airbyte_cdk.sources.streams.http.exceptions import BaseBackoffException, UserDefinedBackoffException from requests import HTTPError from responses import matchers @@ -26,6 +27,7 @@ IssueEvents, IssueLabels, IssueMilestones, + IssueTimelineEvents, Organizations, ProjectCards, ProjectColumns, @@ -1349,3 +1351,20 @@ def test_stream_contributor_activity_parse_empty_response(caplog): assert resp.call_count == 1 assert records == [] assert expected_message in caplog.messages + + +@responses.activate +def test_issues_timeline_events(): + repository_args = { + "repositories": ["airbytehq/airbyte"], + "page_size_for_large_streams": 20, + } + response_file = Path(__file__).parent / "responses/issue_timeline_events.json" + response_json = json.load(open(response_file)) + responses.add(responses.GET, "https://api.github.com/repos/airbytehq/airbyte/issues/1/timeline?per_page=100", json=response_json) + expected_file = Path(__file__).parent / "responses/issue_timeline_events_response.json" + expected_records = json.load(open(expected_file)) + + stream = IssueTimelineEvents(**repository_args) + records = list(stream.read_records(sync_mode=SyncMode.full_refresh, stream_slice={"repository": "airbytehq/airbyte", "number": 1})) + assert expected_records == records diff --git a/docs/integrations/sources/github.md b/docs/integrations/sources/github.md index 85c4b709bb6b..6144831040da 100644 --- a/docs/integrations/sources/github.md +++ b/docs/integrations/sources/github.md @@ -84,6 +84,7 @@ This connector outputs the following full refresh streams: - [TeamMemberships](https://docs.github.com/en/rest/reference/teams#get-team-membership-for-a-user) - [Teams](https://docs.github.com/en/rest/reference/teams#list-teams) - [Users](https://docs.github.com/en/rest/reference/orgs#list-organization-members) +- [Issue timeline events](https://docs.github.com/en/rest/issues/timeline?apiVersion=2022-11-28) This connector outputs the following incremental streams: @@ -165,10 +166,11 @@ The GitHub connector should not run into GitHub API limitations under normal usa | Version | Date | Pull Request | Subject | |:--------|:-----------|:------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| 1.3.1 | 2023-08-28 | [30824](https://github.com/airbytehq/airbyte/pull/30824) | Handle empty response in stream `ContributorActivity` | -| 1.3.0 | 2023-08-25 | [30731](https://github.com/airbytehq/airbyte/pull/30731) | Add new stream `ProjectsV2` | -| 1.2.1 | 2023-08-22 | [30693](https://github.com/airbytehq/airbyte/pull/30693) | Handle 404 error in `TeamMemberShips` | -| 1.2.0 | 2023-08-22 | [30647](https://github.com/airbytehq/airbyte/pull/30647) | Add support for self-hosted GitHub instances | +| 1.4.0 | 2023-09-29 | [30823](https://github.com/airbytehq/airbyte/pull/30823) | Add new stream `issue Timeline Events` | +| 1.3.1 | 2023-09-28 | [30824](https://github.com/airbytehq/airbyte/pull/30824) | Handle empty response in stream `ContributorActivity` | +| 1.3.0 | 2023-09-25 | [30731](https://github.com/airbytehq/airbyte/pull/30731) | Add new stream `ProjectsV2` | +| 1.2.1 | 2023-09-22 | [30693](https://github.com/airbytehq/airbyte/pull/30693) | Handle 404 error in `TeamMemberShips` | +| 1.2.0 | 2023-09-22 | [30647](https://github.com/airbytehq/airbyte/pull/30647) | Add support for self-hosted GitHub instances | | 1.1.1 | 2023-09-21 | [30654](https://github.com/airbytehq/airbyte/pull/30654) | Rewrite source connection error messages | | 1.1.0 | 2023-08-03 | [30615](https://github.com/airbytehq/airbyte/pull/30615) | Add new stream `Contributor Activity` | | 1.0.4 | 2023-08-03 | [29031](https://github.com/airbytehq/airbyte/pull/29031) | Reverted `advancedAuth` spec changes |