@yemi33/minions 0.1.41 → 0.1.42
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 +5 -0
- package/dashboard.js +19 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dashboard.js
CHANGED
|
@@ -2935,11 +2935,27 @@ What would you like to discuss or change? When you're happy, say "approve" and I
|
|
|
2935
2935
|
|
|
2936
2936
|
if (prs.some(p => p.id === prId || p.url === url)) return jsonReply(res, 400, { error: 'PR already tracked' });
|
|
2937
2937
|
|
|
2938
|
+
// Auto-detect PR metadata from GitHub
|
|
2939
|
+
let prTitle = title || '';
|
|
2940
|
+
let prAuthor = '';
|
|
2941
|
+
let prBranch = '';
|
|
2942
|
+
const ghMatch = url.match(/github\.com\/([^/]+)\/([^/]+)\/pull\/(\d+)/);
|
|
2943
|
+
if (ghMatch && !prTitle) {
|
|
2944
|
+
try {
|
|
2945
|
+
const { execSync } = require('child_process');
|
|
2946
|
+
const json = execSync(`gh pr view ${ghMatch[3]} --repo ${ghMatch[1]}/${ghMatch[2]} --json title,author,headRefName`, { encoding: 'utf8', timeout: 10000, windowsHide: true });
|
|
2947
|
+
const data = JSON.parse(json);
|
|
2948
|
+
prTitle = data.title || prTitle;
|
|
2949
|
+
prAuthor = data.author?.login || '';
|
|
2950
|
+
prBranch = data.headRefName || '';
|
|
2951
|
+
} catch {}
|
|
2952
|
+
}
|
|
2953
|
+
|
|
2938
2954
|
prs.push({
|
|
2939
2955
|
id: prId,
|
|
2940
|
-
title: (
|
|
2941
|
-
agent: 'human',
|
|
2942
|
-
branch:
|
|
2956
|
+
title: (prTitle || 'Linked PR #' + prNum).slice(0, 120),
|
|
2957
|
+
agent: prAuthor || 'human',
|
|
2958
|
+
branch: prBranch,
|
|
2943
2959
|
reviewStatus: autoObserve ? 'pending' : 'none',
|
|
2944
2960
|
status: autoObserve ? 'active' : 'linked',
|
|
2945
2961
|
created: new Date().toISOString().slice(0, 10),
|
package/package.json
CHANGED