Preserve a comment when its line moves#
Imagine iteration 1 adds a conditional to line 18. Iteration 2 moves the conditional while incorporating feedback. An external reviewer returns a late result for line 18 of iteration 1. If the adapter reads just the current file and its line number, the comment can land on a different statement.
Ask the adapter to show the iteration it analyzed and the source and target commits it got from Azure Repos. If the comment is still needed, check it on the new iteration before publishing a new location. Keep the original receipt available for the older revision. Azure Repos lists iterations with their source, target and common commits. Azure Repos pull request iterations API
If the branch policy requires an approval on a new iteration, inspect the host’s policy status and the identity of the last pusher.