The last test ran from the wrong directory. Let me fix that, and also check the orgs situation.
All tests pass. orgs doesn't have a git repo so I'll skip PRs for that one. Let me check which modules actually have changes, then create branches and PRs.
spdx and managers had no actual changes. 6 repos need PRs: registries, manifests, vulns, forges, enrichment, git-pkgs. Let me check default branches and create PRs.
git-pkgs is on urls-command branch. Let me handle that one carefully. First, let me create branches and PRs for the 5 repos that are on main.
Now handle git-pkgs (currently on urls-command). I'll stash the changes, switch to main, create the branch there, and apply the dep update.
Tests pass. Now commit and push all 6, then create PRs.
Now push all branches and create PRs.
All pushed. Now creating PRs. Let me get the diff summaries for each to write good PR bodies.
All done. Let me restore git-pkgs back to the urls-command branch with its stashed work.
All 6 PRs created, tests passing on all of them:
Skipped modules with no changes (spdx, managers) and modules without git repos (orgs). The urls-command branch on git-pkgs is restored to where it was.
Already handled -- all 6 PRs are up. That background agent was from the earlier attempt that got blocked on permissions before I ran everything directly.
Same thing -- stale background agent. Everything's already done and PRs are open.
Already done.
Yep, all handled already.
Done.
All done -- those background agents all failed on permissions but everything was completed directly afterwards.
Already handled.
All background agents are finished now. Everything was already completed and all 6 PRs are open.
That's leftover from the dep update I ran while on urls-command before switching to main. It's the same set of dep bumps that went into the PR -- managers v0.6.0, go-git v5.16.5, sqlite v1.45.0, buildtools, golang.org/x/* packages, etc.
You can either commit these on urls-command too (so it picks up the same updates), or discard them with git checkout -- go.mod go.sum if you'd rather rebase onto main after the PR merges.
Done.
This is a Go project with many modules. Let me check each one for outdated dependencies. I'll skip testing/repos/ and testdata/ since those are cloned third-party repos.
Lint failure. Let me check the details.
The lint failures are a mix. The staticcheck one is from the gitlab-org/api/client-go upgrade -- MergeRequestsEnabled was deprecated in favor of MergeRequestsAccessLevel. The errcheck ones look pre-existing. Let me check if main was passing.
Lint was already failing on main before this PR. The errcheck issues and the deprecated MergeRequestsEnabled predate the dep update. But since the gitlab-org upgrade makes the deprecation warning more prominent, let me fix it along with the other issues since we're already in there.
Let me check what type MergeRequestsAccessLevel is and how PullRequestsEnabled is defined.
MergeRequestsAccessLevel is an AccessControlValue string. MRs are enabled when the value is not "disabled". Let me also look at the errcheck issues -- resp.Body.Close() and the test encoder calls.
These are all pre-existing lint issues -- the resp.Body.Close() errcheck and test helper unchecked errors. The only one related to the dep update is the deprecated MergeRequestsEnabled. But since CI was already failing on main, these aren't regressions from this PR.
Want me to fix all the lint issues in this PR, or just the gitlab deprecation since that's the one tied to the upgrade? The errcheck ones existed before.
Here's the summary across all modules:
Up to date (10 modules): archives, changelog, gitignore, managers, platforms, purl, resolve, reuse, vers, website, testing
Needs attention:
| Module | Outdated | Highlights |
|---|---|---|
| proxy | 103 | Biggest backlog. aws-sdk-go v1 deprecated, bluemonday retracted, many cloud SDKs behind |
| git-pkgs | 56 | bluemonday retracted, managers internal dep behind, modernc.org/sqlite behind |
| enrichment | 48 | gin-gonic/gin v1.9.1 -> v1.11.0, bluemonday retracted, logrus behind |
| orgs | 29 | gitlab-org/api/client-go, golang.org/x/* packages, sqlite behind |
| forges | 17 | gitlab-org/api/client-go, golang.org/x/crypto |
| vulns | 13 | purl internal dep, sqlite, golang.org/x/* |
| manifests | 6 | golang/protobuf v1.5.0 deprecated, buildtools behind |
| foo2nix | 4 | Internal deps (manifests, purl, vers) all behind |
| registries | 3 | purl internal dep behind |
| spdx | 1 | testify v1.8.1 -> v1.11.1 |
Things worth fixing soon:
microcosm-cc/bluemonday v1.0.25 is retracted in enrichment, git-pkgs, and proxy -- should bump to v1.0.27golang/protobuf v1.5.0 in manifests is deprecated (v1.5.4 available, or migrate to google.golang.org/protobuf)aws/aws-sdk-go v1 in proxy is deprecated in favor of v2Want me to start updating any of these? I'd suggest starting with the retracted bluemonday since retracted versions can cause build warnings, then working through the internal deps.
Now I have a clear picture. Let me fix all 10 lint issues:
gitlab.go:38 - deprecated MergeRequestsEnabledbitbucket.go:90 - unchecked resp.Body.Close()detect.go:34,81 - unchecked resp.Body.Close()bitbucket_test.go:18,113,181 - unchecked json.NewEncoder(w).Encode(...)forges_test.go:225,246,270 - unchecked fmt.FprintfNow fix the test files. For the json.NewEncoder(w).Encode(...) calls in bitbucket_test.go:
Now fix the fmt.Fprintf calls in forges_test.go:
Now run the tests and lint locally.
Tests pass. Let me commit and push.
I'll update deps in all the other modules. Let me run them in parallel.
Pushed. The fixes:
gitlab.go -- replaced deprecated MergeRequestsEnabled bool with MergeRequestsAccessLevel != DisabledAccessControlbitbucket.go, detect.go -- defer resp.Body.Close() changed to defer func() { _ = resp.Body.Close() }()bitbucket_test.go -- added _ = to unchecked json.NewEncoder(w).Encode() callsforges_test.go -- added _, _ = to unchecked fmt.Fprintf() callsMore errcheck issues in gitea_test.go that I missed. Let me fix those too.