Fix error when trying to access nil commit author (via GraphQL)

What does this MR do and why?

Fixes a bug caused by commits with nil emails

Related to #337243 (closed)

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Before After
image image

How to set up and validate locally

  1. Push a commit with a nil e-mail: git commit --author "Snail Mail <>"
  2. Run the following GraphQL query:
    query {
      mergeRequest(id: "gid://gitlab/MergeRequest/xxx") {
        commits {
          nodes {
            committerEmail
            author {
              id
              username
            }
          }
        }
      }
    }
Edited by Lee Tickett

Merge request reports

Loading