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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gh repo list
#642
Comments
👋 Thanks for the feature idea! Do you think it might be useful to output the list of repositories in |
+1 for ORG/REPO format to follow the consistency. |
Yeah, that would be better! |
@mislav I am interested in working on this issue. Can I take up this? |
I came here looking for this feature. My usecase: I'm working with the Express project, which is fairly unique in that we have many packages spread out across three different orgs I want to get a list of every repo in each org, so I can make filters for my GH notifications. I typically have used other tools or the API to get these lists in the past. Specifically for the notifications filters, I'm creating a list of repos in the format But what I want right now is to be able to output the list of repos, sort of like:
I think we're unique in our use of multiple orgs, but an |
This is an initial draf to support list command. The idea is to have a common list command for the repos, orgs etc.. - List repositories with default limit ```bash $ gh list repo // list repos of the logged in user(Defaults to 30 repos) Showing 30 of 173 repositories. bdpiparva/deb-repo-query bdpiparva/deb-repo-poller bdpiparva/ansible-gocd ... ``` - List repositories with custom limit ```bash $ gh list repo -L 10 // You can set the custom limit for the page. Showing 10 of 173 repositories. bdpiparva/deb-repo-query bdpiparva/deb-repo-poller bdpiparva/ansible-gocd ... ``` - Print raw result for scripting ```bash $ gh list repo --raw bdpiparva/deb-repo-query bdpiparva/deb-repo-poller bapiparva/ansible-gocd ... ``` - List repositories for a organization ```bash $ gh list repo --org Area51 //Output ``` **NOTE:** Related issue(s) for the PR: cli#642, cli#645 - [ ] Add support to list organization for the loggedin user ```bash $ gh list org
This is an initial draf to support list command. The idea is to have a common list command for the repos, orgs etc.. - List repositories with default limit ```bash $ gh list repo // list repos of the logged in user(Defaults to 30 repos) Showing 30 of 173 repositories. bdpiparva/deb-repo-query bdpiparva/deb-repo-poller bdpiparva/ansible-gocd ... ``` - List repositories with custom limit ```bash $ gh list repo -L 10 // You can set the custom limit for the page. Showing 10 of 173 repositories. bdpiparva/deb-repo-query bdpiparva/deb-repo-poller bdpiparva/ansible-gocd ... ``` - Print raw result for scripting ```bash $ gh list repo --raw bdpiparva/deb-repo-query bdpiparva/deb-repo-poller bapiparva/ansible-gocd ... ``` - List repositories for a organization ```bash $ gh list repo --org Area51 //Output ``` **NOTE:** Related issue(s) for the PR: cli#642, cli#645 ## TODO - [ ] Add support to list organization for the loggedin user ```bash $ gh list org
Any updates on this feature? |
@adimyth No, but you can query the list of repositories using # ~/.config/gh/config.yml
aliases:
repos: |
!gh api --paginate graphql -f owner="$1" -f query='
query($owner: String!, $per_page: Int = 100, $endCursor: String) {
repositoryOwner(login: $owner) {
repositories(first: $per_page, after: $endCursor, ownerAffiliations: OWNER) {
nodes { nameWithOwner }
pageInfo { hasNextPage endCursor }
}
}
}
' | jq -r '.data.repositoryOwner.repositories.nodes[].nameWithOwner' | sort Usage: $ gh repos cli |
The solution provided by @mislav works great but you should be aware of two things:
|
@Kilo-Loco Haha whoops 🙈 |
I'd also like the option to filter on/without forks |
Came here looking for exactly this feature. The workaround is great, but having it implemented by default would be way nicer! |
That list looks good to me - minimal is appealing in a CLI imo. Pins are probably good to separate on larger orgs but not so important for smaller ones. Perhaps one unbroken list with an asterisk for pins and keeping them at the top of the list or something similar would please both sides? |
@ampinsk I'd like something that's "one line one record" - i.e. will fit into grep/awk/...
Now I can do
|
Can we have a way to search specific topics also?
|
Just updated the body with UI spec and marked as |
I would like to take this up ✋🏾 |
thanks, @cristiand391 . post here if you have questions. |
Any updates on this? |
I too am—eagerly—awaiting |
Any updates, this was the first thing I expected glab to have, to get a list of all the gitlab repos I have? |
@ksandvik This feature was merged and released in the latest version 1.7.0. Additionally this repo is for the GitHub CLI tool ( |
I often wish I had a way of listing the repositories for an org.
Edited by maintainers:
The UI specification is here: https://docs.google.com/document/d/1QoktdMTS8FEXYLH_1WvzZe_OoGV_ZiTxf0c3QVF1soY/edit#
We're happy to accept contributions for this feature ✨ If you're interested in working on this please comment as such so it can be assigned to you.
The text was updated successfully, but these errors were encountered: