diff --git a/action.yml b/action.yml index 2ed0d92..b76193a 100644 --- a/action.yml +++ b/action.yml @@ -12,7 +12,7 @@ inputs: commit-msg: description: "The message provided with the commit" required: false - default: "flake.lock: Update" + default: "" base: description: "Sets the pull request base branch. Defaults to the branch checked out in the workflow." required: false diff --git a/dist/index.js b/dist/index.js index 4ac9a72..c8bc043 100644 --- a/dist/index.js +++ b/dist/index.js @@ -95326,11 +95326,7 @@ function makeNixCommandArgs(nixOptions, flakeInputs, commitMessage) { "--update-input", input ]); - const lockfileSummaryFlags = [ - "--option", - "commit-lockfile-summary", - commitMessage - ]; + const lockfileSummaryFlags = commitMessage ? ["--option", "commit-lockfile-summary", commitMessage] : []; const updateLockMechanism = flakeInputFlags.length === 0 ? "update" : "lock"; return nixOptions.concat(["flake", updateLockMechanism]).concat(flakeInputFlags).concat(["--commit-lock-file"]).concat(lockfileSummaryFlags); } diff --git a/dist/index.js.map b/dist/index.js.map index 2e2062e..d19c49c 100644 --- a/dist/index.js.map +++ b/dist/index.js.map @@ -1 +1 @@ -{"version":3,"sources":["../src/nix.ts","../src/index.ts"],"sourcesContent":["// Build the Nix args out of inputs from the Actions environment\nexport function makeNixCommandArgs(\n nixOptions: string[],\n flakeInputs: string[],\n commitMessage: string,\n): string[] {\n const flakeInputFlags = flakeInputs.flatMap((input) => [\n \"--update-input\",\n input,\n ]);\n\n // NOTE(cole-h): In Nix versions 2.23.0 and later, `commit-lockfile-summary` became an alias to\n // the setting `commit-lock-file-summary` (https://github.com/NixOS/nix/pull/10691), and Nix does\n // not treat aliases the same as their \"real\" setting by requiring setting aliases to be\n // configured via `--option