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

Missing to_h cast in repo discovery script #211

Closed
howcanunot opened this issue Mar 17, 2024 · 2 comments
Closed

Missing to_h cast in repo discovery script #211

howcanunot opened this issue Mar 17, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@howcanunot
Copy link
Contributor

howcanunot commented Mar 17, 2024

if write make dataset/repositories.csv with Total number of repositories to fetch from GitHub. > 30 and % 100 != 0 we get an exception:

cam/steps/discover-repos.rb:125:in `<main>': undefined method `values' for an instance of Array (NoMethodError)
lines = [found.first[1].keys.join(',')] + found.values.map { |m| m.values.join(',') }
Did you mean?  values_at

This happens because if we exit the loop before we have collected enough repositories, the script tries to slice hash - line with bug

i suppose we miss to_h cast

@howcanunot howcanunot changed the title Missing to_h cast in repo discovery string Missing to_h cast in repo discovery script Mar 17, 2024
@howcanunot
Copy link
Contributor Author

howcanunot commented Mar 17, 2024

@yegor256 fyi
noticed it while I was working on #186
i will fix it

@yegor256
Copy link
Owner

fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants