HTTP 500 when using the CI Lint route on a newly created project
<!---
Please read this!
Before opening a new issue, make sure to search for keywords in the issues
filtered by the "regression" or "bug" label:
- https://gitlab.com/gitlab-org/gitlab/issues?label_name%5B%5D=regression
- https://gitlab.com/gitlab-org/gitlab/issues?label_name%5B%5D=bug
and verify the issue you're about to submit isn't a duplicate.
--->
### Summary
Submitting a Gitlab-CI yaml to the CI Lint route on a newly created project generates an HTTP 500 rather than successfully linting the pipeline.
### Steps to reproduce
1) Create an empty project
2) Visit CI Lint page for the project ( https://gitlab.com/aboyett/crash-gitlab-ci-linter/-/ci/lint in the case of the example project)
3) Enter a simple Gitlab-CI yaml defintion like the following:
```
build:
script:
- echo "This pipeline will crash the Gitlab-CI linter on a new project"
```
4) Click `Validate`
### Example Project
https://gitlab.com/aboyett/crash-gitlab-ci-linter
### What is the current *bug* behavior?
Gitlab returns a HTTP 500 Internal Server Error
### What is the expected *correct* behavior?
Gitlab returns a HTTP 200 and renders the linter output for the pipeline.
### Relevant logs and/or screenshots
Note: several bits of sensitive info (auth tokens) have been replaced with `*ELIDED*`
HTTP POST issued to https://gitlab.com/aboyett/crash-gitlab-ci-linter/-/ci/lint
HTTP request body:
```
utf8=%E2%9C%93&authenticity_token=*ELIDED*&content=build%3A%0D%0A++script%3A%0D%0A++-+echo+%22This+pipeline+will+crash+the+Gitlab-CI+linter+on+a+new+project%22
```
HTTP request headers:
```
POST /aboyett/crash-gitlab-ci-linter/-/ci/lint HTTP/1.1
Host: gitlab.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:68.0) Gecko/20100101 Firefox/68.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br
Referer: https://gitlab.com/aboyett/crash-gitlab-ci-linter/-/ci/lint
Content-Type: application/x-www-form-urlencoded
Content-Length: 245
Origin: https://gitlab.com
DNT: 1
Connection: keep-alive
Cookie: *ELIDED*
Upgrade-Insecure-Requests: 1
```
HTTP response headers:
```
HTTP/1.1 500 Internal Server Error
Server: nginx
Date: Sun, 16 Feb 2020 09:57:26 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 2926
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Expires: Fri, 01 Jan 1990 00:00:00 GMT
Pragma: no-cache
X-Request-Id: Xq7TRlBV568
X-Runtime: 0.206090
GitLab-LB: fe-20-lb-gprd
GitLab-SV: web-16-sv-gprd
```
### Output of checks
This bug happens on GitLab.com
#### Results of GitLab environment info
This bug occurs on Gitlab.com. It is running GitLab Enterprise Edition 12.7.0-pre 3598338b27b at the time of this report.
#### Results of GitLab application Check
N/A
### Possible fixes
N/A
issue