webfactory / ssh-agent

GitHub Action to setup `ssh-agent` with a private key
MIT License
1.23k stars 256 forks source link

git URLs with capitalized letters (e.g. GitHub repos) not processed by the script #68

Closed SeanKilleen closed 3 years ago

SeanKilleen commented 3 years ago

The below regex does not allow capital letters: https://github.com/webfactory/ssh-agent/blob/4b6f4eb000f167422aa955c5a7e848a432931c6f/index.js#L53

This, combined with no console output, can leave the script only performing part of its functionality which may leave some users confused.

I see a few potential remedies here but I'm less familiar with the tool, so wanted to get some input.

It seems we could:

I'll submit PRs for all three options in case you have a preference for one or the other. Also, please let me know if I'm misunderstanding the problem here.

mpdude commented 3 years ago

That's a valid point :+1:, thanks for catching this!

I think the most straightforward way would be to use case-insensitive Regex matching with the /.../i flag. I'll commit a fix and credit you.

SeanKilleen commented 3 years ago

👍 Makes sense to me; much simpler. Thanks for considering and for the quick response!