You've already forked goreleaser
mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-07-05 00:59:04 +02:00
feat: support custom tokens in Homebrew & Scoop (#1650)
This commit is contained in:
@ -25,9 +25,9 @@ type githubClient struct {
|
||||
}
|
||||
|
||||
// NewGitHub returns a github client implementation.
|
||||
func NewGitHub(ctx *context.Context) (Client, error) {
|
||||
func NewGitHub(ctx *context.Context, token string) (Client, error) {
|
||||
ts := oauth2.StaticTokenSource(
|
||||
&oauth2.Token{AccessToken: ctx.Token},
|
||||
&oauth2.Token{AccessToken: token},
|
||||
)
|
||||
httpClient := oauth2.NewClient(ctx, ts)
|
||||
base := httpClient.Transport.(*oauth2.Transport).Base
|
||||
@ -59,7 +59,7 @@ func NewGitHub(ctx *context.Context) (Client, error) {
|
||||
func (c *githubClient) CreateFile(
|
||||
ctx *context.Context,
|
||||
commitAuthor config.CommitAuthor,
|
||||
repo config.Repo,
|
||||
repo Repo,
|
||||
content []byte,
|
||||
path,
|
||||
message string,
|
||||
|
Reference in New Issue
Block a user