update-flake-lock icon indicating copy to clipboard operation
update-flake-lock copied to clipboard

Only set commit-lockfile-summary when commit-msg is defined

Open MattSturgeon opened this issue 4 months ago • 1 comments

Description

Fixes #210

Only pass --option commit-lockfile-summary commitMessage to nix flake update when the commit-msg is defined; i.e. non-empty.

Changed the input's default to "" to allow it to be empty

Checklist
  • [x] Tested functionality against a test repository (see "How to test changes")
    • https://github.com/MattSturgeon/test-update-flake-lock
  • [ ] Added or updated relevant documentation (leave unchecked if not applicable)
  • [x] Updated the unit test with a new test case

Summary by CodeRabbit

  • New Features

    • No default commit message is applied when running updates; if you don’t supply a commit message, none will be set.
    • The lockfile summary option is omitted when the commit message is empty, aligning behavior with user input.
  • Tests

    • Added test coverage for the empty/omitted commit message scenario to ensure correct argument generation.

MattSturgeon avatar Sep 05 '25 23:09 MattSturgeon