Skip to content

Repository name capturing from remote is wrong #65

Description

@fancywriter

I have repository in Gitlab called git@gitlab.com:org/group/subgroup/project.git.
When trying to use the plugin with releases configuration I am bad request from Sentry with similar message

{"refs":["Invalid repository names: subgroup / project"]}

Seems it's because of regular expression here

let repository = /[:/]([^/]+\/[^/]+?)(?:\.git)?$/i.exec(origin)?.[1];

I am not sure what was the motivation for such capturing group as ([^/]+\/[^/]+?), so me just putting (.+?) is enough and works... this expression allows only one / symbol, though it may be few of them in between. What I need is to extract full repository name like org/group/subgroup/project.

Is it a bug? Seems that putting repository name manually into serverless.yaml fixes it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions