generating github enterprise API urls from env var

currently the GITHUB_ENTERPRISE_URL is used inconsistently as either the base url or the API url.  these changes standardize on the base url form.