Skip to content

Commit 522d5bf

Browse files
committed
Create ReviewCommentReactionsStream
1 parent 178eac9 commit 522d5bf

2 files changed

Lines changed: 26 additions & 0 deletions

File tree

tap_github/repository_streams.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1673,6 +1673,30 @@ class ReviewCommentsStream(GitHubRestStream):
16731673
).to_dict()
16741674

16751675

1676+
class ReviewCommentReactionsStream(GitHubRestStream):
1677+
name = "review_comment_reactions"
1678+
path = "/repos/{org}/{repo}/pulls/comments/{comment_id}/reactions"
1679+
primary_keys: ClassVar[list[str]] = ["id"]
1680+
replication_key = None
1681+
parent_stream_type = ReviewCommentsStream
1682+
ignore_parent_replication_key = True
1683+
state_partitioning_keys: ClassVar[list[str]] = ["repo", "org"]
1684+
1685+
schema = th.PropertiesList(
1686+
# Parent keys
1687+
th.Property("org", th.StringType),
1688+
th.Property("repo", th.StringType),
1689+
th.Property("repo_id", th.IntegerType),
1690+
th.Property("comment_id", th.IntegerType),
1691+
# Reaction properties
1692+
th.Property("id", th.IntegerType),
1693+
th.Property("node_id", th.StringType),
1694+
th.Property("user", user_object),
1695+
th.Property("content", th.StringType),
1696+
th.Property("created_at", th.DateTimeType),
1697+
).to_dict()
1698+
1699+
16761700
class ContributorsStream(GitHubRestStream):
16771701
"""Defines 'Contributors' stream. Fetching User & Bot contributors."""
16781702

tap_github/streams.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
ReadmeStream,
4949
ReleasesStream,
5050
RepositoryStream,
51+
ReviewCommentReactionsStream,
5152
ReviewCommentsStream,
5253
ReviewsStream,
5354
StargazersGraphqlStream,
@@ -116,6 +117,7 @@ def __init__(self, valid_queries: set[str], streams: list[type[Stream]]) -> None
116117
ReleasesStream,
117118
ExtraMetricsStream,
118119
RepositoryStream,
120+
ReviewCommentReactionsStream,
119121
ReviewCommentsStream,
120122
ReviewsStream,
121123
StargazersGraphqlStream,

0 commit comments

Comments
 (0)