NoMethodError: undefined method `head_commit_sha' for nil:NilClass

https://sentry.gitlab.net/gitlab/gitlabcom/issues/971903/

NoMethodError: undefined method `head_commit_sha' for nil:NilClass
  merge_request.rb:550:in `diff_head_sha'
    merge_request_diff.head_commit_sha
  gitlab/metrics/instrumentation.rb:161:in `block in diff_head_sha'
    .measure { super }
  gitlab/metrics/method_call.rb:36:in `measure'
    retval = yield
  gitlab/metrics/instrumentation.rb:161:in `diff_head_sha'
    .measure { super }
  merge_request.rb:251:in `actual_head_pipeline'
    head_pipeline&.matches_sha_or_source_sha?(diff_head_sha) ? head_pipeline : nil
...
(69 additional frame(s) were not displayed)

undefined method `head_commit_sha' for nil:NilClass
Assignee Loading
Time tracking Loading