Skip to content

Add documentation for project services and display it

Created by: gonzoyumo

his PR adds support for project services documentation. It allows service owners to provide a short documentation that is displayed on the service page to help Gitlab user setting up the service.

It's done the following way:

  • a markdown file must be placed in doc/services folder and its name must match Service#to_param value
  • a new class called Gitlab::ServiceDoc is responsible for loading the documentations files and serves their content on demand
  • a new initializer loads the documentation (read the files) only once when app is loaded
  • a new instance method called Service#doc provide access to this documentation from the Service instance
  • the service's _form partial has been modified to display the documentation (using markdown)

Specs and spinach features are provided and I've added documentation for the Gemnasium service that I maintain.

Here is a screenshot of the Gemnasium service page with the documentation section: olivier_gonzalez___vip___gitlab

Merge request reports