Skip to content

Allow suggesting single line changes in diffs

Oswaldo Ferreira requested to merge osw-suggest-diff-line-change into master

What does this MR do?

Allow suggesting single line changes in MR diffs.

Screen_Shot_2018-11-27_at_21.42.44

  • Creates a suggestions DB table
  • Introduces a /api/v4/suggestions/:id/apply API
  • Allows users using ```suggestion syntax to suggest changes in MRs
  • These changes are presented as a diff table in the created note
  • Users with authorization can click Apply suggestion and this will add commit to the source branch
  • Outdated suggestions (the commented line changes) are not appliable

Feature flag

  • If disabled; the syntax will stop generating the suggestion table
  • If disabled; existing suggestion tables will be presented (they're persisted in note_html already)
  • If disabled; users won't be able to apply the already existing suggestions
  • If disabled; the "Insert suggestion" button in the toolbar will not be presented

Important points

What are the relevant issue numbers?

https://gitlab.com/gitlab-org/gitlab-ce/issues/18008

Does this MR meet the acceptance criteria?

Edited by Oswaldo Ferreira

Merge request reports