Skip to content

Create LegacyDiffNote when GitHub suggestion is outdated

What does this MR do and why?

Falls back to the LegacyDiffNote when a suggestion is outdated as per #352277 (comment 848458175)

Since outdated suggestions don't have the info of where the suggestion can be applied anymore, they are invalid to create.

Outdated suggestions mean that the change where the suggestion is being applied is no longer in the diff for the MR. Code change removed via a new commit.

Since we don't know all of the conditions for sure on why a suggestion can fail with DiffNote, we'll merely check for persistence and throw an exception that will be logged.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #352277 (closed)

Edited by Doug Stull

Merge request reports