1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-07-01 00:54:57 +02:00

feat: support custom tokens in Homebrew & Scoop (#1650)

This commit is contained in:
Radek Simko
2020-07-06 21:12:41 +01:00
committed by GitHub
parent 0d4f605388
commit ab8bb7f2f3
18 changed files with 258 additions and 75 deletions

View File

@ -26,8 +26,7 @@ type gitlabClient struct {
}
// NewGitLab returns a gitlab client implementation.
func NewGitLab(ctx *context.Context) (Client, error) {
token := ctx.Token
func NewGitLab(ctx *context.Context, token string) (Client, error) {
transport := &http.Transport{
TLSClientConfig: &tls.Config{
// nolint: gosec
@ -54,7 +53,7 @@ func NewGitLab(ctx *context.Context) (Client, error) {
func (c *gitlabClient) CreateFile(
ctx *context.Context,
commitAuthor config.CommitAuthor,
repo config.Repo,
repo Repo,
content []byte, // the content of the formula.rb
path, // the path to the formula.rb
message string, // the commit msg