Skip to content

Commit

Permalink
chore(config.ts): add OCO_GITPUSH environment variable to control git…
Browse files Browse the repository at this point in the history
… push behavior

The OCO_GITPUSH environment variable is added to the config file to
allow controlling the behavior of git push. If the variable is set to
'false', git push will be disabled. Otherwise, it will be enabled. This
provides flexibility in scenarios where git push is not desired, such as
during development or testing.
  • Loading branch information
Moret84 committed Aug 24, 2023
1 parent 619249a commit a73254f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/commands/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ export const getConfig = (): ConfigType | null => {
OCO_MODEL: process.env.OCO_MODEL || 'gpt-3.5-turbo-16k',
OCO_LANGUAGE: process.env.OCO_LANGUAGE || 'en',
OCO_MESSAGE_TEMPLATE_PLACEHOLDER:
process.env.OCO_MESSAGE_TEMPLATE_PLACEHOLDER || '$msg'
process.env.OCO_MESSAGE_TEMPLATE_PLACEHOLDER || '$msg',
OCO_GITPUSH: process.env.OCO_GITPUSH === 'false' ? false : true
};

const configExists = existsSync(configPath);
Expand Down

0 comments on commit a73254f

Please sign in to comment.