@in-the-loop-labs/pair-review 3.1.1 → 3.1.2
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": "pair-review",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.2",
|
|
4
4
|
"description": "pair-review app integration — Open PRs and local changes in the pair-review web UI, run server-side AI analysis, and address review feedback. Requires the pair-review MCP server.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "in-the-loop-labs",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "code-critic",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.2",
|
|
4
4
|
"description": "AI-powered code review analysis — Run three-level AI analysis and implement-review-fix loops directly in your coding agent. Works standalone, no server required.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "in-the-loop-labs",
|
package/src/github/parser.js
CHANGED
|
@@ -30,7 +30,7 @@ class PRArgumentParser {
|
|
|
30
30
|
// Check if input is a PR number
|
|
31
31
|
const prNumber = parseInt(input);
|
|
32
32
|
if (isNaN(prNumber) || prNumber <= 0) {
|
|
33
|
-
throw new Error('Invalid input format. Expected: PR number, GitHub URL (https://github.com/owner/repo/pull/number), Graphite URL (https://app.graphite.com/github/pr/owner/repo/number), or pair-review:// URL');
|
|
33
|
+
throw new Error('Invalid input format. Expected: PR number, GitHub URL (https://github.com/owner/repo/pull/number), Graphite URL (https://app.graphite.com/github/pr/owner/repo/number or https://app.graphite.com/github/owner/repo/pull/number), or pair-review:// URL');
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
// Parse repository from current directory's git remote
|
|
@@ -112,14 +112,18 @@ class PRArgumentParser {
|
|
|
112
112
|
* @returns {Object} Parsed information { owner, repo, number }
|
|
113
113
|
*/
|
|
114
114
|
parseGraphiteURL(url) {
|
|
115
|
-
// Match Graphite PR URL
|
|
116
|
-
|
|
115
|
+
// Match Graphite PR URL patterns:
|
|
116
|
+
// https://app.graphite.{dev|com}/github/pr/owner/repo/number[/optional-title]
|
|
117
|
+
// https://app.graphite.{dev|com}/github/owner/repo/pull/number[/optional-title]
|
|
118
|
+
const match = url.match(/^https:\/\/app\.graphite\.(?:dev|com)\/github\/(?:pr\/([^\/]+)\/([^\/]+)\/(\d+)|([^\/]+)\/([^\/]+)\/pull\/(\d+))(?:\/[^?]*)?(?:\?.*)?$/);
|
|
117
119
|
|
|
118
120
|
if (!match) {
|
|
119
|
-
throw new Error('Invalid Graphite URL format. Expected: https://app.graphite.com/github/pr/owner/repo/number');
|
|
121
|
+
throw new Error('Invalid Graphite URL format. Expected: https://app.graphite.com/github/pr/owner/repo/number or https://app.graphite.com/github/owner/repo/pull/number');
|
|
120
122
|
}
|
|
121
123
|
|
|
122
|
-
const
|
|
124
|
+
const owner = match[1] || match[4];
|
|
125
|
+
const repo = match[2] || match[5];
|
|
126
|
+
const numberStr = match[3] || match[6];
|
|
123
127
|
return this._createPRInfo(owner, repo, numberStr, 'Graphite');
|
|
124
128
|
}
|
|
125
129
|
|
|
@@ -156,7 +160,7 @@ class PRArgumentParser {
|
|
|
156
160
|
? 'https://github.com/owner/repo/pull/number'
|
|
157
161
|
: source === 'pair-review://'
|
|
158
162
|
? 'pair-review://pr/owner/repo/number'
|
|
159
|
-
: 'https://app.graphite.com/github/pr/owner/repo/number';
|
|
163
|
+
: 'https://app.graphite.com/github/pr/owner/repo/number or https://app.graphite.com/github/owner/repo/pull/number';
|
|
160
164
|
throw new Error(`Invalid ${source} URL format. Expected: ${exampleUrl}`);
|
|
161
165
|
}
|
|
162
166
|
|