Validate user/repo field before linkStacktrace call

Also puts the submit code into an own function.