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

fix: return repositories without https prefix #11

Merged
merged 1 commit into from
May 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,
}
}