Skip to content

Commit b321541

Browse files
author
thisisaaronland
committed
update vendor deps; ensure optional -repo flag in wof-create-hook tool
1 parent 0fa17aa commit b321541

File tree

5 files changed

+62
-5
lines changed

5 files changed

+62
-5
lines changed

cmd/wof-create-hook/main.go

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ func main() {
3131
var exclude multi.MultiString
3232
flag.Var(&exclude, "exclude", "Exclude repositories with this prefix")
3333

34+
var repos multi.MultiString
35+
flag.Var(&repos, "repo", "A valid GitHub repository name")
36+
3437
dryrun := flag.Bool("dryrun", false, "Go through the motions but don't create webhooks.")
3538

3639
flag.Parse()
@@ -64,10 +67,15 @@ func main() {
6467
// opts.NotForked = *not_forked
6568
opts.AccessToken = *token
6669

67-
repos, err := organizations.ListRepos(*org, opts)
70+
if len(repos) == 0 {
6871

69-
if err != nil {
70-
log.Fatal(err)
72+
r, err := organizations.ListRepos(*org, opts)
73+
74+
if err != nil {
75+
log.Fatal(err)
76+
}
77+
78+
repos = r
7179
}
7280

7381
for _, r := range repos {

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ go 1.12
55
require (
66
github.com/briandowns/spinner v1.11.1
77
github.com/google/go-github/v27 v27.0.6
8-
github.com/sfomuseum/go-flags v0.4.1
8+
github.com/sfomuseum/go-flags v0.4.2
99
github.com/whosonfirst/iso8601duration v0.0.0-20150204201828-8da3af7a2a61
1010
golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43
1111
)

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ github.com/sfomuseum/go-flags v0.3.1 h1:6QZwQz1Dgy6t8ty+S7aR3iBSq8+0UR5/R3SNXHC8
134134
github.com/sfomuseum/go-flags v0.3.1/go.mod h1:54KCZIGmvZkIOrSCHSNMvgSTKH2gJRJyISH+AiI+55w=
135135
github.com/sfomuseum/go-flags v0.4.1 h1:EkNHrzhIyHbalSu+0SutBu+qFO1v5XOn4USHN31USTY=
136136
github.com/sfomuseum/go-flags v0.4.1/go.mod h1:54KCZIGmvZkIOrSCHSNMvgSTKH2gJRJyISH+AiI+55w=
137+
github.com/sfomuseum/go-flags v0.4.2 h1:sDSvp0c4QZKf3pNUcpfIwshAu9U6sjsNEopmPfC329U=
138+
github.com/sfomuseum/go-flags v0.4.2/go.mod h1:54KCZIGmvZkIOrSCHSNMvgSTKH2gJRJyISH+AiI+55w=
137139
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
138140
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
139141
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=

vendor/github.com/sfomuseum/go-flags/multi/keyvalue.go

Lines changed: 47 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/modules.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ github.com/google/go-querystring/query
1212
github.com/mattn/go-colorable
1313
# github.com/mattn/go-isatty v0.0.8
1414
github.com/mattn/go-isatty
15-
# github.com/sfomuseum/go-flags v0.4.1
15+
# github.com/sfomuseum/go-flags v0.4.2
1616
github.com/sfomuseum/go-flags/multi
1717
# github.com/whosonfirst/iso8601duration v0.0.0-20150204201828-8da3af7a2a61
1818
github.com/whosonfirst/iso8601duration

0 commit comments

Comments
 (0)