[v9.4.x] CI: Allow overwriting of existing GitHub release assets (#65459)

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

(cherry picked from commit 4ab3bd6f7e)

Co-authored-by: Horst Gutmann <horst.gutmann@grafana.com>
This commit is contained in:
Grot (@grafanabot)
2023-03-28 17:31:14 +02:00
committed by GitHub
co-authored by Horst Gutmann
parent 6a73b2b726
commit cb5c92a375
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
}