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:

  • state for work items, merge requests, and milestones.
  • iid and project_path in the reference of work items and merge requests.
  • project_path in the reference of files and commits.
  • For notes, the noteable token of the merge request or work item they belong to, and a noteable_reference such as group/project!42. Commit notes get only the noteable_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.rb
Edited by Aaron Algutifan

Merge request reports

Loading
Loading