@dunnewold-labs/mr-manager 0.4.29 → 0.4.31

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/dist/index.mjs +2 -31
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -185,7 +185,7 @@ import { fileURLToPath } from "url";
185
185
  // cli/package.json
186
186
  var package_default = {
187
187
  name: "@dunnewold-labs/mr-manager",
188
- version: "0.4.29",
188
+ version: "0.4.31",
189
189
  description: "Mr. Manager - Task and project management CLI",
190
190
  bin: {
191
191
  mr: "./dist/index.mjs"
@@ -1162,19 +1162,6 @@ function taskLikelyDoesNotNeedCodeChanges(task) {
1162
1162
  return NON_CODE_TASK_KEYWORDS.some((keyword) => haystack.includes(keyword)) || NON_CODE_TASK_PATTERNS.some((pattern) => pattern.test(haystack));
1163
1163
  }
1164
1164
 
1165
- // lib/task-branch.ts
1166
- function isPrOrMrUrl(input) {
1167
- try {
1168
- const url = new URL(input.trim());
1169
- const path = url.pathname;
1170
- if (url.hostname.includes("github") && /\/pull\/\d+/.test(path)) return true;
1171
- if (url.hostname.includes("gitlab") && /\/merge_requests\/\d+/.test(path)) return true;
1172
- } catch {
1173
- return false;
1174
- }
1175
- return false;
1176
- }
1177
-
1178
1165
  // cli/browse-runner.ts
1179
1166
  import { execSync as execSync3, spawn as spawn3 } from "child_process";
1180
1167
  import { existsSync as existsSync6 } from "fs";
@@ -1495,15 +1482,6 @@ function taskBranchName(task) {
1495
1482
  }
1496
1483
  return `${ownerPrefix(task)}/${slugify(task.title)}`;
1497
1484
  }
1498
- function resolveBranchFromPrUrl(prUrl, repoDir, vcs) {
1499
- const cmd = vcs === "gitlab" ? `glab mr view "${prUrl}" --output json 2>/dev/null | jq -r '.source_branch // empty'` : `gh pr view "${prUrl}" --json headRefName -q .headRefName 2>/dev/null`;
1500
- return new Promise((resolve9) => {
1501
- exec(cmd, { cwd: repoDir }, (err, stdout) => {
1502
- const branch = stdout?.trim();
1503
- resolve9(branch || null);
1504
- });
1505
- });
1506
- }
1507
1485
  function formatElapsed(ms) {
1508
1486
  const totalMinutes = Math.max(1, Math.floor(ms / 6e4));
1509
1487
  const hours = Math.floor(totalMinutes / 60);
@@ -2708,17 +2686,10 @@ var watchCommand = new Command8("watch").description(
2708
2686
  const sid = shortId(task.id);
2709
2687
  const slug = slugify(task.title);
2710
2688
  const owner = ownerPrefix(task);
2711
- let branchName = taskBranchName(task);
2689
+ const branchName = taskBranchName(task);
2712
2690
  const legacyBranchName = `mr/${sid}/${slug}`;
2713
2691
  const prefix = taskTag(sid);
2714
2692
  const vcs = detectVcs(repoDir)?.provider ?? "github";
2715
- if (!task.attachedBranch?.trim() && task.attachedBranchLink && isPrOrMrUrl(task.attachedBranchLink)) {
2716
- const resolved = await resolveBranchFromPrUrl(task.attachedBranchLink, repoDir, vcs);
2717
- if (resolved) {
2718
- branchName = resolved;
2719
- logInfo(prefix, `Resolved branch ${paint("cyan", resolved)} from attached ${vcs === "gitlab" ? "MR" : "PR"}`);
2720
- }
2721
- }
2722
2693
  logDispatch(prefix, `"${paint("bold", task.title)}" ${paint("gray", repoDir)} ${paint("dim", `[${vcs}]`)}`);
2723
2694
  await postTaskUpdate(task.id, `Agent dispatched \u2014 starting work on "${task.title}"`, "system");
2724
2695
  let subtasks = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dunnewold-labs/mr-manager",
3
- "version": "0.4.29",
3
+ "version": "0.4.31",
4
4
  "description": "Mr. Manager - Task and project management CLI",
5
5
  "bin": {
6
6
  "mr": "./dist/index.mjs"