Reputation: 43491
https://api.github.com/repos/linnovate/mean/commits/69ccd09e527894d8e0e992dceb6cb563dd759049
I thought if a file was modified
, it would say modified
. So what does changed
mean? I tried googling, but it's a very... common term.
{
sha: null,
filename: "config/config.js",
status: "changed",
additions: 0,
deletions: 0,
changes: 0,
blob_url: "https://github.com/linnovate/mean/blob/69ccd09e527894d8e0e992dceb6cb563dd759049/config/config.js",
raw_url: "https://github.com/linnovate/mean/raw/69ccd09e527894d8e0e992dceb6cb563dd759049/config/config.js",
contents_url: "https://api.github.com/repos/linnovate/mean/contents/config/config.js?ref=69ccd09e527894d8e0e992dceb6cb563dd759049"
}
Upvotes: 1
Views: 78
Reputation: 308
TL;DR The status is 'changed' if "the mode of the file was changed or there are unknown changes because the diff was truncated"
I recently contacted GitHub's support about the documentation for the status field, this was their reply. The field was causing problems for our json parsing on a pull request with 300+ files changed.
Thanks for reaching out. You're right -- the possible values are not documented. I'll mention this to the team so that they can consider updating the documentation.
For now, here are the possible values:
'added' - file was added
'removed' - file was removed
'renamed' - file was renamed
'modified' - the content of the file was modified
'changed' - the mode of the file was changed or there are unknown changes because the diff was truncated (I believe this might happen for very large diffs)
If you notice any other values -- let me know and I'll do some more digging.
Hope this helps.
Upvotes: 0