Skip to content

hardis:project:replacement:delete

Description

Command Behavior (Beta)

This command is currently in Beta. Please report any issues or feedback on the sfdx-hardis GitHub repository.

Removes a replacement rule, or an override of a rule, from one place (project config, branch config file or git provider issue).

Removing an override from the issue gives back the rule of the repository: this is how a temporary fix made in the issue is undone. Removing the override of a built-in rule turns it back to its default state.

See Replacement rules for the full reference.

Agent Mode

Supports non-interactive execution with --agent:

sf hardis:project:replacement:delete --agent --layer issue --id partner-site-admin

Required in agent mode: --layer (and --branch with --layer branch) and --id. The confirmation prompt is skipped.

Technical explanations
  • Project and branch rules are rewritten with js-yaml, keeping every other key; the replacementRules key is removed when it becomes empty.
  • Issue rules are the YAML block of the issue body; the issue itself is kept.

Parameters

Name Type Description Default Required Options
agent boolean Run in non-interactive mode for agents and automation
branch option Major branch of the branch config file, with --layer branch
debug
-d
boolean Activate debug mode (more logs)
flags-dir option Import flag values from a directory.
id option Id of the rule to remove
json boolean Format output as json.
layer option Where the rule is stored: project (config/.sfdx-hardis.yml), branch (config/branches/.sfdx-hardis..yml) or issue (git provider issue, no commit needed) project
branch
issue
websocket option Websocket host:port for VsCode SFDX Hardis UI integration

Examples

$ sf hardis:project:replacement:delete
$ sf hardis:project:replacement:delete --agent --layer issue --id partner-site-admin
$ sf hardis:project:replacement:delete --agent --layer branch --branch uat --id uat-hide-case-actions

Comments