private-mirrors icon indicating copy to clipboard operation
private-mirrors copied to clipboard

Fork table should show mirror count instead of branch count

Open sutterj opened this issue 1 year ago • 5 comments

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

sutterj avatar Jun 19 '24 21:06 sutterj

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?

ahpook avatar Jun 19 '24 21:06 ahpook

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.

sutterj avatar Jun 19 '24 21:06 sutterj

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

ahpook avatar Jun 19 '24 21:06 ahpook

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.

sutterj avatar Jun 19 '24 21:06 sutterj

Ahh gotcha, thanks for the explanation 👍

ahpook avatar Jun 19 '24 22:06 ahpook