Open
Description
Schema Inaccuracy
When checking the diff between 2 commits using diff-entry, if any commit contains a file with permission changes, the endpoint return None
as files[].sha
. which is unexpected according to the schema.
While None makes sense, the schema should be reflected to handle this scenario.
Example
{"url": "str",
"html_url": "str",
"permalink_url": "str",
"diff_url": "str",
"patch_url": "str",
"base_commit": { . . . base commit details . . .},
"merge_base_commit": {. . . merge base details },
"status": "ahead",
"ahead_by": 1,
"behind_by": 0,
"total_commits": 1,
"commits": [. . . commit details ],
"files": [
{
"sha": null, <--- Problem, schema mentions str
"filename": "test_file.py",
"status": "modified",
"additions": 0, <---- literal 0
"deletions": 0, <---- literal 0
"changes": 0, <---- literal 0
"blob_url": "str",
"raw_url": "str",
"contents_url": "str",
"patch": "str"
}
]
}
Reproduction Steps
- Create a commit containing only permission changes, nothing else.
- Try to get the commit using the diff-entry endpoint.
- Check that the files endpoint will have sha: None.