-
Notifications
You must be signed in to change notification settings - Fork 335
feat: detect untracked repo #2149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: detect untracked repo #2149
Conversation
Dry-run check results |
6b92402 to
2ad6262
Compare
417df2c to
c1ab92d
Compare
|
I have resolved all the comments, synced with the latest main branch and squashed commits. PR is ready for review 🙌🏻 |
|
I'm kinda confused why does this needs any permissions at all? We can just read the publicly available list of repositories without any GitHub token, right? I don't think that we need to even read private repositories; in fact this action could leak the existence of said repositories when it runs on CI (sometimes private repos can be created manually, I think, e.g. for security responses, I don't even think that That would also allow this CI workflow run completely unprivileged, which would be better in general. By the way, this will probably fail (at least) for the |
Interesting, thank you for saving us from a leak. I never realised until now that we only manage public repos using team repos. I'm glad we found it soon. I have refactored the code to use the public api. Can you please take a second look? |
Kobzol
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks great, thank you!
We should eventually just switch to octocrab for the simple stuff, or at least unify the team and sync-team GitHub APIs, it's annoying to reimplement the same GitHub endpoints again and again :D
src/ci.rs
Outdated
| .iter() | ||
| .filter(|(org, repo)| { | ||
| // Skip archived repos | ||
| if repo.archived { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need to skip archived repositories, we should also have those in team.
|
Opened #2180 to unblock this. |
Let's create our own common crate and not depend on octocrab, so that:
At least this is my preference. Because for example we might want to use graphql for certain calls. We could create a common crate later as a separate issue |
|
So, I agree that we should definitely have our own interface (and use that in both |
|
Can you customize it with middlewares? E.g. retry automatically on every 500? |
|
I think that you can configure it using any EDIT: I forgot that |
Closes: #1863