åç½®ã
å人OSSã«å ¥ãã¦ãdependabotã§moduleãã¢ãããã¼ããã¦ããgolangci-lintã§ããããwarningãåºã¦ããã®ã§æ°ã¥ããã *1
Running [/home/runner/golangci-lint-1.60.3-linux-amd64/golangci-lint run] in [/home/runner/work/gitpanda/gitpanda] ... Error: gitlab/blob_fetcher.go:19:54: SA1019: gitlab.Client is deprecated: use gitlab.com/gitlab-org/api/client-go instead. See https://gitlab.com/gitlab-org/api/client-go (staticcheck) func (f *blobFetcher) fetchPath(path string, client *gitlab.Client, isDebugLogging bool) (*Page, error) { ^ Error: gitlab/commit_fetcher.go:15:56: SA1019: gitlab.Client is deprecated: use gitlab.com/gitlab-org/api/client-go instead. See https://gitlab.com/gitlab-org/api/client-go (staticcheck) func (f *commitFetcher) fetchPath(path string, client *gitlab.Client, isDebugLogging bool) (*Page, error) { ^ Error: gitlab/fetcher.go:12:33: SA1019: gitlab.Client is deprecated: use gitlab.com/gitlab-org/api/client-go instead. See https://gitlab.com/gitlab-org/api/client-go (staticcheck) fetchPath(path string, client *gitlab.Client, isDebugLogging bool) (*Page, error) ^ Error: gitlab/url_parser.go:41:17: SA1019: gitlab.NewClient is deprecated: This module has been migrated to gitlab.com/gitlab-org/api/client-go. See https://gitlab.com/gitlab-org/api/client-go (staticcheck) client, err := gitlab.NewClient(params.PrivateToken, options...) ^
Goã§GitLabã®APIã使ãæã«ã¯ https://github.com/xanzy/go-gitlab ã使ããã ãã©ãhttps://gitlab.com/gitlab-org/api/client-go ã«ç§»ç®¡ãããããã
golangci-lintãå ¥ãã¦ããªãã£ãã絶対æ°ã¥ããªãã£ãã®ã§å ¥ãã¦ã¦ããã£ãã
éã«ç½®ãæããã³ãã³ã
åºæ¬çã«ã¯ç§»ç®¡åå¾ã§ããã±ã¼ã¸ã®æ§æã¯å¤ãããªãã®ã§æååç½®æã§ãããã ãã©è¤æ°ã®ãªãã¸ããªã§å¯¾å¿ããå¿ è¦ããã£ãã®ã§ã³ãã³ãã§å ¨é¨ã§ããããã«ãã¾ããã
æå ã®ãªãã¸ããªã ã¨ããã§å ¨é¨æ¸ãæãã¾ããã
find . -name '*.go' -type f -exec sed -i '' 's|github.com/xanzy/go-gitlab|gitlab.com/gitlab-org/api/client-go|g' {} + sed -i '' 's|github.com/xanzy/go-gitlab v[^ ]*|gitlab.com/gitlab-org/api/client-go latest|' go.mod go mod tidy gofmt -w .
Macã«ããã©ã«ãã§å ¥ã£ã¦ãBSDçã®sedãªã®ã§GNUçã¯ã¡ãã£ã¨ã³ãã³ããå¤ããããã