Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add files to CommitsStream #1

Merged
merged 3 commits into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions tap_github/repository_streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

from tap_github.client import GitHubGraphqlStream, GitHubRestStream
from tap_github.schema_objects import (
files_object,
label_object,
milestone_object,
reactions_object,
Expand Down Expand Up @@ -1105,6 +1106,7 @@ def post_process(self, row: dict, context: Optional[Dict] = None) -> dict:
),
th.Property("author", user_object),
th.Property("committer", user_object),
th.Property("files", th.ArrayType(files_object)),
).to_dict()


Expand Down
14 changes: 14 additions & 0 deletions tap_github/schema_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,17 @@
th.Property("rocket", th.IntegerType),
th.Property("eyes", th.IntegerType),
)

files_object = th.ObjectType(
th.Property("sha", th.StringType),
th.Property("filename", th.StringType),
th.Property("status", th.StringType),
th.Property("additions", th.IntegerType),
th.Property("deletions", th.IntegerType),
th.Property("changes", th.IntegerType),
th.Property("blob_url", th.StringType),
th.Property("raw_url", th.StringType),
th.Property("contents_url", th.StringType),
th.Property("patch", th.StringType),
th.Property("previous_filename", th.StringType),
)