Skip to content

Could not parse GitHub App user which include brackets #604

@henri-hulski

Description

@henri-hulski

I'm using GitHub Actions for release and deploy. The git user is an organization GitHub App which has all necessary permissions.
The problem is that GitHub App users have square brackets in there user name and email.
So when running

gh-pages -d build -b master -r https://github.com/myorg/myrepo.github.io.git -u "mygithubapp[bot] <123456789+mygithubapp[bot]@users.noreply.github.com>"

I get the following error.

Error: Could not parse name and email from user option "mygithubapp[bot] <123456789+mygithubapp[bot]@users.noreply.github.com>" (format should be "Your Name <[email protected]>")

It seems that the email parser you are using (email-addresses) doesn't accept brackets neither in the username (only if quoted) nor in the email (I think here is no workaround). See also jackbearheart/email-addresses#52.
Any way to fix that? Maybe just using a custom regex?

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