Alternative Detection Method for GitHub Enterprise Version
See original GitHub issueSupport for GitHub Enterprise was recently incorporated into Lerna starting with version 3.11.0.
This feature relies on the developer to set the GHE_VERSION
environment variable to be one of the four versions of GitHub Enterprise supported by octokit
.
As an alternative, can Lerna query, and then extract, the version number from the X-GitHub-Enterprise-Version
header returned by any request to the GitHub API?
Current Behavior
Current behavior relies on the user of Lerna to set the version number in an environment variable.
Relying on a hard-coded environment variable may burden developers with the responsibility to be vigilant of any upgrades to their company’s GitHub Enterprise deployment, and to update the appropriate environment variable in all environments that execute Lerna.
Possible Solution
Extract the version number of the GitHub Enterprise API from a header value returned in response to any request to a GitHub Enterprise API endpoint.
cc @milesj for your thoughts on this idea.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
Seems straightforward to me. PRs gladly accepted.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.