From dc309b65e66e5a88355c546e81540280d7c7b4ab Mon Sep 17 00:00:00 2001 From: Dylan Sprayberry <28106103+dsprayberry@users.noreply.github.com> Date: Tue, 12 Sep 2023 13:36:56 -0400 Subject: [PATCH] TDL-239782 Remove `files` and `stats` fields from commit-related schemas (#198) * Remove files and stats fields from commit-related schemas / tests * Changelog / version bump --- CHANGELOG.md | 5 +++ setup.py | 2 +- tap_github/schemas/commits.json | 46 ------------------------- tap_github/schemas/pr_commits.json | 54 +----------------------------- tests/test_github_all_fields.py | 6 ---- 5 files changed, 7 insertions(+), 106 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ba99194d..e3b3e962 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +# 2.0.6 + * Remove `files` and `stats` fields from `commits` endpoint as they are not returned without fetching individual commmits [#198](https://github.com/singer-io/tap-github/pull/198) + * Remove `files` and `stats` fields from `pr-commits` endpoint as they are not documented and not returned + * Update tests accordingly + # 2.0.5 * Remove date-time format from the field discussion_url in releases schema [#196](https://github.com/singer-io/tap-github/pull/196) diff --git a/setup.py b/setup.py index 79890701..2271e6ea 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ from setuptools import setup, find_packages setup(name='tap-github', - version='2.0.5', + version='2.0.6', description='Singer.io tap for extracting data from the GitHub API', author='Stitch', url='http://singer.io', diff --git a/tap_github/schemas/commits.json b/tap_github/schemas/commits.json index cf873448..00f0d2c8 100644 --- a/tap_github/schemas/commits.json +++ b/tap_github/schemas/commits.json @@ -44,38 +44,6 @@ } } }, - "files": { - "type": ["null", "array"], - "items": { - "type": ["null", "object"], - "properties": { - "filename": { - "type": ["null", "string"] - }, - "additions": { - "type": ["null", "number"] - }, - "deletions": { - "type": ["null", "number"] - }, - "changes": { - "type": ["null", "number"] - }, - "status": { - "type": ["null", "string"] - }, - "raw_url": { - "type": ["null", "string"] - }, - "blob_url": { - "type": ["null", "string"] - }, - "patch": { - "type": ["null", "string"] - } - } - } - }, "html_url": { "type": ["null", "string"] }, @@ -258,20 +226,6 @@ }, "author": { "$ref": "shared/user.json#/" - }, - "stats": { - "type": ["null", "object"], - "properties": { - "additions": { - "type": ["null", "integer"] - }, - "deletions": { - "type": ["null", "integer"] - }, - "total": { - "type": ["null", "integer"] - } - } } }, "additionalProperties": false diff --git a/tap_github/schemas/pr_commits.json b/tap_github/schemas/pr_commits.json index f4fa2f82..1108cfb3 100644 --- a/tap_github/schemas/pr_commits.json +++ b/tap_github/schemas/pr_commits.json @@ -35,44 +35,6 @@ } } }, - "files": { - "type": ["null","array"], - "items": { - "type": ["null","object"], - "properties": { - "filename": { - "type": ["null","string"] - }, - "additions": { - "type": ["null","number"] - }, - "deletions": { - "type": ["null","number"] - }, - "changes": { - "type": ["null","number"] - }, - "status": { - "type": ["null","string"] - }, - "raw_url": { - "type": ["null","string"] - }, - "blob_url": { - "type": ["null","string"] - }, - "contents_url": { - "type": ["null","string"] - }, - "sha": { - "type": ["null","string"] - }, - "patch": { - "type": ["null","string"] - } - } - } - }, "html_url": { "type": ["null", "string"], "description": "The HTML URL to the commit" @@ -301,23 +263,9 @@ "author": { "$ref": "shared/user.json#/" }, - "stats": { - "type": ["null", "object"], - "properties": { - "additions": { - "type": ["null", "integer"] - }, - "deletions": { - "type": ["null", "integer"] - }, - "total": { - "type": ["null", "integer"] - } - } - }, "updated_at": { "type": ["null", "string"], "format": "date-time" } } -} \ No newline at end of file +} diff --git a/tests/test_github_all_fields.py b/tests/test_github_all_fields.py index 305a9151..1fbb722e 100644 --- a/tests/test_github_all_fields.py +++ b/tests/test_github_all_fields.py @@ -20,15 +20,9 @@ 'project_id' }, 'commits': { - 'files', 'pr_id', 'id', 'pr_number', - 'stats', - }, - 'pr_commits': { - 'files', - 'stats' }, 'review_comments': { 'assignees',