Test service settings in no commit project cause 500 TypeError
I made a new project then edit Slack service settings, and I saved those, push "Test settings" button. (This button had "btn disabled" css class, but I can push this in my browser.)
Then this TypeError was raised.
Started GET "/some-group/foo_prj/services/slack/test" for 123.45.67.89 at 2016-03-14 18:42:47 +0900
Completed 200 OK in 105ms (Views: 0.8ms | ActiveRecord: 10.9ms)
Processing by Projects::ServicesController#test as HTML
Parameters: {"namespace_id"=>"some-group", "project_id"=>"foo_prj", "id"=>"slack"}
Completed 500 Internal Server Error in 104ms (ActiveRecord: 9.9ms)
TypeError (wrong argument type nil (expected String)):
app/models/repository.rb:94:in `commits'
lib/gitlab/push_data_builder.rb:68:in `build_sample'
app/controllers/projects/services_controller.rb:48:in `test'
After I create a commit and pushed to this project, "Test settings" button works as I expected. So this error was raised in empty project only.
Edited by 🤖 GitLab Bot 🤖