Skip to content
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

#186 Workaround to find more than 1000 repositories #378

Merged
merged 10 commits into from
Oct 11, 2024

Conversation

lueFlake
Copy link
Contributor

@lueFlake lueFlake commented Oct 9, 2024

resolves #186


opts = Slop.parse do |o|
o.string '--token', 'GitHub access token', default: ''
o.boolean '--dry', 'Make no round-trips to GitHub API (for testing)', default: false
o.integer '--total', 'Total number of repos to take from GitHub', required: true
o.integer '--pause', 'How many seconds to sleep between API calls', default: 10
o.integer '--page-size', 'Number of repos to fetch in one API call', default: 100
o.integer '--min-stars', 'Minimum GitHub stars in each repo', default: max
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lueFlake what is the point of this change?

Copy link
Contributor Author

@lueFlake lueFlake Oct 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yegor256 why would we need to keep "max" variable? It is used only once here and i dont understand logic behind it in this line

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or are you talking about refactoring of the year loop?

@yegor256
Copy link
Owner

yegor256 commented Oct 9, 2024

@lueFlake looks good, but there are some failures in the build

@lueFlake
Copy link
Contributor Author

lueFlake commented Oct 9, 2024

@yegor256 yep, i did something wrong while refactoring, now fixed

@lueFlake
Copy link
Contributor Author

@yegor256 fixed issues with build, but it fails on test-report.sh on macos, i dont have an access for macos, so i dont understand how shoud i fix it

def process_year(year, github, context)
query = build_query(year, context[:opts])
puts "Querying for repositories created in #{year}..."

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

page = 0
loop do
break if context[:found].count >= context[:opts][:total]

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lueFlake better avoid them (empty lines)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yegor256 removed blank lines, forgot to remove them after debug, my bad

@yegor256
Copy link
Owner

@lueFlake macOS build is broken in master :( #381

@yegor256 yegor256 merged commit 9331a8a into yegor256:master Oct 11, 2024
11 of 12 checks passed
@yegor256
Copy link
Owner

@lueFlake thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

impossible to find more than 1000 repositories
2 participants