-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: use authorized GitHub client to download release tarball
Co-authored-by: Jhonathan Aristizabal <jhonathana@vmware.com> Co-authored-by: Nick Rohn <nrohn@vmware.com>
- Loading branch information
1 parent
5cec70e
commit d3f4ddb
Showing
7 changed files
with
337 additions
and
276 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package component | ||
|
||
import ( | ||
"github.com/google/go-github/v40/github" | ||
Ω "github.com/onsi/gomega" | ||
"testing" | ||
) | ||
|
||
func TestInternal_deduplicateReleasesWithTheSameTagName(t *testing.T) { | ||
please := Ω.NewWithT(t) | ||
b := Bump{ | ||
Releases: []*github.RepositoryRelease{ | ||
{TagName: ptr("Y")}, | ||
{TagName: ptr("1")}, | ||
{TagName: ptr("2")}, | ||
{TagName: ptr("3")}, | ||
{TagName: ptr("3")}, | ||
{TagName: ptr("3")}, | ||
{TagName: ptr("X")}, | ||
{TagName: ptr("2")}, | ||
{TagName: ptr("4")}, | ||
{TagName: ptr("4")}, | ||
}, | ||
} | ||
b.deduplicateReleasesWithTheSameTagName() | ||
tags := make([]string, 0, len(b.Releases)) | ||
for _, r := range b.Releases { | ||
tags = append(tags, r.GetTagName()) | ||
} | ||
please.Expect(tags).To(Ω.Equal([]string{ | ||
"Y", | ||
"1", | ||
"2", | ||
"3", | ||
"X", | ||
"4", | ||
})) | ||
} | ||
|
||
func ptr[T any](v T) *T { return &v } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
203 changes: 0 additions & 203 deletions
203
internal/component/fakes_internal/github_new_request_doer.go
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.