@yemi33/minions 0.1.97 → 0.1.98
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 +6 -0
- package/engine/ado.js +4 -1
- package/engine/github.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/engine/ado.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Extracted from engine.js: ADO token management, PR status polling, human comment polling.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
const path = require('path');
|
|
6
7
|
const shared = require('./shared');
|
|
7
8
|
const { exec, getAdoOrgBase, addPrLink } = shared;
|
|
8
9
|
const { getPrs } = require('./queries');
|
|
@@ -26,6 +27,8 @@ function getAdoToken() {
|
|
|
26
27
|
// If recent fetch failed, don't retry until backoff expires (avoids repeated browser popups)
|
|
27
28
|
if (Date.now() < _adoTokenFailedUntil) return null;
|
|
28
29
|
try {
|
|
30
|
+
// azureauth supports multiple --mode flags as an ordered fallback chain:
|
|
31
|
+
// tries IWA (Integrated Windows Auth) first, falls back to broker if unavailable.
|
|
29
32
|
const token = exec('azureauth ado token --mode iwa --mode broker --output token --timeout 1', {
|
|
30
33
|
timeout: 15000, encoding: 'utf-8', stdio: ['pipe', 'pipe', 'pipe'], windowsHide: true }).trim();
|
|
31
34
|
if (token && token.startsWith('eyJ')) {
|
|
@@ -338,7 +341,7 @@ async function reconcilePrs(config) {
|
|
|
338
341
|
// Load work items to match branches to work item IDs
|
|
339
342
|
const wiPath = shared.projectWorkItemsPath(project);
|
|
340
343
|
const workItems = shared.safeJson(wiPath) || [];
|
|
341
|
-
const centralWiPath =
|
|
344
|
+
const centralWiPath = path.join(shared.MINIONS_DIR, 'work-items.json');
|
|
342
345
|
const centralItems = shared.safeJson(centralWiPath) || [];
|
|
343
346
|
const allItems = [...workItems, ...centralItems];
|
|
344
347
|
|
package/engine/github.js
CHANGED
|
@@ -239,7 +239,7 @@ async function pollPrHumanComments(config) {
|
|
|
239
239
|
const reviewComments = ghApi(`/pulls/${prNum}/comments`, slug);
|
|
240
240
|
const allComments = [
|
|
241
241
|
...(comments || []).map(c => ({ ...c, _type: 'issue' })),
|
|
242
|
-
...((reviewComments
|
|
242
|
+
...(Array.isArray(reviewComments) ? reviewComments : []).map(c => ({ ...c, _type: 'review' }))
|
|
243
243
|
];
|
|
244
244
|
|
|
245
245
|
// Filter out bot comments and minions's own comments
|
package/package.json
CHANGED