@waron97/prbot 3.0.4 → 3.0.5
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/package.json
CHANGED
|
@@ -114,7 +114,7 @@ async function initPhase() {
|
|
|
114
114
|
// Resolve result objects — API may return IDs or full objects
|
|
115
115
|
let results = phase.allowed_phase_result_ids || [];
|
|
116
116
|
if (results.length > 0 && typeof results[0] === 'number') {
|
|
117
|
-
results = await getPhaseResults(token, ripUrl,
|
|
117
|
+
results = await getPhaseResults(token, ripUrl, results);
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
const code = generateCode(results);
|
package/src/agrippa/lib/api.js
CHANGED
|
@@ -48,11 +48,12 @@ function updateMfa(token, ripUrl, mfaId, code) {
|
|
|
48
48
|
return makeRequest('POST', '/symple.workflow/update_mfa', token, ripUrl, { id: mfaId, code });
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
async function getPhaseResults(token, ripUrl,
|
|
51
|
+
async function getPhaseResults(token, ripUrl, ids) {
|
|
52
|
+
if (!ids || ids.length === 0) return [];
|
|
52
53
|
try {
|
|
53
54
|
return await makeRequest(
|
|
54
55
|
'GET',
|
|
55
|
-
`/symple.triplet.phase.result/*?_filter_=[('
|
|
56
|
+
`/symple.triplet.phase.result/*?_filter_=[('id', 'in', [${ids.join(',')}])]`,
|
|
56
57
|
token,
|
|
57
58
|
ripUrl,
|
|
58
59
|
);
|
package/src/commands/ver.js
CHANGED
|
@@ -3,7 +3,7 @@ import fs from 'fs/promises';
|
|
|
3
3
|
import path from 'path';
|
|
4
4
|
import { resolveAddonsPath } from '../lib/addons.js';
|
|
5
5
|
|
|
6
|
-
async function verbot(module_name, level) {
|
|
6
|
+
async function verbot(module_name, level, opts = {}) {
|
|
7
7
|
if (!['major', 'minor', 'patch'].includes(level)) {
|
|
8
8
|
throw new Error('Level must be one of major, minor, patch');
|
|
9
9
|
}
|
|
@@ -52,6 +52,8 @@ async function verbot(module_name, level) {
|
|
|
52
52
|
await fs.writeFile(manifestPath, newContent);
|
|
53
53
|
console.log(`Updated version: ${currentVersion} -> ${newVersion}`);
|
|
54
54
|
|
|
55
|
+
if (opts.commit === false) return;
|
|
56
|
+
|
|
55
57
|
await new Promise((resolve, reject) => {
|
|
56
58
|
execFile('git', ['add', manifestPath], { cwd: ADDONS_PATH }, (error) => {
|
|
57
59
|
if (error) reject(error);
|