Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

Add a script to search and add githubs repos for a specific language #181

Merged
merged 4 commits into from
Nov 29, 2023

Conversation

kunli2
Copy link
Contributor

@kunli2 kunli2 commented Nov 29, 2023

Add search-and-add-github-repos.sh to

  1. Search for github repos for a specific language.
  2. generate a csv and merge it to repos.csv
  3. generate json content to be added to ownership.json for SAAS groups.

@kunli2 kunli2 requested review from a team, timtebeek and traceyyoshima November 29, 2023 03:05
Copy link
Contributor

@timtebeek timtebeek left a 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!

Comment on lines 26 to 28
# Quick analysis of largest organizations
cut --delimiter='/' --fields=1 repos.csv | sort | uniq -c | sort -h | tail -n 20

Copy link
Contributor

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.

search-and-add-github-repos.sh Outdated Show resolved Hide resolved
search-and-add-github-repos.sh Show resolved Hide resolved
# 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
Copy link
Contributor

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.

Copy link
Contributor Author

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.

@kunli2 kunli2 merged commit 805293a into main Nov 29, 2023
1 check passed
@kunli2 kunli2 deleted the parser branch November 29, 2023 14:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants