lauriii / drupalcores

A project to generate a list of core contributers
http://drupalcores.com
MIT License
27 stars 38 forks source link

#119: Use the Drupal.org API to bypass user page access restrictions. #120

Closed jcnventura closed 5 years ago

jcnventura commented 5 years ago

This fixes #119.

It's a major rewrite of the companies.rb and countries.rb.

The json.rb no longer lowercases the contributor names (nor replace - with _), but the name mapping still uses lowercased keys. Because d.o user URLs are not case-sensitive, I've kept those lowercase. I've also adapted the commit message parser to accept '-' in usernames and to reduce some false positives when using 'by' somewhere in commit description followed by a class::method.

Finally, I added a mapping between 2-letter country codes and English names, using as source the d.o user edit form. This is needed because the user.json response only specifies the 2-letter code. Norway had some problems as for some reason the hash key gets saved as >'no'< and not simply >no<.

lauriii commented 5 years ago

Tested this locally and the companies generation works again. Thank you @jcnventura for working on this! 🙏