Skip to content

Commit 5c8bc69

Browse files
authored
multi-repo-action: Cleanups (1/n) (#301)
- install: Move action installation into a separate package - Add missing license headers - install: Fix unrecognized variables - lint: Fix warnings and attempt to auto-fix issues (where supported) - install: Parameterize config - install: Borrow GitHub client pattern from sigs.k8s.io/release-sdk - install: Use package-internal GitHub interface - install: Provide installation options as struct - install: Initial error/log handling cleanups - install: Use cobra for CLI - Remove inaccurate instances of workflow configuration file - multi-repo-action: Disable incomplete tests - install: Retrieve the correct action configuration from local path Signed-off-by: Stephen Augustus <[email protected]>
1 parent adf2f6d commit 5c8bc69

File tree

19 files changed

+957
-649
lines changed

19 files changed

+957
-649
lines changed

.golangci.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,23 @@ run:
33
concurrency: 6
44
deadline: 5m
55
issues:
6-
new-from-rev: ""
76
include:
87
# revive `package-comments` and `exported` rules.
98
- EXC0012
109
- EXC0013
1110
- EXC0014
1211
- EXC0015
12+
# Maximum issues count per one linter.
13+
# Set to 0 to disable.
14+
# Default: 50
15+
max-issues-per-linter: 0
16+
# Maximum count of issues with the same text.
17+
# Set to 0 to disable.
18+
# Default: 3
19+
max-same-issues: 0
20+
new-from-rev: ""
21+
# Fix found issues (if it's supported by the linter).
22+
fix: true
1323
linters:
1424
disable-all: true
1525
enable:

codeql.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,19 @@
1+
/**
2+
* Copyright 2022 OpenSSF Authors
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*
16+
* SPDX-License-Identifier: Apache-2.0
17+
*/
18+
119
console.log("codeql")

go.mod

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,13 @@ go 1.17
55
require (
66
github.com/caarlos0/env/v6 v6.9.2
77
github.com/google/go-cmp v0.5.8
8+
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79
89
github.com/ossf/scorecard/v4 v4.2.0
910
github.com/sigstore/cosign v1.8.0
11+
github.com/sirupsen/logrus v1.8.1
1012
github.com/spf13/cobra v1.4.0
13+
sigs.k8s.io/release-sdk v0.8.0
14+
sigs.k8s.io/release-utils v0.6.1-0.20220405215325-d4a2a2f0e8fd
1115
)
1216

1317
require (
@@ -25,11 +29,14 @@ require (
2529
github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect
2630
github.com/Azure/go-autorest/logger v0.2.1 // indirect
2731
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
32+
github.com/Microsoft/go-winio v0.5.1 // indirect
2833
github.com/PaesslerAG/gval v1.0.0 // indirect
2934
github.com/PaesslerAG/jsonpath v0.1.1 // indirect
35+
github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7 // indirect
3036
github.com/PuerkitoBio/purell v1.1.1 // indirect
3137
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
3238
github.com/ThalesIgnite/crypto11 v1.2.5 // indirect
39+
github.com/acomagu/bufpipe v1.0.3 // indirect
3340
github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d // indirect
3441
github.com/aws/aws-sdk-go-v2 v1.16.2 // indirect
3542
github.com/aws/aws-sdk-go-v2/config v1.15.3 // indirect
@@ -71,6 +78,7 @@ require (
7178
github.com/docker/docker v20.10.12+incompatible // indirect
7279
github.com/docker/docker-credential-helpers v0.6.4 // indirect
7380
github.com/dustin/go-humanize v1.0.0 // indirect
81+
github.com/emirpasic/gods v1.12.0 // indirect
7482
github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1 // indirect
7583
github.com/envoyproxy/protoc-gen-validate v0.6.2 // indirect
7684
github.com/fatih/color v1.13.0 // indirect
@@ -79,6 +87,9 @@ require (
7987
github.com/fullstorydev/grpcurl v1.8.2 // indirect
8088
github.com/ghodss/yaml v1.0.0 // indirect
8189
github.com/go-chi/chi v4.1.2+incompatible // indirect
90+
github.com/go-git/gcfg v1.5.0 // indirect
91+
github.com/go-git/go-billy/v5 v5.3.1 // indirect
92+
github.com/go-git/go-git/v5 v5.4.2 // indirect
8293
github.com/go-logr/logr v1.2.3 // indirect
8394
github.com/go-openapi/analysis v0.21.2 // indirect
8495
github.com/go-openapi/errors v0.20.2 // indirect
@@ -106,8 +117,8 @@ require (
106117
github.com/google/certificate-transparency-go v1.1.2 // indirect
107118
github.com/google/go-containerregistry v0.8.1-0.20220209165246-a44adc326839 // indirect
108119
github.com/google/go-github/v38 v38.1.0 // indirect
120+
github.com/google/go-github/v39 v39.2.0 // indirect
109121
github.com/google/go-github/v41 v41.0.0 // indirect
110-
github.com/google/go-github/v42 v42.0.0 // indirect
111122
github.com/google/go-querystring v1.1.0 // indirect
112123
github.com/google/gofuzz v1.2.0 // indirect
113124
github.com/google/trillian v1.4.0 // indirect
@@ -127,12 +138,14 @@ require (
127138
github.com/imdario/mergo v0.3.12 // indirect
128139
github.com/in-toto/in-toto-golang v0.3.4-0.20211211042327-af1f9fb822bf // indirect
129140
github.com/inconshreveable/mousetrap v1.0.0 // indirect
141+
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
130142
github.com/jedisct1/go-minisign v0.0.0-20211028175153-1c139d1cc84b // indirect
131143
github.com/jhump/protoreflect v1.9.0 // indirect
132144
github.com/jmespath/go-jmespath v0.4.0 // indirect
133145
github.com/jonboulle/clockwork v0.2.2 // indirect
134146
github.com/josharian/intern v1.0.0 // indirect
135147
github.com/json-iterator/go v1.1.12 // indirect
148+
github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 // indirect
136149
github.com/klauspost/compress v1.15.1 // indirect
137150
github.com/leodido/go-urn v1.2.1 // indirect
138151
github.com/letsencrypt/boulder v0.0.0-20220331220046-b23ab962616e // indirect
@@ -155,6 +168,7 @@ require (
155168
github.com/opentracing/opentracing-go v1.2.0 // indirect
156169
github.com/pelletier/go-toml v1.9.4 // indirect
157170
github.com/pelletier/go-toml/v2 v2.0.0-beta.8 // indirect
171+
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
158172
github.com/pkg/errors v0.9.1 // indirect
159173
github.com/prometheus/client_golang v1.12.1 // indirect
160174
github.com/prometheus/client_model v0.2.0 // indirect
@@ -163,17 +177,17 @@ require (
163177
github.com/rhysd/actionlint v1.6.12 // indirect
164178
github.com/rivo/uniseg v0.2.0 // indirect
165179
github.com/robfig/cron v1.2.0 // indirect
180+
github.com/rogpeppe/go-internal v1.8.1 // indirect
166181
github.com/russross/blackfriday/v2 v2.1.0 // indirect
167182
github.com/sassoftware/relic v0.0.0-20210427151427-dfb082b79b74 // indirect
168183
github.com/secure-systems-lab/go-securesystemslib v0.3.1 // indirect
169184
github.com/segmentio/ksuid v1.0.4 // indirect
185+
github.com/sergi/go-diff v1.2.0 // indirect
170186
github.com/shibumi/go-pathspec v1.3.0 // indirect
171187
github.com/shurcooL/githubv4 v0.0.0-20201206200315-234843c633fa // indirect
172188
github.com/shurcooL/graphql v0.0.0-20200928012149-18c5c3165e3a // indirect
173189
github.com/sigstore/fulcio v0.1.2-0.20220114150912-86a2036f9bc7 // indirect
174-
github.com/sigstore/rekor v0.5.0 // indirect
175190
github.com/sigstore/sigstore v1.2.1-0.20220424143412-3d41663116d5 // indirect
176-
github.com/sirupsen/logrus v1.8.1 // indirect
177191
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 // indirect
178192
github.com/soheilhy/cmux v0.1.5 // indirect
179193
github.com/spf13/afero v1.8.2 // indirect
@@ -192,6 +206,7 @@ require (
192206
github.com/urfave/cli v1.22.5 // indirect
193207
github.com/vbatts/tar-split v0.11.2 // indirect
194208
github.com/xanzy/go-gitlab v0.64.0 // indirect
209+
github.com/xanzy/ssh-agent v0.3.0 // indirect
195210
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 // indirect
196211
github.com/zeebo/errs v1.2.2 // indirect
197212
go.etcd.io/bbolt v1.3.6 // indirect
@@ -225,7 +240,6 @@ require (
225240
golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 // indirect
226241
golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect
227242
golang.org/x/net v0.0.0-20220412020605-290c469a71a5 // indirect
228-
golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 // indirect
229243
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
230244
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad // indirect
231245
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
@@ -243,6 +257,7 @@ require (
243257
gopkg.in/ini.v1 v1.66.4 // indirect
244258
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
245259
gopkg.in/square/go-jose.v2 v2.6.0 // indirect
260+
gopkg.in/warnings.v0 v0.1.2 // indirect
246261
gopkg.in/yaml.v2 v2.4.0 // indirect
247262
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
248263
gotest.tools/v3 v3.1.0 // indirect
@@ -255,7 +270,12 @@ require (
255270
knative.dev/pkg v0.0.0-20220325200448-1f7514acd0c2 // indirect
256271
mvdan.cc/sh/v3 v3.4.3 // indirect
257272
sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 // indirect
258-
sigs.k8s.io/release-utils v0.6.0 // indirect
259273
sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect
260274
sigs.k8s.io/yaml v1.3.0 // indirect
261275
)
276+
277+
require (
278+
github.com/google/go-github/v42 v42.0.0
279+
github.com/sigstore/rekor v0.5.0 // indirect
280+
golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5
281+
)

0 commit comments

Comments
 (0)