Loading
Add state and project references to Orbit grep results
What does this MR do and why?
Orbit grep returned only a database id for work items, merge requests, and notes, so a client had to look each result up again to say where it lives or whether it's still open. The Orbit CLI shows GitLab hits inline in orbit grep (issue:12 opened ...), and our eval GitLab has been running this change as a patch.
Results now carry:
statefor work items, merge requests, and milestones.iidandproject_pathin thereferenceof work items and merge requests.project_pathin thereferenceof files and commits.- For notes, the
noteabletoken of the merge request or work item they belong to, and anoteable_referencesuch asgroup/project!42. Commit notes get only thenoteable_reference.
The fields are additive, so the grep contract version moves from 1.0.0 to 1.1.0. The API docs describe the new reference shapes.
How to validate
bin/rspec ee/spec/services/analytics/orbit/grep_service_spec.rb ee/spec/requests/api/orbit/data_grep_spec.rbEdited by Aaron Algutifan