)]}'
{
  "commit": "23b3f09e3e88694d14cff94b18cf1f16d43d16f1",
  "tree": "2324d2f0884d87be0768f2fc16dc04526ed3ff5b",
  "parents": [
    "3b18746bb9ab9fcc5eb7c3bc3e2b25fcdb718c28"
  ],
  "author": {
    "name": "Aaron Hakala",
    "email": "aaron.hakala@gmail.com",
    "time": "Thu Jan 08 06:38:44 2026 +0200"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Wed Jan 07 23:38:44 2026 -0500"
  },
  "message": "fix(gopackagesdriver): Improve wildcard package query matching (#4288)\n\n\u003c!-- Thanks for sending a PR! Before submitting:\n\n1. If this is your first PR, please read CONTRIBUTING.md and sign the\nCLA\n   first. We cannot review code without a signed CLA.\n2. Please file an issue *first*. All features and most bug fixes should\nhave\nan associated issue with a design discussed and decided upon. Small bug\n   fixes and documentation improvements don\u0027t need issues.\n3. New features and bug fixes must have tests. Documentation may need to\nbe updated. If you\u0027re unsure what to update, send the PR, and we\u0027ll\ndiscuss\n   in review.\n4. Note that PRs updating dependencies and new Go versions are not\naccepted.\n   Please file an issue instead.\n--\u003e\n\n**What type of PR is this?**\n\nBug fix\n\n**What does this PR do? Why is it needed?**\n\nImprove wildcard package loading (`./something/...`) when using a custom\nbazelQueryScope e.g. `//...`. Currently, the queryFromRequests\ntransformation results in a query like:\n\n```\nbazel query \"kind(\\\"^(go_library) rule$\\\", attr(importpath, \\\"^./something(/.+)?$\\\", deps(//...)))\"\n```\n\nwhich fails to return any results due to the `^` start of string\nmatching. This PR also aligns the behaviour more closely to the \"non\nwild card\" behaviour\n([see](https://github.com/bazel-contrib/rules_go/blob/077f15fe11b9da6aa0e3271db1260929f04fef87/go/tools/gopackagesdriver/bazel_json_builder.go#L123))\nby omitting the `^`.\n\nWhen using go outside bazel, the following query is valid syntax and\ncorrectly loads all the packages under `./something/`:\n\n```\npackage.Load(cfg, \"./something/...\")\n```\n\n**Which issues(s) does this PR fix?**\n\nNo issue\n\n**Other notes for review**",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "bb50f7a04446ebca8a99405d92eb84327a6a9c02",
      "old_mode": 33188,
      "old_path": "go/tools/gopackagesdriver/bazel_json_builder.go",
      "new_id": "ec4d8c2ca171e1a00a956a229750ca7f956cb646",
      "new_mode": 33188,
      "new_path": "go/tools/gopackagesdriver/bazel_json_builder.go"
    }
  ]
}
