Skip to content

API: Add comments to changes (diff) of merge requests

What does this MR do?

Adds the possibility to add comments to the changes (diff) of merge requests through the API.

Are there points in the code the reviewer needs to double check?

My new spec tests are failing, don't know why. Maybe someone could give me a hint, I'm not that familiar with ruby.

  1. API::API POST /projects/:id/merge_requests/:merge_request_id/changes/comments authorized user GET should return comment
    Failure/Error: @raw.send(m, *args, &block)

    NoMethodError: undefined method `parents' for nil:NilClass

    ./app/models/commit.rb:205:in `method_missing'

    ./spec/requests/api/merge_requests_spec.rb:226:in `block (4 levels) in <top (required)>'

Why was this MR needed?

Our company wanted to have something comparable to HoundCI for our .NET development environment.

What are the relevant issue numbers?

#16550 (closed)

Screenshots (if relevant)

Merge request reports