Publishing of a changeset does not close a merge request when it has been rebased
The following :
- [draft] (topic1) commit for topic1
- [public] 1st commit
Is pushed to heptapod, the merge request for topic1
is created a reviewed.
When pushing the following :
- [public] commit for topic1
- [public] new commit onto which topic1 has been rebased
- [public] 1st commit
The merge request does not close and has the warning sign "Cannot be merged automatically" in the merge request list. When going to that merge request page, we get a good old 500 error page.
==> /var/log/gitlab/gitlab-rails/production.log <==
ActionView::Template::Error (wrong argument type nil (expected String)):
20: -# haml-lint:disable InlineJavaScript
21: :javascript
22: window.gl = window.gl || {};
23: window.gl.mrWidgetData = #{serialize_issuable(@merge_request)}
24:
25: #js-vue-mr-widget.mr-widget
26:
lib/gitlab/git/repository.rb:464:in `rev_parse_target'
lib/gitlab/git/repository.rb:458:in `sha_from_ref'
lib/gitlab/git/repository.rb:489:in `hgsha_from_ref'
app/models/repository.rb:462:in `method_missing'
app/models/merge_request_diff.rb:151:in `diff_refs'
app/models/merge_request.rb:362:in `diff_refs'
app/models/merge_request.rb:934:in `has_complete_diff_refs?'
app/services/merge_requests/conflicts/list_service.rb:17:in `can_be_resolved_in_ui?'
app/presenters/merge_request_presenter.rb:74:in `conflict_resolution_path'
app/serializers/merge_request_entity.rb:115:in `block in <class:MergeRequestEntity>'
app/serializers/base_serializer.rb:11:in `represent'
app/serializers/merge_request_serializer.rb:7:in `represent'
app/helpers/issuables_helper.rb:42:in `serialize_issuable'
app/views/projects/merge_requests/show.html.haml:23:in `_app_views_projects_merge_requests_show_html_haml___3793065632001988903_69941037407500'
app/controllers/projects/merge_requests_controller.rb:79:in `block (3 levels) in show'
lib/gitlab/gitaly_client.rb:193:in `allow_n_plus_1_calls'
app/controllers/projects/merge_requests_controller.rb:78:in `block (2 levels) in show'
app/controllers/projects/merge_requests_controller.rb:62:in `show'
lib/gitlab/i18n.rb:47:in `with_locale'
lib/gitlab/i18n.rb:53:in `with_user_locale'
app/controllers/application_controller.rb:346:in `set_locale'
lib/gitlab/middleware/multipart.rb:93:in `call'
lib/gitlab/request_profiler/middleware.rb:14:in `call'
lib/gitlab/middleware/go.rb:17:in `call'
lib/gitlab/etag_caching/middleware.rb:11:in `call'
lib/gitlab/middleware/read_only.rb:30:in `call'
lib/gitlab/request_context.rb:18:in `call'
lib/gitlab/metrics/requests_rack_middleware.rb:27:in `call'