Closed bfueldner closed 4 years ago
I see, thanks for spotting this, however I would just make the repo_name
group greedy (i.e. add an ? after the +) and not introduce an extra sub, see here for an example:
https://regex101.com/r/EWzUKJ/2/
@pampersrocker Thanks for the hint! I did not know the trick how to take the greediness out of this rule. I agree with you simpler solution.
I've squashed both commits and clarified the commit message.
Thank you for the contribution!
Current
ssh_url_match
would always include trailing '.git
' from SSH URL in match, which leads to an invalid repository name on REST access. To avoid this, I propose stripping the trailing '.git
' away from ssh_url withre.sub()
.