github-community-projects / private-mirrors

A GitHub App that allows you to contribute upstream using private mirrors of public projects
MIT License
119 stars 12 forks source link

Fork table should show mirror count instead of branch count #192

Open sutterj opened 2 months ago

sutterj commented 2 months ago

Is your feature request related to a problem?

Having the branch count for the fork isn't really relevant information. It would be more helpful to show the count of mirrors.

Describe the solution you'd like

The table should be updated to show the count of mirrors.

Describe alternatives you've considered

No response

Additional context

No response

ahpook commented 2 months ago

Big +1 on this

Sorry for the ignorant question - how does the app currently differentiate, on a given fork, between branches that are just regular branches and branches that map to mirrors?

sutterj commented 2 months ago

The current branch count is just a query on the total number of branches it has (regardless of relationship). The design had branches and I just went with it without really thinking about it. We can (maybe--not sure of query limitations) leave the branch count (if it's at all useful) and only count branches that are associated with mirrors and then add the mirror count or we can replace it with mirror count.

ahpook commented 2 months ago

Definitely in favor of replacing the branch count with mirror count. I think the design just had that because it was using the format of the repo list table from this view or someplace similar ...

I'm wondering what it is that knows about & maintains the association between branches and mirrors, I didn't think there was a data store in the app yet

sutterj commented 2 months ago

We use a custom property on the mirror repo to mark what fork it came from. The query to list the mirrors goes and finds all the repos in the org that have a custom property with the fork org/name in it. The original functionality was to store the fork org/name in the mirror repo's description.

ahpook commented 2 months ago

Ahh gotcha, thanks for the explanation 👍