Reputation: 2225
Okay, I'm porting some code that used the GitHub API v2 to v3 and they've changed the way they list files in commits. There's now an array of files, each of which has a status, as opposed to arrays of 'added', 'modified', and 'removed' files like in v2.
Easy, but their examples only show statuses of 'added' & 'modified' and not removed/deleted. I'd assume that it'd be 'removed' like v2, but 'deleted' would be the correct git terminology so I don't want to just assume. The repo I am testing on happens to not have any deleted files, so I have no examples at the moment.
So, which is it 'removed' or 'deleted' in GitHub API v3?
Upvotes: 3
Views: 984
Reputation: 1382
The official status is listed in the JSON Schema in the Commits API
{
"status": {
"type": "string",
"enum": [
"added",
"removed",
"modified",
"renamed",
"copied",
"changed",
"unchanged"
],
"examples": [
"added"
]
}
}
Tip: the schema is inside the tab next to the examples
Upvotes: 2
Reputation: 2225
It is 'removed'. I finally found a commit in one of my repositories where I actually deleted a file and confirmed.
Upvotes: 1