{
  "slug": "azd-azure-yaml-hooks-accept-executor-specific-config-d00f5a860812",
  "title": "azd azure.yaml hooks accept executor-specific config",
  "tools": [
    "azd"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-04-15T21:39:10.000Z",
  "announced_at": "2026-04-15T21:39:10.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When configuring a JavaScript/TypeScript, Python, or .NET hook, add `config:` to its hook in `azure.yaml` and set the option for that executor. Specify `kind` when needed to identify the executor; provide `run` because it is required when `config` is set.",
    "examples": [
      "hooks:\n  postdeploy:\n    kind: ts\n    run: ./hooks/<script>.ts\n    config:\n      packageManager: pnpm",
      "hooks:\n  postprovision:\n    kind: python\n    run: ./hooks/<script>.py\n    config:\n      virtualEnvName: <directory>",
      "hooks:\n  postprovision:\n    kind: dotnet\n    run: ./hooks/<script>.cs\n    config:\n      configuration: Release\n      framework: net10.0"
    ],
    "gotchas": [
      "Version: 1.24.0",
      "run (required): Hook script or relative script path; required when `config` is specified.",
      "kind: Hook executor kind: `js`, `ts`, `python`, `dotnet`, `sh`, or `pwsh`. If omitted, azd infers it from the script file extension.",
      "config: Object for executor-specific configuration. Its available properties depend on `kind`.",
      "config.packageManager: For `js` or `ts`: dependency package manager; overrides lock-file auto-detection. Allowed: `npm`, `pnpm`, `yarn`.",
      "config.virtualEnvName: For `python`: virtual environment directory name. Defaults to auto-detection (`.venv`, `venv`) or `{baseName}_env`.",
      "config.configuration: For `dotnet`: MSBuild configuration, for example `Debug` or `Release`.",
      "config.framework: For `dotnet`: target framework moniker, for example `net8.0` or `net10.0`.",
      "Prerequisite: For JavaScript/TypeScript hooks, place `package.json` in the script directory or a parent directory.",
      "Prerequisite: For .NET project mode, a `.csproj`, `.fsproj`, or `.vbproj` must be in the script directory or a parent directory. Standalone `.cs` script mode requires .NET 10+."
    ]
  },
  "why_it_matters": "Configure runtime-specific options for hooks in an `azure.yaml` project.",
  "sources": [
    "https://github.com/Azure/azure-dev/releases/tag/azure-dev-cli_1.24.0",
    "https://learn.microsoft.com/en-us/azure/developer/azure-developer-cli/azd-schema",
    "https://learn.microsoft.com/en-us/azure/developer/azure-developer-cli/hooks-multi-language"
  ],
  "rank": 0.90029,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v2+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "wave2a-20261017",
    "verdict_id": "wave2a-20261017:wave2a-20261017-284e71cd7c72a6ee-1:gate",
    "evidence_hash": "d88b2f1c499ec503bf6c7ee51ff1e9424339d4d98dcbab99ccc9c9128b54440f"
  },
  "review": {
    "draft_hash": "0c734f0afd0a037ab13660ab75c6a3349f0bc1be85268e63f6b7a677381fec68",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "wave2a-20261017:gate",
    "reason": "2 of 3 judge runs approved with p_yes >= 0.9 (mean 0.90 >= 0.9; 2 needed) and Jev gave 0.72 (>= 0.6 needed)."
  }
}
