Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Source Github: improve docs & spec for BETA #11212

Merged
merged 28 commits into from
Mar 24, 2022
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
5b90585
improve docs for BETA
grubberr Mar 16, 2022
a518b8e
bump version 0.2.22 -> 0.2.23
grubberr Mar 16, 2022
a25713c
improve changelog
grubberr Mar 17, 2022
f583faf
Merge branch 'master' into grubberr/11211-source-github
grubberr Mar 18, 2022
5b31b6a
Merge branch 'master' into grubberr/11211-source-github
grubberr Mar 18, 2022
97b66a3
Merge branch 'master' into grubberr/11211-source-github
grubberr Mar 19, 2022
be160fa
authSpecification -> advanced_auth
grubberr Mar 19, 2022
816774c
Merge branch 'master' into grubberr/11211-source-github
grubberr Mar 19, 2022
31c7d5d
Merge branch 'master' into grubberr/11211-source-github
grubberr Mar 21, 2022
72cc598
revert back auth_type -> option_title
grubberr Mar 21, 2022
c5a95b1
Merge branch 'master' into grubberr/11211-source-github
grubberr Mar 22, 2022
ec25145
re-order fields
grubberr Mar 22, 2022
2249d5f
- credentials - added required start '*'
grubberr Mar 22, 2022
85a4b5e
Merge branch 'master' into grubberr/11211-source-github
grubberr Mar 22, 2022
7afb2bd
Merge branch 'master' into grubberr/11211-source-github
grubberr Mar 22, 2022
c9d0900
- "Authentication Mechanism *" -> "Authentication *"
grubberr Mar 22, 2022
725090d
improve docs for Beta
grubberr Mar 23, 2022
41de92a
Merge branch 'master' into grubberr/11211-source-github
grubberr Mar 23, 2022
ffb717d
make page_size_for_large_streams optional
grubberr Mar 23, 2022
18c31f0
Merge branch 'master' into grubberr/11211-source-github
grubberr Mar 23, 2022
e13bc18
improve optional label
grubberr Mar 23, 2022
049cabb
improve label for `Authenticate via GitHub (OAuth)`
grubberr Mar 23, 2022
874d3a3
Update docs/integrations/sources/github.md
sherifnada Mar 24, 2022
745b865
Update docs/integrations/sources/github.md
sherifnada Mar 24, 2022
8ed9edd
Update airbyte-integrations/connectors/source-github/source_github/sp…
sherifnada Mar 24, 2022
bd592a3
Merge branch 'master' into grubberr/11211-source-github
grubberr Mar 24, 2022
a4d2564
fix urls and quoting
grubberr Mar 24, 2022
3c2fd78
source_specs.yaml updated
grubberr Mar 24, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@
- name: GitHub
sourceDefinitionId: ef69ef6e-aa7f-4af1-a01d-ef775033524e
dockerRepository: airbyte/source-github
dockerImageTag: 0.2.22
dockerImageTag: 0.2.23
documentationUrl: https://docs.airbyte.io/integrations/sources/github
icon: github.svg
sourceType: api
Expand Down
2 changes: 1 addition & 1 deletion airbyte-integrations/connectors/source-github/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ RUN pip install .
ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]

LABEL io.airbyte.version=0.2.22
LABEL io.airbyte.version=0.2.23
LABEL io.airbyte.name=airbyte/source-github
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@
"properties": {
"option_title": {
"type": "string",
"title": "Credentials Title",
"description": "OAuth Credentials",
"const": "OAuth Credentials"
"const": "OAuth Credentials",
"enum": ["OAuth Credentials"],
"default": "OAuth Credentials",
"order": 0
},
"access_token": {
"type": "string",
Expand All @@ -38,9 +39,10 @@
"properties": {
"option_title": {
grubberr marked this conversation as resolved.
Show resolved Hide resolved
"type": "string",
"title": "Credentials Title",
"description": "PAT Credentials",
"const": "PAT Credentials"
"const": "PAT Credentials",
"enum": ["PAT Credential"],
"default": "PAT Credential",
"order": 0
},
"personal_access_token": {
"type": "string",
Expand All @@ -65,7 +67,7 @@
"start_date": {
"type": "string",
"title": "Start Date",
"description": "The date from which you'd like to replicate data for GitHub in the format YYYY-MM-DDT00:00:00Z. All data generated after this date will be replicated. Note that it will be used only in the following incremental streams: comments, commits and issues.",
"description": "The date from which you'd like to replicate data for GitHub in the format YYYY-MM-DDT00:00:00Z. All data generated after this date will be replicated.",
"examples": ["2021-03-01T00:00:00Z"],
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$"
},
Expand All @@ -85,12 +87,47 @@
}
}
},
"authSpecification": {
"auth_type": "oauth2.0",
"oauth2Specification": {
"rootObject": ["credentials", 0],
"oauthFlowInitParameters": [],
"oauthFlowOutputParameters": [["access_token"]]
"advanced_auth": {
"auth_flow_type": "oauth2.0",
"predicate_key": ["credentials", "option_title"],
"predicate_value": "OAuth Credentials",
"oauth_config_specification": {
"complete_oauth_output_specification": {
"type": "object",
"additionalProperties": false,
"properties": {
"access_token": {
"type": "string",
"path_in_connector_config": ["credentials", "access_token"]
}
}
},
"complete_oauth_server_input_specification": {
"type": "object",
"additionalProperties": false,
"properties": {
"client_id": {
"type": "string"
},
"client_secret": {
"type": "string"
}
}
},
"complete_oauth_server_output_specification": {
"type": "object",
"additionalProperties": false,
"properties": {
"client_id": {
"type": "string",
"path_in_connector_config": ["credentials", "client_id"]
},
"client_secret": {
"type": "string",
"path_in_connector_config": ["credentials", "client_secret"]
}
}
}
}
}
}
23 changes: 12 additions & 11 deletions docs/integrations/sources/github.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,44 +17,44 @@ This connector outputs the following full refresh streams:
* [Issue reactions](https://docs.github.com/en/rest/reference/reactions#list-reactions-for-an-issue)
* [Organizations](https://docs.github.com/en/rest/reference/orgs#get-an-organization)
* [Pull request comment reactions](https://docs.github.com/en/rest/reference/reactions#list-reactions-for-a-pull-request-review-comment)
* [Pull request stats](https://docs.github.com/en/rest/reference/pulls#get-a-pull-request)
* [Pull request commits](https://docs.github.com/en/rest/reference/pulls#list-commits-on-a-pull-request)
* [Repositories](https://docs.github.com/en/rest/reference/repos#list-organization-repositories)
* [Reviews](https://docs.github.com/en/rest/reference/pulls#list-reviews-for-a-pull-request)
* [Tags](https://docs.github.com/en/rest/reference/repos#list-repository-tags)
* [Teams](https://docs.github.com/en/rest/reference/teams#list-teams)
* [Users](https://docs.github.com/en/rest/reference/orgs#list-organization-members)

This connector outputs the following incremental streams:

* [Comments](https://docs.github.com/en/rest/reference/issues#list-issue-comments-for-a-repository)
* [Commits](https://docs.github.com/en/rest/reference/repos#list-commits)
* [Commit comments](https://docs.github.com/en/rest/reference/repos#list-commit-comments-for-a-repository)
* [Commits](https://docs.github.com/en/rest/reference/repos#list-commits)
* [Deployments](https://docs.github.com/en/rest/reference/deployments#list-deployments)
* [Events](https://docs.github.com/en/rest/reference/activity#list-repository-events)
* [Issues](https://docs.github.com/en/rest/reference/issues#list-repository-issues)
* [Issue events](https://docs.github.com/en/rest/reference/issues#list-issue-events-for-a-repository)
* [Issue milestones](https://docs.github.com/en/rest/reference/issues#list-milestones)
* [Issues](https://docs.github.com/en/rest/reference/issues#list-repository-issues)
* [Project cards](https://docs.github.com/en/rest/reference/projects#list-project-cards)
* [Project columns](https://docs.github.com/en/rest/reference/projects#list-project-columns)
* [Projects](https://docs.github.com/en/rest/reference/projects#list-repository-projects)
* [Pull request stats](https://docs.github.com/en/rest/reference/pulls#get-a-pull-request)
* [Pull requests](https://docs.github.com/en/rest/reference/pulls#list-pull-requests)
* [Releases](https://docs.github.com/en/rest/reference/repos#list-releases)
* [Review comments](https://docs.github.com/en/rest/reference/pulls#list-review-comments-in-a-repository)
* [Reviews](https://docs.github.com/en/rest/reference/pulls#list-reviews-for-a-pull-request)
* [Stargazers](https://docs.github.com/en/rest/reference/activity#list-stargazers)
* [Deployments](https://docs.github.com/en/rest/reference/deployments#list-deployments)
* [Project cards](https://docs.github.com/en/rest/reference/projects#list-project-cards)
* [Project columns](https://docs.github.com/en/rest/reference/projects#list-project-columns)

### Notes
sherifnada marked this conversation as resolved.
Show resolved Hide resolved

1. Only 3 streams from above 12 incremental streams \(`comments`, `commits` and `issues`\) are pure incremental meaning that they:
1. Only 4 streams from above 17 incremental streams \(`comments`, `commits`, `issues` and `review comments`\) are pure incremental meaning that they:
* read only new records;
* output only new records.

Other 8 incremental streams are also incremental but with one difference, they:
Other 13 incremental streams are also incremental but with one difference, they:

* read all records;
* output only new records.

Please, consider this behaviour when using those 8 incremental streams because it may affect you API call limits.
Please, consider this behaviour when using those 13 incremental streams because it may affect you API call limits.
2. We are passing few parameters \(`since`, `sort` and `direction`\) to GitHub in order to filter records and sometimes for large streams specifying very distant `start_date` in the past may result in keep on getting error from GitHub instead of records \(respective `WARN` log message will be outputted\). In this case Specifying more recent `start_date` may help.

sherifnada marked this conversation as resolved.
Show resolved Hide resolved
### Features
Expand All @@ -77,7 +77,7 @@ The Github connector should not run into Github API limitations under normal usa

* Github Account;
* `access_token` - Github Personal Access Token wih the necessary permissions \(described below\);
* `start_date` - start date for 3 incremental streams: `comments`, `commits` and `issues`;
* `start_date` - start date for streams: `comments`, `commit_comment_reactions`, `commit_comments`, `commits`, `deployments`, `events`, `issue_comment_reactions`, `issue_events`, `issue_milestones`, `issue_reactions`, `issues`, `project_cards`, `project_columns`, `projects`, `pull_request_comment_reactions`, `pull_requests`, `pull_requeststats`, `releases`, `review_comments`, `reviews`, `stargazers`;
* `repository` - Space-delimited list of GitHub repositories/organizations which looks like `<owner>/<repo> <organization>/* <organization_new>/* <owner_new>/<repo_new>`.

**Note**: if you want to specify the organization to receive data from all its repositories, then you should specify it according to the following pattern: `<organization>/*`
Expand All @@ -96,6 +96,7 @@ Your token should have at least the `repo` scope. Depending on which streams you

| Version | Date | Pull Request | Subject |
|:--------|:-----------| :--- |:-------------------------------------------------------------------------------------------------------------|
| 0.2.23 | 2022-03-17 | [11212](https://github.com/airbytehq/airbyte/pull/11212) | Improve documentation and spec for Beta |
| 0.2.22 | 2022-03-10 | [10878](https://github.com/airbytehq/airbyte/pull/10878) | Fix error handling for unavailable streams with 404 status code |
| 0.2.21 | 2022-03-04 | [10749](https://github.com/airbytehq/airbyte/pull/10749) | Add new stream `ProjectCards` |
| 0.2.20 | 2022-02-16 | [10385](https://github.com/airbytehq/airbyte/pull/10385) | Add new stream `Deployments`, `ProjectColumns`, `PullRequestCommits` |
Expand Down