djjd47130 / GitHubBackup

Simple UI for bulk downloading GitHub repositories
http://www.jerrydodge.com/GitHubBackup
MIT License
13 stars 4 forks source link

Download Multiple Branches #25

Open djjd47130 opened 5 years ago

djjd47130 commented 5 years ago

Currently, the app only downloads the default branch via ZIP file, with only the latest code. Provide the ability to download multiple branches.

djjd47130 commented 5 years ago

I theoretically could implement a tree for this, considering I'm adding the Virtual TreeView. Each item could have sub-items for each branch, with their own checkboxes. Each branch would have the same information under each column, but the left would be indented a bit to make it clear it's a 2nd level of hierarchy.

djjd47130 commented 5 years ago

Here's a sample of how the UI could work...

[ ]   Name      Col2    Col3
+ [ ] Repo1     1   a
      [ ] Branch1   2   b
      [ ] Branch2   3   c
      [ ] Branch3   4   d
+ [ ] Repo2     5   e
      [ ] Branch1   6   f
      [ ] Branch2   7   g
      [ ] Branch3   8   h
+ [ ] Repo3     9   i
      [ ] Branch1   10  j
      [ ] Branch2   11  k
      [ ] Branch3   12  l
djjd47130 commented 5 years ago

It just came to my attention that the GitHub API does not return total number of branches per repository. As of now, it looks like I have no choice but to fetch all branches at the time of user expanding a parent node.

https://stackoverflow.com/questions/57583064/how-can-i-get-branch-count-on-a-repository-via-github-api