Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Copilot Lvl 3
Message 1 of 3

Difference between original_commit_id and commit_id of a review comment?

Solved! Go to Solution.

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.
2 Replies
Solution
Community Manager
Message 2 of 3

Re: Difference between original_commit_id and commit_id of a review 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!

Mark helpful posts with Accept as Solution to help other users locate important info. Don't forget to give Kudos for great content!

Copilot Lvl 3
Message 3 of 3

Re: Difference between original_commit_id and commit_id of a review comment?

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?