git-watchtower 2.1.16 → 2.1.17

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.
@@ -576,6 +576,18 @@ async function checkCliAuth(cmd) {
576
576
  }
577
577
 
578
578
  // Bulk-fetch PR statuses for all branches (parsing delegated to src/git/pr.js)
579
+ //
580
+ // PR_LIST_LIMIT is the cap passed to `gh pr list` / `glab mr list`. The
581
+ // previous values (200 for gh, glab's default of 30) silently truncated
582
+ // on any active OSS repo — branches whose PR was outside the most recent
583
+ // N rendered with no inline indicator and never sorted as merged.
584
+ // 1000 covers virtually any real-world repo while still keeping the
585
+ // single API call fast (gh streams JSON, no pagination overhead). If
586
+ // your repo somehow exceeds 1000 active PRs, the truncation is back —
587
+ // but at that scale the inline indicator is the smallest of your UX
588
+ // concerns.
589
+ const PR_LIST_LIMIT = '1000';
590
+
579
591
  async function fetchAllPrStatuses() {
580
592
  if (!cachedEnv) return null;
581
593
  const { platform, hasGh, ghAuthed, hasGlab, glabAuthed } = cachedEnv;
@@ -584,7 +596,7 @@ async function fetchAllPrStatuses() {
584
596
  try {
585
597
  const { stdout } = await execCli('gh', [
586
598
  'pr', 'list', '--state', 'all',
587
- '--json', 'headRefName,number,title,state', '--limit', '200',
599
+ '--json', 'headRefName,number,title,state', '--limit', PR_LIST_LIMIT,
588
600
  ]);
589
601
  return parseGitHubPrList(JSON.parse(stdout));
590
602
  } catch (e) { /* gh error */ }
@@ -594,6 +606,7 @@ async function fetchAllPrStatuses() {
594
606
  try {
595
607
  const { stdout } = await execCli('glab', [
596
608
  'mr', 'list', '--state', 'all', '--output', 'json',
609
+ '--per-page', PR_LIST_LIMIT,
597
610
  ]);
598
611
  return parseGitLabMrList(JSON.parse(stdout));
599
612
  } catch (e) { /* glab error */ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "git-watchtower",
3
- "version": "2.1.16",
3
+ "version": "2.1.17",
4
4
  "description": "Terminal-based Git branch monitor with activity sparklines and optional dev server with live reload",
5
5
  "main": "bin/git-watchtower.js",
6
6
  "bin": {