Skip to content

Commit

Permalink
TDL-13624: Make start date required field, add start_date in readme a…
Browse files Browse the repository at this point in the history
…nd sample config (#122)

* TDL-13624: Make start date required field, Added start_date in readme and sample config file

* Updated config description in README.md file
  • Loading branch information
savan-chovatiya authored Jun 10, 2021
1 parent a97abf4 commit 2d9579e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,15 @@ This tap:
3. Create the config file
Create a JSON file containing the access token you just created
Create a JSON file containing the start date, access token you just created
and the path to one or multiple repositories that you want to extract data from. Each repo path should be space delimited. The repo path is relative to
`https://github.com/`. For example the path for this repository is
`singer-io/tap-github`.
```json
{"access_token": "your-access-token",
"repository": "singer-io/tap-github singer-io/getting-started"}
"repository": "singer-io/tap-github singer-io/getting-started",
"start_date": "2021-01-01T00:00:00Z"}
```
4. Run the tap in discovery mode to get properties.json file
Expand Down
3 changes: 2 additions & 1 deletion config.sample.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"access_token": "abcdefghijklmnopqrstuvwxyz1234567890ABCD",
"repository": "singer-io/target-stitch"
"repository": "singer-io/target-stitch",
"start_date": "2021-01-01T00:00:00Z"
}
2 changes: 1 addition & 1 deletion tap_github/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
session = requests.Session()
logger = singer.get_logger()

REQUIRED_CONFIG_KEYS = ['access_token', 'repository']
REQUIRED_CONFIG_KEYS = ['start_date', 'access_token', 'repository']

KEY_PROPERTIES = {
'commits': ['sha'],
Expand Down
3 changes: 1 addition & 2 deletions tests/test_github_start_date.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,10 @@ def test_run(self):
for stream in expected_streams:

# There are no data or not enough data for testing for below streams
# pull_request_review -> always skipped during sync mode
# commit_comments, releases -> No data in tap-github repositery
# issue_milestones -> One data for isuue_milestones so not able to pass incremental cases
# projects, projects_columns, project_cards -> One record for project so not able to pass incremental cases
if stream in ["pull_request_reviews", "commit_comments", "releases", "issue_milestones", "projects", "project_columns", "project_cards"]:
if stream in ["commit_comments", "releases", "issue_milestones", "projects", "project_columns", "project_cards"]:
continue

with self.subTest(stream=stream):
Expand Down

0 comments on commit 2d9579e

Please sign in to comment.