)]}'
{
  "commit": "7164477cc97ea98a72ca3dc769ac63bc2c061de6",
  "tree": "1b40db03adebe877680e57243d80aeb679bbb75a",
  "parents": [
    "bb7b164fc1214b319a085222f5ce2a8ef41841c9"
  ],
  "author": {
    "name": "Douglas Thor",
    "email": "dougthor42@users.noreply.github.com",
    "time": "Wed Apr 23 23:24:56 2025 -0700"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Thu Apr 24 06:24:56 2025 +0000"
  },
  "message": "refactor: Add log_std(out|err) bools to repo_utils that execute a subprocess (#2817)\n\nWhile making a local patch to work around #2640, I found that I had a\nneed for running a subprocess (`gcloud auth print-access-token`) via\n`repo_utils.execute_checked_stdout`. However, doing so would log that\naccess token when debug logging was enabled via\n`RULES_PYTHON_REPO_DEBUG\u003d1`. This is a security concern for us, so I\nhacked in an option to allow a particular `execute_(un)checked(_stdout)`\ncall to disable logging stdout, stderr, or both.\n\nI figure this might be useful to others so I thought I\u0027d upstream it.\n\n`execute_(un)checked(_stdout)` now support `log_stdout` and `log_stderr`\nbools that default to `True` (which is the same behavior as before this\nPR.\n\nWhen the subprocess writes to stdout and `log_stdout \u003d False`, the\nlogged message will show:\n\n```\n\u003d\u003d\u003d\u003d\u003d stdout start \u003d\u003d\u003d\u003d\u003d\n\u003clog_stdout \u003d False; skipping\u003e\n\u003d\u003d\u003d\u003d\u003d stdout end \u003d\u003d\u003d\u003d\u003d\n```\n\nIf the subprocess does not write to stdout, the debug log shows the same\nas before:\n\n```\n\u003cstdout empty\u003e\n```\n\nThe above also applies for stderr, with text adjusted accordingly.",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "8d11187cdf44d4208b000513109da5b3ab1d65c2",
      "old_mode": 33188,
      "old_path": "CHANGELOG.md",
      "new_id": "88defb8e84a052e5e5eb4c5b55dd22da9423f1cc",
      "new_mode": 33188,
      "new_path": "CHANGELOG.md"
    },
    {
      "type": "modify",
      "old_id": "73883a9244740327dfd9f026327954574cbc9539",
      "old_mode": 33188,
      "old_path": "python/private/repo_utils.bzl",
      "new_id": "eee56ec86c30dc3708bf0bf093965101c7f063fa",
      "new_mode": 33188,
      "new_path": "python/private/repo_utils.bzl"
    }
  ]
}
