Add endpoint to create an abuse report note
What does this MR do and why?
It adds and endpoint to create an abuse report note
- adds the mutation to add an abuse report note
- adjusts frontend to use the endpoint correctly
- behind abuse_report_notes FF
The newly created note is not dynamically added to the UI, follow-up issue: https://gitlab.com/gitlab-org/gitlab/-/issues/489808+
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
-
Enable the Feature flag
Feature.enable(:abuse_report_notes)
-
Visit admin area - abuse reports, eg.
http://gdk.test:3000/admin/abuse_reports/23
-
Add a comment, reload
-
Check your comment is there
-
You can also run the graphQL mutation:
mutation {
createAbuseReportNote(input: {
abuseReportId: "gid://gitlab/AbuseReport/23",
body: "test aaaaa bbbb"
}) {
note {
id
discussion {
id
notes {
nodes {
id
body
bodyHtml
createdAt
lastEditedAt
url
resolved
}
}
}
}
errors
}
}
Related to #458264
Edited by Jarka Košanová