mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-11-28 22:03:30 +03:00
seed some more pr test data
This commit is contained in:
parent
a0a9846279
commit
d48b67bc05
@ -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"
|
||||
}
|
||||
]
|
||||
|
@ -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)
|
||||
|
@ -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)}
|
||||
<div
|
||||
class="swimlane flex h-full w-96 snap-start scroll-ml-4 rounded-lg bg-zinc-900"
|
||||
animate:flip={{ duration: flipDurationMs }}
|
||||
>
|
||||
<Lane {name} bind:files on:empty={handleEmpty} />
|
||||
<Lane {name} {description} bind:files on:empty={handleEmpty} />
|
||||
</div>
|
||||
{/each}
|
||||
</section>
|
||||
|
@ -8,6 +8,7 @@
|
||||
import FileCard from './FileCard.svelte';
|
||||
|
||||
export let name: string;
|
||||
export let description: string;
|
||||
export let files: File[];
|
||||
|
||||
const flipDurationMs = 150;
|
||||
@ -47,7 +48,7 @@
|
||||
<div class="font-bold">{name}</div>
|
||||
<textarea
|
||||
class="h-14 w-full resize-none
|
||||
rounded border-0 p-2 text-zinc-400 focus-within:h-32">markdown description of things</textarea
|
||||
rounded border-0 p-2 text-zinc-400 focus-within:h-32">{description}</textarea
|
||||
>
|
||||
</div>
|
||||
<div
|
||||
|
@ -23,4 +23,5 @@ export class Branch extends DndItem {
|
||||
active!: boolean;
|
||||
@Type(() => File)
|
||||
files!: File[];
|
||||
description!: string;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user