Skip to content

Commit

Permalink
Merge pull request #1067 from relative-ci/fix-commit-message-env-vari…
Browse files Browse the repository at this point in the history
…able

fix: Commit message argument - do not override _COMMIT_MESSAGE env variable with the git command
  • Loading branch information
vio authored Feb 1, 2024
2 parents dd07fb7 + 6a0cebc commit f89f16f
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 f89f16f

Please sign in to comment.