Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Merge pull request #11 from jwillker/fix/repo-url
Browse files Browse the repository at this point in the history
fix: return repositories without https prefix
  • Loading branch information
jwillker committed May 24, 2022
2 parents 26e3dee + 83771d0 commit b62bc36
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## v0.2.1 - 2022-05-24

- fix: return repositorie without https

## v0.2.0 - 2022-05-22

- feat: generate all the sally config
Expand Down
10 changes: 8 additions & 2 deletions entity/package.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
package entity

import gitlab "github.com/xanzy/go-gitlab"
import (
"strings"

gitlab "github.com/xanzy/go-gitlab"
)

type Package struct {
Name string
Repo string
}

func NewPackage(gitlabProject *gitlab.Project) Package {
repo := strings.TrimPrefix(gitlabProject.HTTPURLToRepo, "https://")

return Package{
Name: gitlabProject.Path,
Repo: gitlabProject.HTTPURLToRepo,
Repo: repo,
}
}

0 comments on commit b62bc36

Please sign in to comment.