Hacktoberfest / hacktoberfest-repo-topic-apply

Cmd line tool to add a topic to your github repo, defaults to hacktoberfest
Apache License 2.0
48 stars 43 forks source link

Skip forks and archived repos? #9

Closed hugovk closed 3 years ago

hugovk commented 3 years ago

hfest is a tool that adds the hacktoberfest topic to every repository associated with a user or a GitHub org

When you say every repo, does it also apply topics/labels to forked and archived repos?

If so, can those be excluded by default? That is, only run on what GitHub calls "source" repos.

It's less likely people will want to get PRs to forks, and you can't PR an archived repo.

Thanks!

mbabker commented 3 years ago

+1 on at least skipping archived repos. I just tried the tool and it quit after the 403 response from an archived repo in the org I was trying to update.

itsmeow commented 3 years ago

13 fixes the archive issue

MasonEgger commented 3 years ago

This is interesting because we set the repo type to public, which we would think would skip forks as forks is actually an option, but it's not doing that....https://pkg.go.dev/github.com/google/go-github/v32/github#RepositoryListByOrgOptions

MasonEgger commented 3 years ago

So @halkeye added a PR to address this in #5. @halkeye can you take a look at this and see why forks are still showing up when public is specified?

halkeye commented 3 years ago

I'll take a look, I apologize for the delay, I was nursing a migraine all afternoon

halkeye commented 3 years ago

https://developer.github.com/v3/repos/#parameters-1 doesn't seem to match actual https://docs.github.com/en/free-pro-team@latest/rest/reference/repos#list-organization-repositories

o.O so 'https://api.github.com/users/halkeye/repos?types=private' doesn't actually return my private repo, returns public repos

halkeye commented 3 years ago

Okay, so I have code that handles public private and forks through 3 new flags But I can't figure out how to actually get private repos for a user.

MasonEgger commented 3 years ago

This has been updated and is in v0.0.7.