mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 15:10:52 +00:00
fix: honor explicit CI timing run id
This commit is contained in:
@@ -173,6 +173,15 @@ async function main() {
|
|||||||
const args = process.argv.slice(2);
|
const args = process.argv.slice(2);
|
||||||
const recentIndex = args.indexOf("--recent");
|
const recentIndex = args.indexOf("--recent");
|
||||||
const limitIndex = args.indexOf("--limit");
|
const limitIndex = args.indexOf("--limit");
|
||||||
|
const ignoredArgIndexes = new Set();
|
||||||
|
if (limitIndex !== -1) {
|
||||||
|
ignoredArgIndexes.add(limitIndex);
|
||||||
|
ignoredArgIndexes.add(limitIndex + 1);
|
||||||
|
}
|
||||||
|
if (recentIndex !== -1) {
|
||||||
|
ignoredArgIndexes.add(recentIndex);
|
||||||
|
ignoredArgIndexes.add(recentIndex + 1);
|
||||||
|
}
|
||||||
const limit =
|
const limit =
|
||||||
limitIndex === -1 ? 15 : Math.max(1, Number.parseInt(args[limitIndex + 1] ?? "", 10) || 15);
|
limitIndex === -1 ? 15 : Math.max(1, Number.parseInt(args[limitIndex + 1] ?? "", 10) || 15);
|
||||||
if (recentIndex !== -1) {
|
if (recentIndex !== -1) {
|
||||||
@@ -196,14 +205,7 @@ async function main() {
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const runId =
|
const runId = args.find((_arg, index) => !ignoredArgIndexes.has(index)) ?? getLatestCiRunId();
|
||||||
args.find(
|
|
||||||
(arg, index) =>
|
|
||||||
index !== limitIndex &&
|
|
||||||
index !== limitIndex + 1 &&
|
|
||||||
index !== recentIndex &&
|
|
||||||
index !== recentIndex + 1,
|
|
||||||
) ?? getLatestCiRunId();
|
|
||||||
const summary = summarizeRunTimings(loadRun(runId), limit);
|
const summary = summarizeRunTimings(loadRun(runId), limit);
|
||||||
|
|
||||||
console.log(
|
console.log(
|
||||||
|
|||||||
Reference in New Issue
Block a user