You've already forked goreleaser
mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-07-05 00:59:04 +02:00
refactor: Changed Client.CreateFile to be more generic
The GitHub implementation of CreateFile implicitly uses HomeBrew data. Added parameters for CommitAuthor and Repo so the call site can specify these parameters based on the context.
This commit is contained in:
committed by
Carlos Alexandro Becker
parent
28dc083b4a
commit
d7107803a3
@ -7,6 +7,7 @@ import (
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/google/go-github/github"
|
||||
"github.com/goreleaser/goreleaser/config"
|
||||
"github.com/goreleaser/goreleaser/context"
|
||||
"golang.org/x/oauth2"
|
||||
)
|
||||
@ -39,6 +40,8 @@ func NewGitHub(ctx *context.Context) (Client, error) {
|
||||
|
||||
func (c *githubClient) CreateFile(
|
||||
ctx *context.Context,
|
||||
commitAuthor config.CommitAuthor,
|
||||
repo config.Repo,
|
||||
content bytes.Buffer,
|
||||
path string,
|
||||
) (err error) {
|
||||
|
Reference in New Issue
Block a user