@warpmetrics/review 0.1.6 → 0.1.7

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/package.json +1 -1
  2. package/src/review.js +9 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@warpmetrics/review",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "type": "module",
5
5
  "description": "AI code reviewer that learns your codebase. Powered by WarpMetrics.",
6
6
  "bin": {
package/src/review.js CHANGED
@@ -130,12 +130,18 @@ export async function review(ctx) {
130
130
  }
131
131
  runRef = runDetail.id;
132
132
  } else {
133
- // Create new run
133
+ // Create new run (link as follow-up if warp-coder act ID found in PR body)
134
134
  if (wmAvailable) {
135
- runRef = run('warp-review', {
135
+ const actMatch = body.match(/<!-- wm:act:(wm_act_\w+) -->/);
136
+ const runOpts = {
136
137
  name: `${fullRepo}#${pr}`, repo: fullRepo, pr, pr_url: htmlUrl,
137
138
  pr_author: prAuthor, additions, deletions, changed_files: changedFiles, base_branch: baseBranch,
138
- });
139
+ };
140
+ if (actMatch) {
141
+ runRef = run(actMatch[1], 'warp-review', runOpts);
142
+ } else {
143
+ runRef = run('warp-review', runOpts);
144
+ }
139
145
  }
140
146
  }
141
147