From 311d60ef5b87078a9f4e4587c2d678abbee02e3b Mon Sep 17 00:00:00 2001 From: Tyler Hillery Date: Tue, 14 May 2024 20:03:42 -0700 Subject: [PATCH] fix: releases replication key (#254) I have updated the `replication_key` for GitHub releases to `created_at` field vs the `published_at` field. The `pubished_at` field can be `null` according to the [REST API endpoints for releases](https://docs.github.com/en/rest/releases/releases?apiVersion=2022-11-28) This was causing the below error ``` {"TypeError: '>' not supported between instances of 'NoneType' and 'str'"} ``` `created_at` field can't be null so this should fix that. --- tap_github/repository_streams.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tap_github/repository_streams.py b/tap_github/repository_streams.py index 0eb505a9..de8371e8 100644 --- a/tap_github/repository_streams.py +++ b/tap_github/repository_streams.py @@ -665,7 +665,7 @@ class ReleasesStream(GitHubRestStream): primary_keys = ["id"] parent_stream_type = RepositoryStream state_partitioning_keys = ["repo", "org"] - replication_key = "published_at" + replication_key = "created_at" MAX_RESULTS_LIMIT = 10000