Skip to content

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

Closed
@SeanKilleen

Description

@SeanKilleen

The below regex does not allow capital letters:

const parts = key.match(/\bgithub\.com[:/]([_.a-z0-9-]+\/[_.a-z0-9-]+)/);

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:

  • Adjust the regex to allow capital letters
  • Call ToLower() on the key prior to processing it in the regex
  • Be explicit about keys not matching and ensuring that we publish a message stating why.

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions