Skip to content

Commit

Permalink
fix: Trim out .git suffix to remove permission denied in Gitlab
Browse files Browse the repository at this point in the history
  • Loading branch information
keskad committed Nov 3, 2023
1 parent 4ae824f commit 4d7c860
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkgs/contract/pipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ type JobContext struct {

func NewSCMContext(repoHttpsUrl string) (JobContext, error) {
scm := JobContext{}
scm.RepoHttpsUrl = strings.TrimSuffix(repoHttpsUrl, ".git")
scm.RepoHttpsUrl = repoHttpsUrl
scm.OrganizationName = ""
scm.RepositoryName = ""

Expand All @@ -260,7 +260,7 @@ func NewSCMContext(repoHttpsUrl string) (JobContext, error) {
}

scm.OrganizationName = nameSplit[1]
scm.RepositoryName = nameSplit[2]
scm.RepositoryName = strings.TrimSuffix(repoHttpsUrl, nameSplit[2])

return scm, nil
}
Expand Down

0 comments on commit 4d7c860

Please sign in to comment.