diff --git a/scripts/branch_testdata.json b/scripts/branch_testdata.json index a52db2771..91a873600 100644 --- a/scripts/branch_testdata.json +++ b/scripts/branch_testdata.json @@ -89,7 +89,8 @@ } ] } - ] + ], + "description": "Make drag & drop code a bit more dry\n" }, { "id": "Branch-sidebar-is-stuck-to-side-of-the-window:420", @@ -142,7 +143,8 @@ } ] } - ] + ], + "description": "Branch sidebar is stuck to side of the window\n" }, { "id": "watcher-work-w:414", @@ -522,7 +524,8 @@ } ] } - ] + ], + "description": "watcher handler run async\n" }, { "id": "ian/cursor-for-select-text-from-diff:409", @@ -545,7 +548,8 @@ } ] } - ] + ], + "description": "Ian/cursor for select text from diff\n" }, { "id": "writers:407", @@ -940,6 +944,7 @@ } ] } - ] + ], + "description": "Writers\nestablish a clear writer api pattern for different types" } ] diff --git a/scripts/gen_branch_testdata.py b/scripts/gen_branch_testdata.py index 983402aa4..6f8035e1d 100755 --- a/scripts/gen_branch_testdata.py +++ b/scripts/gen_branch_testdata.py @@ -43,6 +43,11 @@ def process_pr(pr_number): shell=True, text=True, ).splitlines()[0] + body = subprocess.check_output( + "gh pr view %s --json body -q '.body'" % pr_number, + shell=True, + text=True, + ).splitlines()[0] diff = subprocess.check_output("gh pr diff %s" % pr_number, shell=True, text=True) patch = PatchSet(diff) files = [] @@ -65,19 +70,13 @@ def process_pr(pr_number): "hunks": hunks, } files.append(file_out) - # commit = { - # "id": "Commit:" + branch_name + ":" + pr_number, - # "description": title, - # "committedAt": updated_at, - # "kind": "commit", - # "files": files, - # } branch = { "id": branch_name + ":" + pr_number, "name": branch_name, "active": True, "kind": "branch", "files": files, + "description": title + "\n" + body, } return branch @@ -87,7 +86,5 @@ prs = ["429", "420", "414", "409", "407"] # feel free to paste some some specif branches = [process_pr(pr) for pr in prs] -print(branches) - with open("scripts/branch_testdata.json", "w") as json_file: json.dump(branches, json_file, indent=4) diff --git a/src/routes/projects_new/[projectId]/Board.svelte b/src/routes/projects_new/[projectId]/Board.svelte index a0f2798c8..18fa0bbe3 100644 --- a/src/routes/projects_new/[projectId]/Board.svelte +++ b/src/routes/projects_new/[projectId]/Board.svelte @@ -52,12 +52,12 @@ on:consider={handleDndEvent} on:finalize={handleDndEvent} > - {#each branches.filter((c) => c.active) as { id, name, files } (id)} + {#each branches.filter((c) => c.active) as { id, name, files, description } (id)}