Skip to content

Change DCR AiMessageContext resource to MR object for non-diff notes

What does this MR do and why?

Currently, we're seeing the following error in non-diff note DCR chat threads:

"I'm sorry, I can't generate a response. You might want to try again. You could also be getting this error because the items you're asking about either don't exist, you don't have access to them, or your session has expired."

An explanation for why this is probably happening is in #510279 (comment 2332935508).

In this MR, we set the resource as the noteable so that when MergeRequestReader uses the identifier type "current", it can use the MR object, not the note object. For now, this change is isolated to non-diff notes only.

References

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

How to set up and validate locally

  1. Before checking out this branch, you can reproduce the error locally by following the same steps in !180113 (merged) with a more MR-specific question like What is this MR's title?.
  2. Then check out this branch, and repeat the question. The error should not appear.
Edited by Leaminn Ma

Merge request reports

Loading