-
Notifications
You must be signed in to change notification settings - Fork 7
Add a script to search and add githubs repos for a specific language #181
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for capturing the script here!
search-and-add-github-repos.sh
Outdated
# Quick analysis of largest organizations | ||
cut --delimiter='/' --fields=1 repos.csv | sort | uniq -c | sort -h | tail -n 20 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd put this one last, as it now analyzes the largest orgs before adding a 1000 more repositories, which could be different.
# generate `gh.json` which includes repo fullName and branch name, | ||
# Manually customize the language and adjust the count below according to your specific requirements. | ||
# option to add filter: --updated="> 2023-11-21" | ||
gh search repos --language javascript --visibility public --limit 1000 --json fullName,defaultBranch > out/gh.json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might as well make javascript
a script parameter. In addition we could also document that it could be interesting to set --sort stars
(and / or --updated "> $(date -v-1m "+%Y-%m-%d")"
to get repos updated in the last month), as users might be more inclined to run recipes against popular repos.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, I thought about this to put both language and count as script parameters, and then I think it will be used by us internally and we might want to do other customization, so I leave it as hard coded since anyway we need to type the language somewhere. We can update this for any needs for sure.
Co-authored-by: Tim te Beek <[email protected]>
Co-authored-by: Tim te Beek <[email protected]>
Add
search-and-add-github-repos.sh
tocsv
and merge it torepos.csv
json
content to be added toownership.json
for SAAS groups.