Skip to content

Commit

Permalink
chore: ignore conflicts on push setting
Browse files Browse the repository at this point in the history
  • Loading branch information
CristiCanizales committed Jan 26, 2024
1 parent 6c494c7 commit 5b5803b
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions packages/salesforcedx-vscode-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -924,10 +924,10 @@
"default": false,
"description": "%setting_clear_output_tab_description%"
},
"salesforcedx-vscode-core.push-or-deploy-on-save.overrideConflictsOnPush": {
"salesforcedx-vscode-core.push-or-deploy-on-save.ignoreConflictsOnPush": {
"type": "boolean",
"default": false,
"description": "%override_conflicts_on_push_description%"
"description": "%ignore_conflicts_on_push_description%"
},
"salesforcedx-vscode-core.show-cli-success-msg": {
"type": "boolean",
Expand Down
2 changes: 1 addition & 1 deletion packages/salesforcedx-vscode-core/package.nls.ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"org_logout_all_text": "SFDX: すべての認証済み組織からログアウト",
"org_logout_default_text": "SFDX: Log Out from Default Org",
"org_open_default_scratch_org_text": "SFDX: デフォルトの組織を開く",
"override_conflicts_on_push_description": "保存時の project:deploy:start コマンド実行時に、常に --forceoverwrite オプションを使用するかどうかを指定します。",
"ignore_conflicts_on_push_description": "保存時の project:deploy:start コマンド実行時に、常に --ignore-conflicts オプションを使用するかどうかを指定します。",
"project_generate_text": "SFDX: プロジェクトを作成",
"project_generate_with_manifest_text": "SFDX: マニフェストファイルを使用してプロジェクトを作成",
"push_or_deploy_on_save_enabled_description": "ローカルのソースファイルを保存した際に、自動的に project:deploy:start コマンド (ソースが追跡される組織) または、force:source:deploy コマンド (ソースが追跡されない組織) を実行するかどうかを指定します。",
Expand Down
2 changes: 1 addition & 1 deletion packages/salesforcedx-vscode-core/package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"org_logout_all_text": "SFDX: Log Out from All Authorized Orgs",
"org_logout_default_text": "SFDX: Log Out from Default Org",
"org_open_default_scratch_org_text": "SFDX: Open Default Org",
"override_conflicts_on_push_description": "Specifies whether to always use --forceoverwrite when you run project:deploy:start on save",
"ignore_conflicts_on_push_description": "Specifies whether to always use --ignore-conflicts when you run project:deploy:start on save",
"prefer_deploy_on_save_enabled_description": "Specifies whether to always run deploy instead of push when a local source file is saved and `Push or deploy on save` is enabled.",
"project_generate_text": "SFDX: Create Project",
"project_generate_with_manifest_text": "SFDX: Create Project with Manifest",
Expand Down
4 changes: 2 additions & 2 deletions packages/salesforcedx-vscode-core/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ export const INTERNAL_DEVELOPMENT_FLAG = 'internal-development';
export const PUSH_OR_DEPLOY_ON_SAVE_ENABLED = 'push-or-deploy-on-save.enabled';
export const PREFER_DEPLOY_ON_SAVE_ENABLED =
'push-or-deploy-on-save.preferDeployOnSave';
export const PUSH_OR_DEPLOY_ON_SAVE_OVERRIDE_CONFLICTS =
'push-or-deploy-on-save.overrideConflictsOnPush';
export const PUSH_OR_DEPLOY_ON_SAVE_IGNORE_CONFLICTS =
'push-or-deploy-on-save.ignoreConflictsOnPush';
export const RETRIEVE_TEST_CODE_COVERAGE = 'retrieve-test-code-coverage';
export const SHOW_CLI_SUCCESS_INFO_MSG = 'show-cli-success-msg';
export const TELEMETRY_ENABLED = 'telemetry.enabled';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export class DeployQueue {

private async executePushCommand() {
const ignoreConflictsCommand =
sfdxCoreSettings.getPushOrDeployOnSaveOverrideConflicts()
sfdxCoreSettings.getPushOrDeployOnSaveIgnoreConflicts()
? '.ignore.conflicts'
: '';
const command = `sfdx.project.deploy.start${ignoreConflictsCommand}`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
ENV_SF_LOG_LEVEL,
PREFER_DEPLOY_ON_SAVE_ENABLED,
PUSH_OR_DEPLOY_ON_SAVE_ENABLED,
PUSH_OR_DEPLOY_ON_SAVE_OVERRIDE_CONFLICTS,
PUSH_OR_DEPLOY_ON_SAVE_IGNORE_CONFLICTS,
RETRIEVE_TEST_CODE_COVERAGE,
SHOW_CLI_SUCCESS_INFO_MSG,
TELEMETRY_ENABLED
Expand Down Expand Up @@ -65,9 +65,9 @@ export class SfdxCoreSettings {
return this.getConfigValue<boolean>(PUSH_OR_DEPLOY_ON_SAVE_ENABLED, false);
}

public getPushOrDeployOnSaveOverrideConflicts(): boolean {
public getPushOrDeployOnSaveIgnoreConflicts(): boolean {
return this.getConfigValue<boolean>(
PUSH_OR_DEPLOY_ON_SAVE_OVERRIDE_CONFLICTS,
PUSH_OR_DEPLOY_ON_SAVE_IGNORE_CONFLICTS,
false
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,12 +191,12 @@ describe('Push or Deploy on Save', () => {
expect(appendLineStub.getCall(0).args[0]).to.equal(error);
});

it('should call project:deploy:start when getPushOrDeployOnSaveOverrideConflicts is false', async () => {
it('should call project:deploy:start when getPushOrDeployOnSaveIgnoreConflicts is false', async () => {
getWorkspaceOrgTypeStub.resolves(OrgType.SourceTracked);
sandbox
.stub(
SfdxCoreSettings.prototype,
'getPushOrDeployOnSaveOverrideConflicts'
'getPushOrDeployOnSaveIgnoreConflicts'
)
.returns(false);

Expand All @@ -210,12 +210,12 @@ describe('Push or Deploy on Save', () => {
expect(appendLineStub.calledOnce).to.be.false;
});

it('should call project:deploy:start --ignore-conflicts when getPushOrDeployOnSaveOverrideConflicts is true', async () => {
it('should call project:deploy:start --ignore-conflicts when getPushOrDeployOnSaveIgnoreConflicts is true', async () => {
getWorkspaceOrgTypeStub.resolves(OrgType.SourceTracked);
sandbox
.stub(
SfdxCoreSettings.prototype,
'getPushOrDeployOnSaveOverrideConflicts'
'getPushOrDeployOnSaveIgnoreConflicts'
)
.returns(true);

Expand Down

0 comments on commit 5b5803b

Please sign in to comment.