fix when default_branch is nil in database, gitlab-ci integration doesn't work because the parameter is "ref"=>"refs/heads/"

王权利请求将github/fork/danmaispace/master合并到master

Created by: danmaispace

the gitlab-ci integration api require parameter "ref"=>"refs/heads/master", but for new project the default_branch default to null in database unless user save project settings, then the gitlab-ci api got parameter "ref"=>"refs/heads/" can not receives build from gitlab successful.

合并请求报告