8000 git repo <target> ls for listing a user's repositories · Issue #50 · guyzmo/git-repo · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

git repo <target> ls for listing a user's repositories #50

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’l 8000 l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ghost opened this issue Oct 13, 2016 · 4 comments
Closed

git repo <target> ls for listing a user's repositories #50

ghost opened this issue Oct 13, 2016 · 4 comments

Comments

@ghost
Copy link
ghost commented Oct 13, 2016

I would really like functionality to get a list of all git repos under a given account, preferably in a format easy to parse in scripts and with multiple formatting options (i.e. format as git ssh urls, format as https urls, append default branch or not).

I'm currently using a hand-rolled tool (chegit) to keep my local changes synced to Gitlab, but I don't have tooling for multiple remotes yet (your 'all' remote would solve this), and I don't have a way of getting a list of remote repositories that I might want to keep a local copy of.

Is this functionality already included and did I overlook it in the help page, and if not, would you consider implementing it?

@ghost
Copy link
Author
ghost commented Oct 13, 2016

Some information I would find useful to enumerate:

  • repo name (i.e. git-repo)
  • (user|group)/repo (i.e. guyzmo/git-repo)
  • trivial/user-defined repo name (i.e. Git Repo)
  • https clone url
  • SSH clone url
  • default branch
  • visibility (private/internal/public)

Just (user|group)/repo could work, if there's a separate function to get other info based on this ID.

@guyzmo
Copy link
Owner
guyzmo commented Oct 13, 2016

Nope, it's not yet implemented.

It's not really a feature I have been needing so to me it's quite low priority. I'm marking this as a feature request, and I'm open for anyone to tackle this.

Currently my priority, feature-wise, is on finishing up the merge request and snippets features for gitlab and bitbucket, as well as adding OAuth support for bitbucket… Otherwise I'm fixing all bugs that are being found!

If you're willing to tackle this, of course, I'll be happy to guide you on how to do it!

@guyzmo guyzmo removed the backlog label Oct 13, 2016
@guyzmo
Copy link
Owner
guyzmo commented Oct 16, 2016

Actually I had a thought about that, and I've implemented a first trial of that idea, which works only for github:

git hub ls WillemMali
WillemMali/cacka.net              WillemMali/dpkg-rdm               WillemMali/salt-cacka
WillemMali/debian-packaging       WillemMali/guides                 WillemMali/salt-desktop
WillemMali/docker-bootstrap       WillemMali/linux                  WillemMali/site-willemmali-com
WillemMali/docker-dpkg            WillemMali/llvm-kaleidoscope      WillemMali/tools
WillemMali/docker-playground      WillemMali/rust-coreutils         WillemMali/vagrant-cyc0
WillemMali/docker-salt            WillemMali/rust-guessing          WillemMali/vagrant-dpkg-rdm
WillemMali/docker-willemmali-com  WillemMali/rust-hello             WillemMali/vagrant-salt
WillemMali/dotfiles               WillemMali/rust-iup               WillemMali/willemmali.github.io
WillemMali/dpkg-iup               WillemMali/salt-bootstrap
% git hub ls -l
Status  Commits Reqs    Issues  Forks   Coders  Watch   Likes   Lang    Modif           Name
        1       0       0       0       1       0       0       ?       Sep 25 17:06    WillemMali/cacka.net
        16      0       0       1       2       0       0       ?       Jul 22 11:01    WillemMali/debian-packaging
        3       0       0       0       1       0       0       Shell   Jul 23 20:35    WillemMali/docker-bootstrap
        10      0       0       0       1       0       0       Shell   Aug 10 07:23    WillemMali/docker-dpkg
        3       0       0       0       1       0       0       Shell   Aug 10 07:28    WillemMali/docker-playground
        3       0       0       0       1       0       0       ?       Jul 28 17:22    WillemMali/docker-salt
        2       0       0       0       1       0       0       ?       Sep 04 10:45    WillemMali/docker-willemmali-com
        102     0       0       0       1       0       0       Shell   May 23 18:52    WillemMali/dotfiles
        2       0       0       0       1       0       0       ?       Jul 26 10:40    WillemMali/dpkg-iup
        4       0       0       0       1       0       0       ?       Jul 26 10:40    WillemMali/dpkg-rdm
        13      0       0       0       1       0       0       ?       Aug 10 14:58    WillemMali/guides

it's still far from perfect, as the --long version is slow (to get some useful stats data, I need to query some iterators to count it… counter-productive!), it's abusing the API, and does not list everything.

Also it lacks tests. But that's a start to think about how the UI should look like, and what the UX should be. Maybe some more parameters should be given to add sorting or change the output?

@guyzmo
Copy link
Owner
guyzmo commented Oct 16, 2016

You can look at my change in this commit 6431d3d and check it out with the branch features/list_repos

@guyzmo guyzmo added the ready label Nov 24, 2016
@guyzmo guyzmo closed this as completed in 6322384 Nov 25, 2016
@guyzmo guyzmo removed the ready label Nov 25, 2016
guyzmo added a commit that referenced this issue Nov 25, 2016
🚧 Feature:

* Added the repository list feature support, which lists all
  repositories for an user. (fixes #50)

🚒 Bugfixes:

* Allow cloning in empty directories (fixes #58)
* Allow URLs that contain .git in the name (fixes #55)
* Show a nice error when missing credentials on create (fixes #74)
* Made remote add show the proper name on success (fixes #72)

💄 Cosmetics:

* Removed distutil's usage of setup function in setup.py (cf #71)
* Improved versions used in requirements (cf #61)
* Fixed link in TODO list (cf #70)

Signed-off-by: Guyzmo <guyzmo+github@m0g.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant
0