Factored github client creation into separate middleware