Skip to content

Added options to apply or remove labels from source rule app#128

Closed
zkemppel-InRule wants to merge 1 commit into
masterfrom
feature/add-or-remove-labels-from-source
Closed

Added options to apply or remove labels from source rule app#128
zkemppel-InRule wants to merge 1 commit into
masterfrom
feature/add-or-remove-labels-from-source

Conversation

@zkemppel-InRule

Copy link
Copy Markdown

No description provided.

Copilot AI review requested due to automatic review settings June 23, 2026 20:31

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the PromoteRuleApp command-line tool to support optionally applying or removing labels on the source Rule App as part of the promotion workflow, and refactors source Rule App retrieval to use RuleCatalogConnection APIs.

Changes:

  • Added CLI options to apply (-ApplyLabelToSource) and remove (-RemoveLabelFromSource) labels on the source catalog after promotion.
  • Switched source Rule App retrieval from CatalogRuleApplicationReference to RuleCatalogConnection methods (latest revision vs. by-label).
  • Updated catalog connection creation to explicitly use RuleCatalogAuthenticationType.BuiltIn.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

string ruleAppName = null;
string label = "LIVE";
string comment = "";
string label = null;
}
else
{
var sourceCatCon = new RuleCatalogConnection(new Uri(sourceCatalogUrl), TimeSpan.FromSeconds(60), sourceCatalogUsername, sourceCatalogPassword, RuleCatalogAuthenticationType.BuiltIn);
Comment on lines +99 to +109
destCatCon.PromoteRuleApplication(sourceRuleAppDef, comment);

if (!string.IsNullOrEmpty(applyLabelToSource))
{
sourceCatCon.ApplyLabel(sourceRuleAppDef, applyLabelToSource);
}

if (!string.IsNullOrEmpty(removeLabelFromSource))
{
sourceCatCon.RemoveLabel(sourceRuleAppDef.Guid, removeLabelFromSource);
}
@zkemppel-InRule zkemppel-InRule deleted the feature/add-or-remove-labels-from-source branch June 23, 2026 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants