CI: Allow overwriting of existing GitHub release assets (#65127)

* CI: Allow overwriting of existing GitHub release assets

This closes #63698

* Use c for *cli.Context in publishgithub.go
This commit is contained in:
Horst Gutmann
2023-03-28 09:19:46 -05:00
committed by GitHub
parent b11186f946
commit 4ab3bd6f7e
3 changed files with 58 additions and 18 deletions
+12
View File
@@ -224,3 +224,15 @@ func (m *mockGithubRepositoryServiceImpl) UploadReleaseAsset(ctx context.Context
assetUrl := "testurl.com.br"
return &github.ReleaseAsset{Name: &assetName, BrowserDownloadURL: &assetUrl}, &github.Response{}, m.uploadErr
}
func (m *mockGithubRepositoryServiceImpl) DeleteReleaseAsset(ctx context.Context, owner string, repo string, id int64) (*github.Response, error) {
return nil, nil
}
func (m *mockGithubRepositoryServiceImpl) ListReleaseAssets(ctx context.Context, owner string, repo string, id int64, opts *github.ListOptions) ([]*github.ReleaseAsset, *github.Response, error) {
resp := github.Response{}
resp.LastPage = 1
resp.FirstPage = 1
resp.NextPage = 0
return []*github.ReleaseAsset{}, &resp, nil
}