)]}'
{
  "commit": "203897526e6ff85bd51a84efb3227137ce366fe3",
  "tree": "5f86a37f73c94dd031157a728794e27c49f707cd",
  "parents": [
    "218f8e161830ccd4f731a6a8d2a6dd36efe4488a"
  ],
  "author": {
    "name": "Richard Levasseur",
    "email": "rlevasseur@google.com",
    "time": "Wed Nov 06 15:56:54 2024 -0800"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Wed Nov 06 23:56:54 2024 +0000"
  },
  "message": "fix: make sphinxdocs support directory inputs (#2375)\n\nThe logic to relocate files assumed that all the inputs were plain file\nartifacts. When\na directory artifact was used, then `ctx.actions.symlink()` would fail\nbecause it requires\nthe output artifact and input target artifact to be the same type of\nfile (plain file or\ndirectory).\n\nTo fix, use `File.is_directory` to detect if the input is a directory or\nfile, then call\n`declare_file()` or `declare_directory()` as appropriate. The later\n`symlink()` call is\nthen happy the two args match.\n\nFixes https://github.com/bazelbuild/rules_python/issues/2374",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "2ee6cfccf1dc6b4918182dd2e9e9f9c4f52856c4",
      "old_mode": 33188,
      "old_path": "sphinxdocs/private/sphinx.bzl",
      "new_id": "678d01bca73106dea341a2159bb977a4328eab0c",
      "new_mode": 33188,
      "new_path": "sphinxdocs/private/sphinx.bzl"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "1a05db0ea35516744a6c745b24ca16aaa322b688",
      "new_mode": 33188,
      "new_path": "sphinxdocs/tests/sphinx_docs/BUILD.bazel"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "d96fa36690e0b9cf23403cbbd04b5b0f8725ba6d",
      "new_mode": 33188,
      "new_path": "sphinxdocs/tests/sphinx_docs/conf.py"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "2e47ecc0f7291eac4c9d7241cb11a0518f2d8449",
      "new_mode": 33188,
      "new_path": "sphinxdocs/tests/sphinx_docs/defs.bzl"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "cdce641fa1e22ffaa3e69d0fd22d4cadfbe1d731",
      "new_mode": 33188,
      "new_path": "sphinxdocs/tests/sphinx_docs/index.md"
    }
  ]
}
