act
act copied to clipboard
Code Cleanup : Regex for github.com and GHE can be unified to a single one
Currently, the findGitSlug method relies on two separate regexes for identifying a github.com or a GHE domain from a given repo URL.
- Although
findGitSlugreturns either"CodeCommit","GitHub"or"GitHubEnterprise"- this return value is never used elsewhere. - The code does not differentiate between
github.comand GHE domain elsewhere, so a single regex is sufficient to extract both :^https?://([^/]+)/(.+)/(.+?)(?:\.git)?$
If acceptable, I would be happy to make this fix and modify the tests.