Skip to content

Commit

Permalink
fix: Commit message argument - do not override _COMMIT_MESSAGE env va…
Browse files Browse the repository at this point in the history
…riable with the git command
  • Loading branch information
vio committed Feb 1, 2024
1 parent dd07fb7 commit 6a0cebc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,10 @@ export const agent = (artifactsData, config, args = {}, logger = console) => {
...normalizedEnvVars,

// Get commit message using git if includeCommitMessage is set and
// there is no --commit-message argument
...includeCommitMessage && !args.commitMessage && { commitMessage: getCommitMessage() },
// there is no --commit-message argument or RELATIVE_CI_COMMIT_MESSAGE
...includeCommitMessage && !normalizedEnvVars.commitMessage && {
commitMessage: getCommitMessage(),
},
};

debug('Job parameters', maskObjectProperties(params, ['key']));
Expand Down

0 comments on commit 6a0cebc

Please sign in to comment.