Skip to content

Commit 2d9579e

Browse files
TDL-13624: Make start date required field, add start_date in readme and sample config (singer-io#122)
* TDL-13624: Make start date required field, Added start_date in readme and sample config file * Updated config description in README.md file
1 parent a97abf4 commit 2d9579e

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,15 @@ This tap:
4040
4141
3. Create the config file
4242
43-
Create a JSON file containing the access token you just created
43+
Create a JSON file containing the start date, access token you just created
4444
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
4545
`https://github.com/`. For example the path for this repository is
4646
`singer-io/tap-github`.
4747
4848
```json
4949
{"access_token": "your-access-token",
50-
"repository": "singer-io/tap-github singer-io/getting-started"}
50+
"repository": "singer-io/tap-github singer-io/getting-started",
51+
"start_date": "2021-01-01T00:00:00Z"}
5152
```
5253
4. Run the tap in discovery mode to get properties.json file
5354

config.sample.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
22
"access_token": "abcdefghijklmnopqrstuvwxyz1234567890ABCD",
3-
"repository": "singer-io/target-stitch"
3+
"repository": "singer-io/target-stitch",
4+
"start_date": "2021-01-01T00:00:00Z"
45
}

tap_github/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
session = requests.Session()
1414
logger = singer.get_logger()
1515

16-
REQUIRED_CONFIG_KEYS = ['access_token', 'repository']
16+
REQUIRED_CONFIG_KEYS = ['start_date', 'access_token', 'repository']
1717

1818
KEY_PROPERTIES = {
1919
'commits': ['sha'],

tests/test_github_start_date.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,10 @@ def test_run(self):
8080
for stream in expected_streams:
8181

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

9089
with self.subTest(stream=stream):

0 commit comments

Comments
 (0)