How do I find out who resolved a PR comment?
Asked Answered
U

1

7

When I spot an issue during the code review for a pull request (PR) on Azure DevOps, I can leave a comment (actually, a new comment thread).

Resolution of all comments can be configured as a prerequisite for completing the PR. Thus, setting a comment (thread) to Resolved is not an insignificant action.

How can I find out who set a given comment thread to Resolved?


Some context: Once a PR has gathered some 50 or more comment threads, it gets cumbersome for reviewers to always sift through all comments anew on every review round. The only meaningful way to tell which comments are already resolved satisfactorily that Azure DevOps appears to supply is the distinction between active and closed comments. But sometimes, developers set comments to "Resolved" themselves instead of leaving this to the commenter, at which point it gets quite confusing to find out whether the solution for a closed comment was actually checked by the reviewer already.

Unific answered 27/9, 2023 at 10:7 Comment(0)
U
2

I dislike my own answer, but AFAIK it is the answer to this question.

Currently it's not possible to determine who resolved a PR comment.

After digging through the API I can see comments have a "publishedDate" and also a "lastUpdatedDate", as well as a "status", which for example has a possible state of "fixed". However, I cannot find anywhere that says who did it. Furthermore, there is a MS Developer Community thread about this which unfortunately is closed and can no longer be voted on. Perhaps a new one can be started to see if it gets more traction this time.

Side Note: Perhaps a takeaway of this is that one should only use "Approve with suggestions" if they're OK with the suggestions being ignored. If that wouldn't be acceptable, then one should block the PR.

Unplaced answered 7/11, 2023 at 6:27 Comment(5)
Accepted, but concerning the side note: We don't usually "Approve with suggestions", or anyhow at all, as long as there are any open comment threads. What happens is rather that we see that PR X has no open comment threads left. We can now either take this at face value and approve because of that fact, or we start going through the cumbersome process of looking at all the closed comment threads again and try to figure out whether all of them where closed by the reviewer rather than by a developer.Unific
@O.R.Mapper I think ultimately, even if we could determine who resolved the comments, that would only help for auditing purposes after the fact, if you disagreed with the decision to resolve it and wanted to assign blame. If not resolving the comment is important enough to prevent the PR from being completed in the first place, perhaps it should be blocked another way besides the comment. One thing that may help in your case is to ask everyone who resolves a thread to put in a comment with the final state, e.g. "Done." or "Not doing this." etc.Unplaced
"if you disagreed with the decision to resolve it and wanted to assign blame" - that's fine, and it will happen at most once or twice per developer. If we cannot determine who was doing it, they will simply continue doing so, be it out of negligence or whatever other reasons there might be. "perhaps it should be blocked another way besides the comment" - technically, it is blocked, by the absence of an approval vote. But this vote can easily be given by mistake, because the approver assumes 'All comments are closed, so everything is fine now.' ...Unific
... "ask everyone who resolves a thread to put in a comment with the final state" - sounds a bit cumbersome, but would indeed work, as the requirement to do something would be with the reviewer who closes the thread legitimately. Thank you!Unific
Vote for this one: developercommunity.visualstudio.com/t/…Decal

© 2022 - 2024 — McMap. All rights reserved.