Skip to content

Commit 62db2b0

Browse files
committed
SyncGithub: handle unassigned groups
1 parent 7316dd4 commit 62db2b0

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

src/app/SyncGithub.tsx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ async function run() {
4242

4343
const push_group_list = get_push_group_list();
4444

45+
// console.debug({ push_group_list });
46+
// throw new Error("STOP");
47+
4548
// for all push targets in push_group_list
4649
// things that can be done in parallel are grouped by numbers
4750
//
@@ -92,7 +95,7 @@ async function run() {
9295

9396
await cli(git_push_command);
9497

95-
const pr_url_list = commit_range.group_list.map(get_group_url);
98+
const pr_url_list = push_group_list.map(get_group_url);
9699

97100
const after_push_tasks = [];
98101
for (const group of push_group_list) {
@@ -105,8 +108,8 @@ async function run() {
105108
// this step must come after the after_push since that step may create new PRs
106109
// we need the urls for all prs at this step so we run it after the after_push
107110
const update_pr_body_tasks = [];
108-
for (let i = 0; i < commit_range.group_list.length; i++) {
109-
const group = commit_range.group_list[i];
111+
for (let i = 0; i < push_group_list.length; i++) {
112+
const group = push_group_list[i];
110113

111114
// use the updated pr_url_list to get the actual selected_url
112115
const selected_url = pr_url_list[i];
@@ -149,7 +152,9 @@ async function run() {
149152

150153
const group = commit_range.group_list[index];
151154

152-
push_group_list.unshift(group);
155+
if (group.id !== commit_range.UNASSIGNED) {
156+
push_group_list.unshift(group);
157+
}
153158
}
154159

155160
return push_group_list;

0 commit comments

Comments
 (0)