gh-manager-cli 1.8.1 → 1.8.2
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/CHANGELOG.md +7 -0
- package/dist/index.js +21 -8
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [1.8.2](https://github.com/wiiiimm/gh-manager-cli/compare/v1.8.1...v1.8.2) (2025-09-01)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* update search results when performing repository actions ([f4edb65](https://github.com/wiiiimm/gh-manager-cli/commit/f4edb65d84501f894dcc012bc6bf6b7495ec0902))
|
|
7
|
+
|
|
1
8
|
## [1.8.1](https://github.com/wiiiimm/gh-manager-cli/compare/v1.8.0...v1.8.1) (2025-09-01)
|
|
2
9
|
|
|
3
10
|
|
package/dist/index.js
CHANGED
|
@@ -19,7 +19,7 @@ var require_package = __commonJS({
|
|
|
19
19
|
"package.json"(exports, module) {
|
|
20
20
|
module.exports = {
|
|
21
21
|
name: "gh-manager-cli",
|
|
22
|
-
version: "1.8.
|
|
22
|
+
version: "1.8.2",
|
|
23
23
|
private: false,
|
|
24
24
|
description: "Interactive CLI to manage your GitHub repos (personal) with Ink",
|
|
25
25
|
license: "MIT",
|
|
@@ -527,8 +527,13 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
|
|
|
527
527
|
setDeleting(true);
|
|
528
528
|
const [owner, repo] = (deleteTarget.nameWithOwner || "").split("/");
|
|
529
529
|
await deleteRepositoryRest(token, owner, repo);
|
|
530
|
-
|
|
530
|
+
const targetId = deleteTarget.id;
|
|
531
|
+
setItems((prev) => prev.filter((r) => r.id !== targetId));
|
|
532
|
+
setSearchItems((prev) => prev.filter((r) => r.id !== targetId));
|
|
531
533
|
setTotalCount((c) => Math.max(0, c - 1));
|
|
534
|
+
if (searchActive) {
|
|
535
|
+
setSearchTotalCount((c) => Math.max(0, c - 1));
|
|
536
|
+
}
|
|
532
537
|
setDeleteMode(false);
|
|
533
538
|
setDeleteTarget(null);
|
|
534
539
|
setTypedCode("");
|
|
@@ -822,7 +827,9 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
|
|
|
822
827
|
const id = archiveTarget.id;
|
|
823
828
|
if (isArchived) await unarchiveRepositoryById(client, id);
|
|
824
829
|
else await archiveRepositoryById(client, id);
|
|
825
|
-
|
|
830
|
+
const updateRepo = (r) => r.id === id ? { ...r, isArchived: !isArchived } : r;
|
|
831
|
+
setItems((prev) => prev.map(updateRepo));
|
|
832
|
+
setSearchItems((prev) => prev.map(updateRepo));
|
|
826
833
|
closeArchiveModal();
|
|
827
834
|
} catch (e) {
|
|
828
835
|
setArchiving(false);
|
|
@@ -858,7 +865,7 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
|
|
|
858
865
|
const [owner, repo] = syncTarget.nameWithOwner.split("/");
|
|
859
866
|
const branchName = syncTarget.defaultBranchRef?.name || "main";
|
|
860
867
|
const result = await syncForkWithUpstream(token, owner, repo, branchName);
|
|
861
|
-
|
|
868
|
+
const updateSyncedRepo = (r) => {
|
|
862
869
|
if (r.id === syncTarget.id && r.parent && r.defaultBranchRef?.target?.history && r.parent.defaultBranchRef?.target?.history) {
|
|
863
870
|
return {
|
|
864
871
|
...r,
|
|
@@ -874,7 +881,9 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
|
|
|
874
881
|
};
|
|
875
882
|
}
|
|
876
883
|
return r;
|
|
877
|
-
}
|
|
884
|
+
};
|
|
885
|
+
setItems((prev) => prev.map(updateSyncedRepo));
|
|
886
|
+
setSearchItems((prev) => prev.map(updateSyncedRepo));
|
|
878
887
|
closeSyncModal();
|
|
879
888
|
} catch (e) {
|
|
880
889
|
setSyncing(false);
|
|
@@ -1399,7 +1408,9 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
|
|
|
1399
1408
|
const id = archiveTarget.id;
|
|
1400
1409
|
if (isArchived) await unarchiveRepositoryById(client, id);
|
|
1401
1410
|
else await archiveRepositoryById(client, id);
|
|
1402
|
-
|
|
1411
|
+
const updateRepo = (r) => r.id === id ? { ...r, isArchived: !isArchived } : r;
|
|
1412
|
+
setItems((prev) => prev.map(updateRepo));
|
|
1413
|
+
setSearchItems((prev) => prev.map(updateRepo));
|
|
1403
1414
|
closeArchiveModal();
|
|
1404
1415
|
} catch (e) {
|
|
1405
1416
|
setArchiving(false);
|
|
@@ -1470,7 +1481,7 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
|
|
|
1470
1481
|
setSyncing(true);
|
|
1471
1482
|
const [owner, repo] = syncTarget.nameWithOwner.split("/");
|
|
1472
1483
|
const result = await syncForkWithUpstream(token, owner, repo);
|
|
1473
|
-
|
|
1484
|
+
const updateSyncedRepo = (r) => {
|
|
1474
1485
|
if (r.id === syncTarget.id && r.parent && r.defaultBranchRef?.target?.history && r.parent.defaultBranchRef?.target?.history) {
|
|
1475
1486
|
return {
|
|
1476
1487
|
...r,
|
|
@@ -1486,7 +1497,9 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
|
|
|
1486
1497
|
};
|
|
1487
1498
|
}
|
|
1488
1499
|
return r;
|
|
1489
|
-
}
|
|
1500
|
+
};
|
|
1501
|
+
setItems((prev) => prev.map(updateSyncedRepo));
|
|
1502
|
+
setSearchItems((prev) => prev.map(updateSyncedRepo));
|
|
1490
1503
|
closeSyncModal();
|
|
1491
1504
|
} catch (e) {
|
|
1492
1505
|
setSyncing(false);
|