Skip to content

Commit

Permalink
update streams.py to use new state format
Browse files Browse the repository at this point in the history
  • Loading branch information
leslievandemark committed Dec 11, 2024
1 parent 6b892de commit c0e835e
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions tap_github/streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def get_bookmark(state, repo, stream_name, bookmark_key, start_date):
"""
Return bookmark value if available in the state otherwise return start date
"""
repo_stream_dict = bookmarks.get_bookmark(state, repo, stream_name)
repo_stream_dict = bookmarks.get_bookmark(state, stream_name, repo)
if repo_stream_dict:
return repo_stream_dict.get(bookmark_key)

Expand Down Expand Up @@ -119,7 +119,7 @@ def write_bookmarks(self, stream, selected_streams, bookmark_value, repo_path, s

# If the stream is selected, write the bookmark.
if stream in selected_streams:
singer.write_bookmark(state, repo_path, stream_obj.tap_stream_id, {"since": bookmark_value})
singer.write_bookmark(state, stream_obj.tap_stream_id, repo_path, {"since": bookmark_value})

# For the each child, write the bookmark if it is selected.
for child in stream_obj.children:
Expand Down Expand Up @@ -205,14 +205,14 @@ def add_fields_at_1st_level(self, record, parent_record = None):

class FullTableStream(Stream):
def sync_endpoint(self,
client,
state,
catalog,
repo_path,
start_date,
selected_stream_ids,
stream_to_sync
):
client,
state,
catalog,
repo_path,
start_date,
selected_stream_ids,
stream_to_sync
):
"""
A common function sync full table streams.
"""
Expand Down

0 comments on commit c0e835e

Please sign in to comment.