mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-04-13 11:50:34 +02:00
update: Added some missing changes
I forgot these!
This commit is contained in:
parent
d7107803a3
commit
f8a7ac602e
@ -47,8 +47,8 @@ func (c *githubClient) CreateFile(
|
||||
) (err error) {
|
||||
options := &github.RepositoryContentFileOptions{
|
||||
Committer: &github.CommitAuthor{
|
||||
Name: github.String(ctx.Config.Brew.CommitAuthor.Name),
|
||||
Email: github.String(ctx.Config.Brew.CommitAuthor.Email),
|
||||
Name: github.String(commitAuthor.Name),
|
||||
Email: github.String(commitAuthor.Email),
|
||||
},
|
||||
Content: content.Bytes(),
|
||||
Message: github.String(
|
||||
@ -58,16 +58,16 @@ func (c *githubClient) CreateFile(
|
||||
|
||||
file, _, res, err := c.client.Repositories.GetContents(
|
||||
ctx,
|
||||
ctx.Config.Brew.GitHub.Owner,
|
||||
ctx.Config.Brew.GitHub.Name,
|
||||
repo.Owner,
|
||||
repo.Name,
|
||||
path,
|
||||
&github.RepositoryContentGetOptions{},
|
||||
)
|
||||
if err != nil && res.StatusCode == 404 {
|
||||
_, _, err = c.client.Repositories.CreateFile(
|
||||
ctx,
|
||||
ctx.Config.Brew.GitHub.Owner,
|
||||
ctx.Config.Brew.GitHub.Name,
|
||||
repo.Owner,
|
||||
repo.Name,
|
||||
path,
|
||||
options,
|
||||
)
|
||||
@ -76,8 +76,8 @@ func (c *githubClient) CreateFile(
|
||||
options.SHA = file.SHA
|
||||
_, _, err = c.client.Repositories.UpdateFile(
|
||||
ctx,
|
||||
ctx.Config.Brew.GitHub.Owner,
|
||||
ctx.Config.Brew.GitHub.Name,
|
||||
repo.Owner,
|
||||
repo.Name,
|
||||
path,
|
||||
options,
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user