Skip to content

Commit

Permalink
fix: releases replication key (#254)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
TylerHillery authored May 15, 2024
1 parent 19af00a commit 311d60e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tap_github/repository_streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 311d60e

Please sign in to comment.