Skip to content
This repository was archived by the owner on Aug 6, 2021. It is now read-only.

Commit a053c02

Browse files
author
Pete Wagner
authored
Merge pull request #2 from thepwagner/action-update-go/main/internal
Dependency Updates
2 parents 26b7415 + 81d98e0 commit a053c02

File tree

18 files changed

+281
-172
lines changed

18 files changed

+281
-172
lines changed

dockerurl/check.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"github.com/thepwagner/action-update/updater"
1313
)
1414

15-
func (u *Updater) Check(ctx context.Context, dependency updater.Dependency) (*updater.Update, error) {
15+
func (u *Updater) Check(ctx context.Context, dependency updater.Dependency, filter func(string) bool) (*updater.Update, error) {
1616
if strings.HasPrefix(dependency.Path, "github.com/") {
1717
return u.checkGitHubRelease(ctx, dependency)
1818
}

dockerurl/check_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ func TestUpdater_Check(t *testing.T) {
6060
rc := &mockRepoClient{}
6161
rc.On("ListReleases", ctx, depOwner, depRepoName, mock.Anything).Return(tc.releases, nil, nil)
6262

63-
u := updatertest.CheckInFixture(t, "simple", updaterFactory(dockerurl.WithRepoClient(rc)), dep)
63+
u := updatertest.CheckInFixture(t, "simple", updaterFactory(dockerurl.WithRepoClient(rc)), dep, nil)
6464
if tc.update == nil {
6565
assert.Nil(t, u)
6666
} else {
@@ -78,7 +78,7 @@ func TestUpdater_Check(t *testing.T) {
7878

7979
func TestUpdater_Check_Unknown(t *testing.T) {
8080
u := dockerurl.NewUpdater("")
81-
_, err := u.Check(context.Background(), updater.Dependency{Path: "foo.com/bar"})
81+
_, err := u.Check(context.Background(), updater.Dependency{Path: "foo.com/bar"}, nil)
8282
assert.Error(t, err)
8383
}
8484

@@ -89,7 +89,7 @@ func TestUpdater_Check_Error(t *testing.T) {
8989
rc.On("ListReleases", ctx, depOwner, depRepoName, mock.Anything).Return(nil, nil, listErr)
9090
u := dockerurl.NewUpdater("", dockerurl.WithRepoClient(rc))
9191

92-
_, err := u.Check(ctx, dep)
92+
_, err := u.Check(ctx, dep, nil)
9393
assert.Equal(t, listErr, errors.Unwrap(err))
9494
rc.AssertExpectations(t)
9595
}
@@ -138,7 +138,7 @@ func TestUpdater_CheckLive(t *testing.T) {
138138

139139
for _, tc := range cases {
140140
t.Run(tc.dep.Path, func(t *testing.T) {
141-
u := updatertest.CheckInFixture(t, "simple", updaterFactory(), tc.dep)
141+
u := updatertest.CheckInFixture(t, "simple", updaterFactory(), tc.dep, nil)
142142
if tc.next == nil {
143143
assert.Nil(t, u)
144144
} else if assert.NotNil(t, u, "no update") {

go.mod

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ require (
88
github.com/moby/buildkit v0.7.2
99
github.com/sirupsen/logrus v1.7.0
1010
github.com/stretchr/testify v1.6.1
11-
github.com/thepwagner/action-update v0.0.1
12-
github.com/thepwagner/action-update-docker v0.0.1
11+
github.com/thepwagner/action-update v0.0.2
12+
github.com/thepwagner/action-update-docker v0.0.2
1313
)
1414

1515
replace (

go.sum

+4-4
Original file line numberDiff line numberDiff line change
@@ -249,10 +249,10 @@ github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd
249249
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
250250
github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
251251
github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
252-
github.com/thepwagner/action-update v0.0.1 h1:1DU8swMUGsKpvPD8E6hfiNzdznXeldISjLgLnLTe+zM=
253-
github.com/thepwagner/action-update v0.0.1/go.mod h1:sbBBJVBFI/s+1owXsHLixR210s0S++sJ1CKrhtz0iDw=
254-
github.com/thepwagner/action-update-docker v0.0.1 h1:Z2ot7Qghw41a3AX1im8yzARUeUvSeeJ5+vNj43E5500=
255-
github.com/thepwagner/action-update-docker v0.0.1/go.mod h1:PuGKdOlrH52ORxT9MyS7bGV4zlwReL3vo/73137kn+g=
252+
github.com/thepwagner/action-update v0.0.2 h1:v+LhIuMchWfIYJJbJ/7a8muJ8zFw0DffZVJab4H1C/U=
253+
github.com/thepwagner/action-update v0.0.2/go.mod h1:sbBBJVBFI/s+1owXsHLixR210s0S++sJ1CKrhtz0iDw=
254+
github.com/thepwagner/action-update-docker v0.0.2 h1:XeyTYwBixHH+jCkZENEcWCTNvA5d7PeE6+V6xL+X4Rw=
255+
github.com/thepwagner/action-update-docker v0.0.2/go.mod h1:4es+9+DLgVeb/LWkbyAywAY2QTN5JQy6pYJtE/hOPR4=
256256
github.com/tonistiigi/fsutil v0.0.0-20200326231323-c2c7d7b0e144/go.mod h1:0G1sLZ/0ttFf09xvh7GR4AEECnjifHRNJN/sYbLianU=
257257
github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea/go.mod h1:WPnis/6cRcDZSUvVmezrxJPkiO87ThFYsoUiMwWNDJk=
258258
github.com/uber/jaeger-client-go v0.0.0-20180103221425-e02c85f9069e/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk=

vendor/github.com/thepwagner/action-update-docker/docker/updater.go

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/thepwagner/action-update/actions/updateaction/env.go

+1-26
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/thepwagner/action-update/actions/updateaction/handlers.go

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/thepwagner/action-update/repo/commit.go

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/thepwagner/action-update/repo/git.go

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/thepwagner/action-update/repo/github.go

+5-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/thepwagner/action-update/repo/pullrequest.go

+11-11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/thepwagner/action-update/updater/batch.go

-38
This file was deleted.

0 commit comments

Comments
 (0)