Unify summarize comments checks and improve errors
What does this MR do and why?
These changes
- Use a policy to check for the summarize_notes feature so it can be re-used for the backend and frontend
- Shows errors coming from the API
Screenshots or screen recordings
Screen_Recording_2023-04-18_at_13.45.03
How to set up and validate locally
-
Enable feature flags
Feature.enable(:openai_experimentation) Feature.enable(:summarize_notes) Feature.enable(:summarize_comments)
-
Set an
openai_api_key
in yourApplicationSettings
. -
Visit an issue, and scroll down to write a comment. Note the new AI Actions dropdown in the markdown editor toolbar. On a private project or a confidential issue on a public project, this is not visible.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Nicolas Dular