Difference between original_commit_id and commit_id of a review comment?

What’s the difference between original_commit_id and commit_id of a review comment?

When would these be different? Documentation is not very helpful in explaining attributes.

originalCommit: Identifies the original commit associated with the comment.

commit: Identifies the commit associated with the comment.

Hi @amit1rrr.,

Thanks for reaching out! If there is a change to the PR: if a subsequent commit modifies the line you specify as the positionoriginal_commit_idshould refer to the previous commit id before the last change. I hope this helps!

1 Like

In the following PR, original_commit_id of one of the review comment is not even present in the list of PR commits. How can the commits disappear? Any way to fetch state of a file when that comment was made?

E.g. 

PR: https://github.com/Microsoft/Recommenders/pull/681/

Review comment: https://github.com/Microsoft/Recommenders/pull/681/#discussion_r269028725

This above review comment has original_commit_id as 168eea741e804980efe94e173088850966481d5b but this commit is not even present in the list of PR commits here

Any ideas why would this be happening?