refactor: move things to packages (#39)

This commit is contained in:
Julian Tölle 2024-08-31 15:23:21 +02:00 committed by GitHub
parent 44184a77f9
commit a0a064d387
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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)
}