Skip to content

Author CLI arg does not work #57

@nekitbr

Description

@nekitbr

Using CLI with repo mode, the Author argument is not correctly handled if given with the same pattern as in the docs ("[email protected]").

In method extract_name_email, inside commons.py, it tries to get the name and email from the author, but the regex expects something like "name <[email protected]>", not "[email protected]", so it fails and returns None.

Because of that, all commits will be imported, regardless of author.

I'd be more than happy to contribute to this, but I don't know how to properly write python, and I also don't know how to write tests for it.

Suggested solution:

Instead of expecting name and email to return an Author object, expect only the email, maybe we can even skip the extract_name_email method altogether.
Reason being is: sometimes when we need to redo our git config, we may change the author name by mistake, but our emails will NEVER change. This can happen in situations where the employee needed to change its laptop for some reason, and forgot how he configured his signature name in git config, leading to multiple commits with the same email but different name (Johnny P. Dallas vs Johnny Dallas; José vs Jose).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions