next-issue 12.3.0 → 12.4.0

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/summary.mjs +9 -2
  2. package/package.json +1 -1
package/dist/summary.mjs CHANGED
@@ -34,8 +34,15 @@ function issueLine(report) {
34
34
  }
35
35
  function duration(ms) {
36
36
  const seconds = Math.round(ms / 1000);
37
- const minutes = Math.floor(seconds / 60);
38
- return minutes === 0 ? `${seconds}s` : `${minutes}m${String(seconds % 60).padStart(2, '0')}s`;
37
+ if (seconds < 120) {
38
+ return seconds < 60 ? `${seconds}s` : `1m${String(seconds - 60).padStart(2, '0')}s`;
39
+ }
40
+ const minutes = Math.round(seconds / 60);
41
+ if (minutes < 60) {
42
+ return `${minutes}m`;
43
+ }
44
+ const spare = minutes % 60;
45
+ return spare === 0 ? `${Math.floor(minutes / 60)}h` : `${Math.floor(minutes / 60)}h${spare}m`;
39
46
  }
40
47
  function tokens(value) {
41
48
  if (value < 1000) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-issue",
3
- "version": "12.3.0",
3
+ "version": "12.4.0",
4
4
  "description": "Autonomous issue harness driven by the pi SDK",
5
5
  "keywords": [
6
6
  "github",