@yemi33/minions 0.1.2139 → 0.1.2140

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/engine/github.js +20 -5
  2. package/package.json +1 -1
package/engine/github.js CHANGED
@@ -99,6 +99,20 @@ function getRepoSlug(project) {
99
99
  return `${org}/${repo}`;
100
100
  }
101
101
 
102
+ function getConfiguredGitHubAuthorLogins(config = {}) {
103
+ const accounts = config?.engine?.ghAccounts;
104
+ if (!accounts || typeof accounts !== 'object') return new Set();
105
+ const logins = new Set();
106
+ for (const value of Object.values(accounts)) {
107
+ const values = Array.isArray(value) ? value : [value];
108
+ for (const login of values) {
109
+ const normalized = String(login || '').trim().toLowerCase();
110
+ if (normalized) logins.add(normalized);
111
+ }
112
+ }
113
+ return logins;
114
+ }
115
+
102
116
  // P-f23classifier (F4): delegates to the host-agnostic VERDICT prefix check
103
117
  // in engine/comment-classifier.js. The literal regex used to live here;
104
118
  // extraction allowed F4 (Wave 3) to tighten the prefix in a single place.
@@ -1222,6 +1236,7 @@ async function pollPrHumanComments(config) {
1222
1236
  async function reconcilePrs(config) {
1223
1237
  const projects = getProjects(config).filter(isGitHub);
1224
1238
  const branchPatterns = [/^work\//i, /^feat\//i, /^fix\//i, /^e2e\//i, /^user\/yemishin\//i];
1239
+ const configuredAuthorLogins = getConfiguredGitHubAuthorLogins(config);
1225
1240
  let totalAdded = 0;
1226
1241
 
1227
1242
  for (const project of projects) {
@@ -1322,11 +1337,11 @@ async function reconcilePrs(config) {
1322
1337
  continue;
1323
1338
  }
1324
1339
 
1325
- // E2E branches are always Minions-generated (verify tasks) track even without a work item ID in the branch name
1326
- const isE2eBranch = /^e2e\//i.test(branch);
1327
-
1328
- // Only auto-track PRs linked to a minions work item — skip human-authored PRs
1329
- if (!confirmedItemId && !isE2eBranch) continue;
1340
+ // Auto-import only when local state proves this branch belongs to a
1341
+ // Minions work item and the PR was opened by one of this client's
1342
+ // configured GitHub accounts. Existing/manual records are handled above.
1343
+ const authorLogin = String(ghPr.user?.login || '').trim().toLowerCase();
1344
+ if (!confirmedItemId || !configuredAuthorLogins.has(authorLogin)) continue;
1330
1345
 
1331
1346
  const entry = {
1332
1347
  id: prId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.2139",
3
+ "version": "0.1.2140",
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"