Skip to content

Commit d2146b8

Browse files
committed
Review comments
1 parent 15e81cf commit d2146b8

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

src/index.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,14 +125,22 @@ async function runAugmentScript(inputs: ActionInputs): Promise<void> {
125125
args.push('--instruction', instruction_value);
126126
}
127127

128-
if (inputs.rules?.length) {
129-
for (const rulePath of inputs.rules) {
128+
const uniqueRules = Array.from(new Set(inputs.rules ?? [])).filter(rule => rule.length > 0);
129+
if (uniqueRules.length > 0) {
130+
logger.info(`🔧 Applying ${uniqueRules.length} rule file(s)`);
131+
for (const rulePath of uniqueRules) {
132+
logger.info(` - ${rulePath}`);
130133
args.push('--rules', rulePath);
131134
}
132135
}
133136

134-
if (inputs.mcpConfigs?.length) {
135-
for (const configPath of inputs.mcpConfigs) {
137+
const uniqueMcpConfigs = Array.from(new Set(inputs.mcpConfigs ?? [])).filter(
138+
config => config.length > 0
139+
);
140+
if (uniqueMcpConfigs.length > 0) {
141+
logger.info(`🧩 Applying ${uniqueMcpConfigs.length} MCP config file(s)`);
142+
for (const configPath of uniqueMcpConfigs) {
143+
logger.info(` - ${configPath}`);
136144
args.push('--mcp-config', configPath);
137145
}
138146
}

0 commit comments

Comments
 (0)