It depends on the power output of the boiler and the distance from the supply main. For any reasonable domestic service 22mm will be adequate and I don't think any gas company is actually fitting less than this anyway.
The inlet size on the boiler will determin the end size.But but check.A any way 22 to within 1/2 a metre of the boiler then 15 if 15 is the end connection size.