Hacktoberfest/hacktoberfest-repo-topic-apply

Includes collaborator repositories, even if there is insufficient API access

Closed this issue · 3 comments

I am a collaborator on some repositories owned by other users. These repositories seem to be included by the -u option, and then there is an API error due to insufficient privileges.

For example, I am a collaborator on https://github.com/avar/dist-zilla-plugin-makemaker-awesome:

$ hfest-repo -t $GITHUB_OAUTH_TOKEN -u karenetheridge --labels
   • adding topic              repo=dist-zilla-plugin-makemaker-awesome topic=hacktoberfest
   ⨯ issue adding hacktoberfest topic to repo error=PUT https://api.github.com/repos/avar/dist-zilla-plugin-makemaker-awesome/topics: 404 Not Found [] repo=dist-zilla-plugin-makemaker-awesome
$ echo $?
1

These repositories should be skipped, because they are not under my username.

(It should also be possible to skip over API errors and continue on with the next repository -- you know, just in case there are other API errors you haven't anticipated.) :)

Hi @karenetheridge, can you test against PR #25? This should skip collaborator repos but also not completely error out if the tool fails to add the topic to a repo that your user doesn't have access to.

I'm not a go person and I don't see a Makefile, so I'm not sure how to compile it.

I released this into v0.0.9 since it solved another problem. Feel free to download the tool and try it again. If a breaking issue still persists please reopen this ticket