Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into adriandsg/upgrade-d…
Browse files Browse the repository at this point in the history
…ependencies
  • Loading branch information
AdrianDsg committed Jan 17, 2024
2 parents 7b4aa8a + 0d972bb commit 3efc755
Show file tree
Hide file tree
Showing 891 changed files with 51,821 additions and 9,408 deletions.
3 changes: 2 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
* @actions/actions-policy
* @actions/actions-delivery-nexus @actions/actions-oss-maintainers

2 changes: 1 addition & 1 deletion Dockerfile.cibuild
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.17
FROM golang:1.21

ENV GO111MODULE=on
WORKDIR /go/src/github.com/actions/actions-sync
Expand Down
9 changes: 5 additions & 4 deletions _tools/go.mod
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
module tools

go 1.14
go 1.21

require (
github.com/golang/mock v1.4.4-0.20200406172829-6d816de489c1 // indirect
github.com/golangci/golangci-lint v1.24.1-0.20200420081818-6771beaee681 // indirect
github.com/golang/mock v1.6.1-0.20211230170304-bdab070d9c4e // indirect
github.com/golangci/golangci-lint v1.55.2 // indirect
github.com/vektra/mockery v0.0.0-20181123154057-e78b021dcbb5 // indirect
golang.org/x/tools v0.0.0-20200423205358-59e73619c742 // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/tools v0.17.1-0.20240112224347-9164f2aedb4f // indirect
)
385 changes: 18 additions & 367 deletions _tools/go.sum

Large diffs are not rendered by default.

35 changes: 20 additions & 15 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,41 +1,46 @@
module github.com/actions/actions-sync

go 1.17
go 1.21

require (
github.com/go-git/go-git/v5 v5.4.2
github.com/go-git/go-git/v5 v5.11.0
github.com/google/go-github/v43 v43.0.0
github.com/gorilla/mux v1.7.4
github.com/pkg/errors v0.9.1
github.com/spf13/cobra v1.4.0
github.com/stretchr/testify v1.7.0
github.com/stretchr/testify v1.8.4
golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5
)

require (
github.com/Microsoft/go-winio v0.5.2 // indirect
github.com/ProtonMail/go-crypto v0.0.0-20220407094043-a94812496cf5 // indirect
github.com/acomagu/bufpipe v1.0.3 // indirect
dario.cat/mergo v1.0.0 // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect
github.com/cloudflare/circl v1.3.7 // indirect
github.com/cyphar/filepath-securejoin v0.2.4 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emirpasic/gods v1.18.1 // indirect
github.com/go-git/gcfg v1.5.0 // indirect
github.com/go-git/go-billy/v5 v5.3.1 // indirect
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
github.com/go-git/go-billy/v5 v5.5.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/imdario/mergo v0.3.12 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/kevinburke/ssh_config v1.2.0 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/pjbgf/sha1cd v0.3.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/sergi/go-diff v1.2.0 // indirect
github.com/skeema/knownhosts v1.2.1 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/xanzy/ssh-agent v0.3.1 // indirect
golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 // indirect
golang.org/x/net v0.7.0 // indirect
golang.org/x/sys v0.5.0 // indirect
github.com/xanzy/ssh-agent v0.3.3 // indirect
golang.org/x/crypto v0.17.0 // indirect
golang.org/x/mod v0.12.0 // indirect
golang.org/x/net v0.19.0 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/tools v0.13.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.28.0 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
156 changes: 79 additions & 77 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion script/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ fi

if [ ! -f "${GOBIN}/golangci-lint" ]; then
echo "golangci was not found, installing..."
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.45.2
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.55.2
fi

if [ ! -f "${GOBIN}/goimports" ]; then
Expand Down
8 changes: 4 additions & 4 deletions src/reponames.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package src

import (
"fmt"
"io/ioutil"
"os"
"path"
"regexp"
"strings"
Expand Down Expand Up @@ -35,7 +35,7 @@ func getRepoNamesFromRepoFlags(flags *CommonFlags) ([]string, error) {
func getRepoNamesFromCacheDir(flags *CommonFlags) ([]string, error) {
repoNames := make([]string, 0)

orgDirs, err := ioutil.ReadDir(flags.CacheDir)
orgDirs, err := os.ReadDir(flags.CacheDir)
if err != nil {
return nil, errors.Wrapf(err, "error opening cache directory `%s`", flags.CacheDir)
}
Expand All @@ -44,7 +44,7 @@ func getRepoNamesFromCacheDir(flags *CommonFlags) ([]string, error) {
if !orgDir.IsDir() {
return nil, errors.Errorf("unexpected file in root of cache directory `%s`", orgDirPath)
}
repoDirs, err := ioutil.ReadDir(orgDirPath)
repoDirs, err := os.ReadDir(orgDirPath)
if err != nil {
return nil, errors.Wrapf(err, "error opening repository cache directory `%s`", orgDirPath)
}
Expand All @@ -70,7 +70,7 @@ func getRepoNamesFromCSVString(csv string) ([]string, error) {
}

func getRepoNamesFromFile(file string) ([]string, error) {
data, err := ioutil.ReadFile(file)
data, err := os.ReadFile(file)
if err != nil {
return nil, err
}
Expand Down
7 changes: 3 additions & 4 deletions src/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ func Sync(ctx context.Context, flags *SyncFlags) error {
if err := Pull(ctx, pullFlags); err != nil {
return err
}
if err := Push(ctx, pushFlags); err != nil {
return err
}
return nil

err := Push(ctx, pushFlags)
return err
}
8 changes: 4 additions & 4 deletions test/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"flag"
"fmt"
"html"
"io/ioutil"
"io"
"net/http"
"path"
"strings"
Expand Down Expand Up @@ -71,7 +71,7 @@ func main() {
}).Methods("POST")

r.HandleFunc("/api/v3/admin/organizations", func(w http.ResponseWriter, r *http.Request) {
b, err := ioutil.ReadAll(r.Body)
b, err := io.ReadAll(r.Body)
if err != nil {
panic(err)
}
Expand Down Expand Up @@ -129,7 +129,7 @@ func main() {

r.HandleFunc("/api/v3/orgs/{org}/repos", func(w http.ResponseWriter, r *http.Request) {
orgName := mux.Vars(r)["org"]
b, err := ioutil.ReadAll(r.Body)
b, err := io.ReadAll(r.Body)
if err != nil {
panic(err)
}
Expand Down Expand Up @@ -178,7 +178,7 @@ func main() {
}).Methods("POST")

r.HandleFunc("/api/v3/user/repos", func(w http.ResponseWriter, r *http.Request) {
b, err := ioutil.ReadAll(r.Body)
b, err := io.ReadAll(r.Body)
if err != nil {
panic(err)
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
File renamed without changes.
File renamed without changes.
112 changes: 112 additions & 0 deletions vendor/dario.cat/mergo/CONTRIBUTING.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.

0 comments on commit 3efc755

Please sign in to comment.