prr-kit 2.0.2 → 2.0.4

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prr-kit",
3
- "version": "2.0.2",
3
+ "version": "2.0.4",
4
4
  "description": "AI-driven Pull Request Review Kit — structured agent workflows for thorough, consistent code review",
5
5
  "main": "tools/cli/prr-cli.js",
6
6
  "bin": {
@@ -17,8 +17,6 @@ module.exports = {
17
17
  ['--user-name <name>', 'Name for agents to use'],
18
18
  ['--communication-language <lang>', 'Language for agent communication (default: English)'],
19
19
  ['--output-folder <path>', 'Output folder relative to project root (default: _prr-output)'],
20
- ['--target-repo <path>', 'Path to git repository to review (default: .)'],
21
- ['--github-repo <owner/repo>', 'GitHub repository for posting comments (optional)'],
22
20
  ['-y, --yes', 'Accept all defaults and skip prompts'],
23
21
  ],
24
22
  action: async (options) => {
@@ -63,6 +63,9 @@ class Installer {
63
63
  await fs.ensureDir(path.join(outputFolderAbs, 'reviews'));
64
64
  await prompts.log.info(' ✓ Output directories created');
65
65
 
66
+ // Update .gitignore
67
+ await this.updateGitignore(projectDir, config.outputFolder || '_prr-output');
68
+
66
69
  // Generate manifests
67
70
  const cfgDir = path.join(prrDir, '_config');
68
71
  await fs.ensureDir(cfgDir);
@@ -135,6 +138,23 @@ class Installer {
135
138
  }
136
139
  }
137
140
 
141
+ async updateGitignore(projectDir, outputFolder) {
142
+ const gitignorePath = path.join(projectDir, '.gitignore');
143
+ const entries = [`${PRR_FOLDER_NAME}/`, `${outputFolder}/`];
144
+
145
+ if (!(await fs.pathExists(gitignorePath))) return;
146
+
147
+ const content = await fs.readFile(gitignorePath, 'utf8');
148
+ const lines = content.split('\n').map((l) => l.trim());
149
+ const toAdd = entries.filter((e) => !lines.includes(e) && !lines.includes(e.replace(/\/$/, '')));
150
+
151
+ if (toAdd.length === 0) return;
152
+
153
+ const separator = content.endsWith('\n') ? '' : '\n';
154
+ await fs.appendFile(gitignorePath, `${separator}${toAdd.join('\n')}\n`, 'utf8');
155
+ await prompts.log.info(` ✓ .gitignore updated (${toAdd.join(', ')})`);
156
+ }
157
+
138
158
  async uninstall(projectDir) {
139
159
  const prrDir = path.join(projectDir, PRR_FOLDER_NAME);
140
160
  if (await fs.pathExists(prrDir)) {
@@ -65,15 +65,6 @@ class UI {
65
65
  || (!cliOptions.yes && await this._ask('Output folder (relative to project root)?', '_prr-output'))
66
66
  || '_prr-output';
67
67
 
68
- // PRR module config
69
- const targetRepo = cliOptions.targetRepo
70
- || (!cliOptions.yes && await this._ask('Path to the git repo to review?', '.'))
71
- || '.';
72
-
73
- const githubRepo = cliOptions.githubRepo
74
- || (!cliOptions.yes && await this._ask('GitHub repo for posting comments? (owner/repo, blank to skip)', ''))
75
- || '';
76
-
77
68
  // Modules (default: prr)
78
69
  const modulesInput = cliOptions.modules
79
70
  ? parseList(cliOptions.modules)
@@ -110,8 +101,6 @@ class UI {
110
101
  userName,
111
102
  communicationLanguage,
112
103
  outputFolder,
113
- targetRepo,
114
- githubRepo,
115
104
  selectedModules: modulesInput,
116
105
  selectedIdes,
117
106
  existing,