automata-cli 0.1.0-feature-142-conductor-automatic.563 → 0.1.0-feature-142-conductor-automatic.565

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/dist/index.js +17 -13
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -8718,7 +8718,7 @@ function renderCopilotBlock(number, threads, agentUser) {
8718
8718
  const first = thread.comments[0];
8719
8719
  const link = thread.url === null ? "" : ` (${thread.url})`;
8720
8720
  return `- ${location}${link}
8721
- ${first.author}: ${first.body.trim().split("\n").join("\n ")}`;
8721
+ ${first.author}: ${first.body.trim().replaceAll("\n", "\n ")}`;
8722
8722
  });
8723
8723
  return [
8724
8724
  `Open Copilot review comments on pull request #${String(number)}:`,
@@ -9003,19 +9003,23 @@ function parseInterval(raw) {
9003
9003
  return Number(raw);
9004
9004
  }
9005
9005
  async function runAutomatic(loop) {
9006
- while (!loop.stopped()) {
9007
- const result = await loop.tick();
9008
- if (result.open === 0) {
9009
- loop.log("Conductor: no open item is watched any more; leaving the loop.");
9010
- return 0;
9011
- }
9012
- if (loop.stopped()) break;
9013
- if (result.code !== 0) loop.log(`Conductor: the tick ended with exit code ${String(result.code)}; the next tick runs anyway.`);
9014
- loop.log(`Conductor: next tick in ${String(loop.intervalSeconds)} s.`);
9015
- await loop.sleep(loop.intervalSeconds);
9006
+ if (loop.stopped()) {
9007
+ loop.log("Conductor: stopped.");
9008
+ return 0;
9016
9009
  }
9017
- loop.log("Conductor: stopped.");
9018
- return 0;
9010
+ const result = await loop.tick();
9011
+ if (result.open === 0) {
9012
+ loop.log("Conductor: no open item is watched any more; leaving the loop.");
9013
+ return 0;
9014
+ }
9015
+ if (loop.stopped()) {
9016
+ loop.log("Conductor: stopped.");
9017
+ return 0;
9018
+ }
9019
+ if (result.code !== 0) loop.log(`Conductor: the tick ended with exit code ${String(result.code)}; the next tick runs anyway.`);
9020
+ loop.log(`Conductor: next tick in ${String(loop.intervalSeconds)} s.`);
9021
+ await loop.sleep(loop.intervalSeconds);
9022
+ return runAutomatic(loop);
9019
9023
  }
9020
9024
 
9021
9025
  // src/conductor/reply.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "automata-cli",
3
- "version": "0.1.0-feature-142-conductor-automatic.563",
3
+ "version": "0.1.0-feature-142-conductor-automatic.565",
4
4
  "description": "Automata CLI tool",
5
5
  "type": "module",
6
6
  "engines": {