@yemi33/minions 0.1.1730 → 0.1.1731

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/CHANGELOG.md CHANGED
@@ -1,8 +1,9 @@
1
1
  # Changelog
2
2
 
3
- ## 0.1.1730 (2026-05-05)
3
+ ## 0.1.1731 (2026-05-05)
4
4
 
5
5
  ### Features
6
+ - fix project discovery main branch fallback (#2085)
6
7
  - detect no-op PR fixes (#2077)
7
8
 
8
9
  ## 0.1.1728 (2026-05-05)
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "runtime": "copilot",
3
3
  "models": null,
4
- "cachedAt": "2026-05-05T09:50:02.177Z"
4
+ "cachedAt": "2026-05-05T09:51:05.191Z"
5
5
  }
@@ -245,23 +245,33 @@ function execGit(execFileSync, targetDir, args, timeout = 5000) {
245
245
  })).trim();
246
246
  }
247
247
 
248
+ function parseOriginHeadBranch(headRef) {
249
+ const branch = String(headRef || '').trim().replace(/^refs\/remotes\/origin\//, '');
250
+ return branch && branch !== 'HEAD' ? branch : '';
251
+ }
252
+
253
+ function discoverMainBranch(execFileSync, targetDir) {
254
+ try {
255
+ return parseOriginHeadBranch(execGit(execFileSync, targetDir, ['symbolic-ref', 'refs/remotes/origin/HEAD']));
256
+ } catch {}
257
+
258
+ try {
259
+ execGit(execFileSync, targetDir, ['remote', 'set-head', 'origin', '-a'], 10000);
260
+ return parseOriginHeadBranch(execGit(execFileSync, targetDir, ['symbolic-ref', 'refs/remotes/origin/HEAD']));
261
+ } catch {}
262
+
263
+ return '';
264
+ }
265
+
248
266
  function discoverProjectMetadata(targetDir, options = {}) {
249
267
  const execFileSync = options.execFileSync || defaultExecFileSync;
250
268
  const result = { _found: [] };
251
269
 
252
- try {
253
- let head = '';
254
- try {
255
- head = execGit(execFileSync, targetDir, ['symbolic-ref', 'refs/remotes/origin/HEAD']);
256
- } catch {
257
- head = execGit(execFileSync, targetDir, ['symbolic-ref', 'HEAD']);
258
- }
259
- const branch = head.replace('refs/remotes/origin/', '').replace('refs/heads/', '');
260
- if (branch) {
261
- result.mainBranch = branch;
262
- result._found.push('main branch');
263
- }
264
- } catch {}
270
+ const branch = discoverMainBranch(execFileSync, targetDir);
271
+ if (branch) {
272
+ result.mainBranch = branch;
273
+ result._found.push('main branch');
274
+ }
265
275
 
266
276
  try {
267
277
  const remoteUrl = execGit(execFileSync, targetDir, ['remote', 'get-url', 'origin']);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.1730",
3
+ "version": "0.1.1731",
4
4
  "description": "Multi-agent AI dev team that runs from ~/.minions/ — five autonomous agents share a single engine, dashboard, and knowledge base",
5
5
  "bin": {
6
6
  "minions": "bin/minions.js"