refactor: move things to packages

This commit is contained in:
Julian Tölle 2024-08-30 22:47:50 +02:00
parent 44184a77f9
commit 11063b2d2c
32 changed files with 923 additions and 892 deletions

View file

@ -0,0 +1,31 @@
package gitlab
import (
"fmt"
"github.com/apricote/releaser-pleaser/internal/forge"
)
// var _ forge.Forge = &GitLab{}
type GitLab struct {
options forge.Options
}
func (g *GitLab) autodiscover() {
// Read settings from GitLab-CI env vars
}
func New(options forge.Options) *GitLab {
gl := &GitLab{
options: options,
}
gl.autodiscover()
return gl
}
func (g *GitLab) RepoURL() string {
return fmt.Sprintf("https://gitlab.com/%s", g.options.Repository)
}