Yikun / hub-mirror-action

一个Github Action,用于在Github和Gitee之间同步代码。Action for mirroring repos between Hubs (like Github and Gitee).
MIT License
634 stars 173 forks source link

add private or public for create repo #152

Closed dislazy closed 2 years ago

dislazy commented 2 years ago

add private or public for create repo

Yikun commented 2 years ago

Thanks for you contributions!

But in my opinion, this kind of breaks the semantics of synchronization. Could you share your real case? Let's see why we need this parameter. I guess you just want backup your repos but don't want dispaly these repos in your dst hub?

Yikun commented 2 years ago

also cc @yi-Xu-0100 @ShixiangWang @JasonkayZK What do you think?

ShixiangWang commented 2 years ago

@Yikun Thanks for cc me. Currently I don't have such demands. From the file change, it seems that it would not change default behavior. I agree with you that if a real case can be estimated, it's worthy to have this new option.

yi-Xu-0100 commented 2 years ago

@Yikun Thanks for cc me. If it can be used to release sync the private repo, it will close #38. That will be very nice. 😊

Yikun commented 2 years ago

@yi-Xu-0100 this is not for private repo mirror, it's just for sync public repo as private repo. So let's see the real case from author.

I've heard more than once that wishing the private should be supported, Looks like we should consider supporting private repo mirror. : )

dislazy commented 2 years ago

Hello everyone, my main purpose is to achieve mutual backup between github and gitee. If the github repository is private, then if the repository synchronized by gitee is not private, some key information will be leaked.

Yikun commented 2 years ago

@dislazy But private repo mirror haven't been supported yet, we can only get the public repos from src repo list: https://github.com/Yikun/hub-mirror-action/blob/123860d395937727da2f2571cf2644840202ba61/hub-mirror/hub.py#L107 that means hub-mirror only supports public mirror now.

If the github repository is private,

So, this assumation might be wrong?

dislazy commented 2 years ago

As such, yes, but you can continue to optimize

Yikun commented 2 years ago

@dislazy See related commentes in here: https://github.com/Yikun/hub-mirror-action/issues/38#issuecomment-1094033841

Could rename dst_private to dst_visibility?

Yikun commented 2 years ago

I added the comments according latest desigin.

xiexianbin commented 2 years ago

ping