I think we need some unit tests. Please check what happens on repos without any tags, that the sort order is as expected, ... . That's our official API and it should not contain code not covered by tests.