hpc-carpentry / hpc-carpentry.github.io

The HPC Carpentry website
http://www.hpc-carpentry.org/
MIT License
4 stars 7 forks source link

using `orgs` API to try to access user repositories #62

Closed tobyhodges closed 1 year ago

tobyhodges commented 1 year ago

The website builds are currently failing, due to the changes made to feeds/other_lessons.R in 13a0ea3.

The problem is that the get_org_topics function used on line 47 of that file

  frobnitzem <- get_org_topics("frobnitzem")

uses the get_list_repos function defined in feeds/utils.R, which makes a call to the GitHub organizations API, to try to get a list of repositories for an organisation. frobnitzem is a user account, so should be queried via the users API. See the difference between the current call that is being made

https://api.github.com/orgs/frobnitzem/repos

and the result of the equivalent call made via the users API

https://api.github.com/users/frobnitzem/repos

I am fairly certain that this is the problem, but less confident about the best solution. I suppose you would need to adjust get_list_repos to accept an optional parameter that tells it to query the users API instead of the orgs API?

tkphd commented 1 year ago

Thanks for digging into this @tobyhodges! I think I have a fix ...