Skip to content

Commit

Permalink
🐛 Source Github: improve docs & spec for BETA (#11212)
Browse files Browse the repository at this point in the history
Signed-off-by: Sergey Chvalyuk <grubberr@gmail.com>
Co-authored-by: Sherif A. Nada <snadalive@gmail.com>
  • Loading branch information
grubberr and sherifnada authored Mar 24, 2022
1 parent fa411d0 commit 05605c6
Show file tree
Hide file tree
Showing 5 changed files with 173 additions and 77 deletions.
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
96 changes: 68 additions & 28 deletions airbyte-config/init/src/main/resources/seed/source_specs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2380,9 +2380,9 @@
supportsNormalization: false
supportsDBT: false
supported_destination_sync_modes: []
- dockerImage: "airbyte/source-github:0.2.22"
- dockerImage: "airbyte/source-github:0.2.23"
spec:
documentationUrl: "https://docs.airbyte.io/integrations/sources/github"
documentationUrl: "https://docs.airbyte.com/integrations/sources/github"
connectionSpecification:
$schema: "http://json-schema.org/draft-07/schema#"
title: "GitHub Source Spec"
Expand All @@ -2393,9 +2393,10 @@
additionalProperties: true
properties:
credentials:
title: "Authentication Mechanism"
title: "Authentication *"
description: "Choose how to authenticate to GitHub"
type: "object"
order: 0
oneOf:
- type: "object"
title: "Authenticate via GitHub (OAuth)"
Expand All @@ -2404,9 +2405,11 @@
properties:
option_title:
type: "string"
title: "Credentials Title"
description: "OAuth Credentials"
const: "OAuth Credentials"
enum:
- "OAuth Credentials"
default: "OAuth Credentials"
order: 0
access_token:
type: "string"
title: "Access Token"
Expand All @@ -2419,9 +2422,11 @@
properties:
option_title:
type: "string"
title: "Credentials Title"
description: "PAT Credentials"
const: "PAT Credentials"
enum:
- "PAT Credential"
default: "PAT Credential"
order: 0
personal_access_token:
type: "string"
title: "Personal Access Tokens"
Expand All @@ -2430,6 +2435,19 @@
\ across multiple API tokens, input multiple tokens separated with\
\ \",\""
airbyte_secret: true
start_date:
type: "string"
title: "Start Date"
description: "The date from which you'd like to replicate data from GitHub\
\ in the format YYYY-MM-DDT00:00:00Z. For the streams which support this\
\ configuration, only data generated on or after the start date will be\
\ replicated. This field doesn't apply to all streams, see the <a href=\"\
https://docs.airbyte.com/integrations/sources/github\">docs</a> for more\
\ info"
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$"
order: 1
repository:
type: "string"
examples:
Expand All @@ -2441,45 +2459,67 @@
\ e.g. `airbytehq/airbyte` for single repository, `airbytehq/*` for get\
\ all repositories from organization and `airbytehq/airbyte airbytehq/another-repo`\
\ for multiple repositories."
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."
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$"
order: 2
branch:
type: "string"
title: "Branch"
title: "Branch (Optional)"
examples:
- "airbytehq/airbyte/master airbytehq/airbyte/my-branch"
description: "Space-delimited list of GitHub repository branches to pull\
\ commits for, e.g. `airbytehq/airbyte/master`. If no branches are specified\
\ for a repository, the default branch will be pulled."
order: 3
page_size_for_large_streams:
type: "integer"
title: "Page size for large streams"
title: "Page size for large streams (Optional)"
minimum: 1
maximum: 100
default: 10
description: "The Github connector contains several streams with a large\
\ load. The page size of such streams depends on the size of your repository.\
\ Recommended to specify values between 10 and 30."
order: 4
supportsNormalization: false
supportsDBT: false
supported_destination_sync_modes: []
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"
- dockerImage: "airbyte/source-gitlab:0.1.4"
spec:
documentationUrl: "https://docs.airbyte.io/integrations/sources/gitlab"
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
@@ -1,5 +1,5 @@
{
"documentationUrl": "https://docs.airbyte.io/integrations/sources/github",
"documentationUrl": "https://docs.airbyte.com/integrations/sources/github",
"connectionSpecification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "GitHub Source Spec",
Expand All @@ -8,9 +8,10 @@
"additionalProperties": true,
"properties": {
"credentials": {
"title": "Authentication Mechanism",
"title": "Authentication *",
"description": "Choose how to authenticate to GitHub",
"type": "object",
"order": 0,
"oneOf": [
{
"type": "object",
Expand All @@ -19,9 +20,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 +40,10 @@
"properties": {
"option_title": {
"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 @@ -52,6 +55,14 @@
}
]
},
"start_date": {
"type": "string",
"title": "Start Date",
"description": "The date from which you'd like to replicate data from GitHub in the format YYYY-MM-DDT00:00:00Z. For the streams which support this configuration, only data generated on or after the start date will be replicated. This field doesn't apply to all streams, see the <a href=\"https://docs.airbyte.com/integrations/sources/github\">docs</a> for more info",
"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$",
"order": 1
},
"repository": {
"type": "string",
"examples": [
Expand All @@ -60,37 +71,68 @@
"airbytehq/airbyte"
],
"title": "GitHub Repositories",
"description": "Space-delimited list of GitHub organizations/repositories, e.g. `airbytehq/airbyte` for single repository, `airbytehq/*` for get all repositories from organization and `airbytehq/airbyte airbytehq/another-repo` for multiple repositories."
},
"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.",
"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$"
"description": "Space-delimited list of GitHub organizations/repositories, e.g. `airbytehq/airbyte` for single repository, `airbytehq/*` for get all repositories from organization and `airbytehq/airbyte airbytehq/another-repo` for multiple repositories.",
"order": 2
},
"branch": {
"type": "string",
"title": "Branch",
"title": "Branch (Optional)",
"examples": ["airbytehq/airbyte/master airbytehq/airbyte/my-branch"],
"description": "Space-delimited list of GitHub repository branches to pull commits for, e.g. `airbytehq/airbyte/master`. If no branches are specified for a repository, the default branch will be pulled."
"description": "Space-delimited list of GitHub repository branches to pull commits for, e.g. `airbytehq/airbyte/master`. If no branches are specified for a repository, the default branch will be pulled.",
"order": 3
},
"page_size_for_large_streams": {
"type": "integer",
"title": "Page size for large streams",
"title": "Page size for large streams (Optional)",
"minimum": 1,
"maximum": 100,
"default": 10,
"description": "The Github connector contains several streams with a large load. The page size of such streams depends on the size of your repository. Recommended to specify values between 10 and 30."
"description": "The Github connector contains several streams with a large load. The page size of such streams depends on the size of your repository. Recommended to specify values between 10 and 30.",
"order": 4
}
}
},
"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"]
}
}
}
}
}
}
Loading

0 comments on commit 05605c6

Please sign in to comment.