Please find attached in this PR three bug fixes for the gather_github_repositories task:
The Github Account entity naming convention was recently changed so it includes the URI e.g https://github.com/intrigueio and as such the gather_github_repositories task was not parsing the account name from the URI thus causing it to fire off requests such as https://github.com/intrigueio/https://github.com/intrigueio. A new helper method was introduced which is responsible for extracting the owner name from the URI. Thanks to @shpendk for reporting this issue.
Handle nil exception that was thrown if rate limited when verifying whether the Github Account exists.
Support for authenticated Github HTTP API requests. Even if the task is using a valid Github Access Token, there are still some functions called which invoke HTTP requests to Github's REST API. Examples are verifying whether the Github Account exists and if the account is an organization. There could be a scenario where an IP Address exhausted the max limit of unauthenticated requests per hour thus causing the task to fail since it'll return the Github account doesn't exist due to the rate limiting. As the access token is now included in the HTTP requests, this will now prevent these types of scenarios from occuring.
Hi team,
Please find attached in this PR three bug fixes for the
gather_github_repositories
task:The Github Account entity naming convention was recently changed so it includes the URI e.g
https://github.com/intrigueio
and as such thegather_github_repositories
task was not parsing the account name from the URI thus causing it to fire off requests such ashttps://github.com/intrigueio/https://github.com/intrigueio
. A new helper method was introduced which is responsible for extracting the owner name from the URI. Thanks to @shpendk for reporting this issue.Handle nil exception that was thrown if rate limited when verifying whether the Github Account exists.
Support for authenticated Github HTTP API requests. Even if the task is using a valid Github Access Token, there are still some functions called which invoke HTTP requests to Github's REST API. Examples are verifying whether the Github Account exists and if the account is an organization. There could be a scenario where an IP Address exhausted the max limit of unauthenticated requests per hour thus causing the task to fail since it'll return the Github account doesn't exist due to the rate limiting. As the access token is now included in the HTTP requests, this will now prevent these types of scenarios from occuring.
Thanks.
Best regards, Maxim