@codacy/gate-cli 0.14.0 → 0.14.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/bin/gate.js +6 -5
  2. package/package.json +1 -1
package/bin/gate.js CHANGED
@@ -12053,11 +12053,12 @@ function isGitOnlyPrompt(prompt) {
12053
12053
  if (CODE_AUTHORING_PATTERN.test(prompt)) return false;
12054
12054
  return true;
12055
12055
  }
12056
- function detectAnalysisMode(noFilesChanged, assistantResponse, conversationPrompts) {
12056
+ function detectAnalysisMode(noFilesChanged, assistantResponse, conversationPrompts, actionSummary) {
12057
+ const agentAuthoredCode = !!(actionSummary && (actionSummary.files_edited.length > 0 || actionSummary.files_created.length > 0));
12057
12058
  if (conversationPrompts.length > 0 && conversationPrompts.every(isGitOnlyPrompt)) {
12058
- return "skip";
12059
+ if (!agentAuthoredCode) return "skip";
12059
12060
  }
12060
- if (noFilesChanged && !!assistantResponse) {
12061
+ if (noFilesChanged && !!assistantResponse && !agentAuthoredCode) {
12061
12062
  return "plan";
12062
12063
  }
12063
12064
  for (const prompt of conversationPrompts) {
@@ -12319,7 +12320,7 @@ async function runAnalyze(opts, globals) {
12319
12320
  const specs = discoverSpecs();
12320
12321
  const plans = discoverPlans();
12321
12322
  const conversationPrompts = (conversation?.prompts ?? []).map((p) => p.prompt);
12322
- let analysisMode = detectAnalysisMode(noFilesChanged, assistantResponse, conversationPrompts);
12323
+ let analysisMode = detectAnalysisMode(noFilesChanged, assistantResponse, conversationPrompts, actionSummary);
12323
12324
  if (analysisMode === "skip") {
12324
12325
  passAndExit("Git operation only \u2014 no code authored to analyze");
12325
12326
  }
@@ -12834,7 +12835,7 @@ function registerInitCommand(program2) {
12834
12835
  }
12835
12836
 
12836
12837
  // src/cli.ts
12837
- program.name("gate").description("CLI for GATE.md quality gate service").version("0.14.0").option("--token <token>", "Override authentication token").option("--service-url <url>", "Override service URL").option("--verbose", "Log HTTP requests/responses to stderr");
12838
+ program.name("gate").description("CLI for GATE.md quality gate service").version("0.14.1").option("--token <token>", "Override authentication token").option("--service-url <url>", "Override service URL").option("--verbose", "Log HTTP requests/responses to stderr");
12838
12839
  registerAuthCommands(program);
12839
12840
  registerHooksCommands(program);
12840
12841
  registerIntentCommands(program);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codacy/gate-cli",
3
- "version": "0.14.0",
3
+ "version": "0.14.1",
4
4
  "description": "CLI for GATE.md quality gate service",
5
5
  "bin": {
6
6
  "gate": "./bin/gate.js"