Skip to content

Commit

Permalink
git: dry-run mode for commit action
Browse files Browse the repository at this point in the history
  • Loading branch information
brig committed Jan 30, 2025
1 parent 834f5b8 commit 9f172bd
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,12 @@ private Map<String, Object> doCommit(Map<String, Object> in) throws Exception {

Map<String, Object> commitResult;
log.info("Changes detected in the following files: {}", status.getUncommittedChanges());

if (dryRunMode) {
log.info("Dry-run mode enabled: Skipping real commit");
return Map.of();
}

CommitCommand commitCommand = git.commit()
.setSign(false)
.setAllowEmpty(allowEmptyCommit)
Expand Down

0 comments on commit 9f172bd

Please sign in to comment.