#715 Sorting Release using the commit time
Merged by pingou. Opened by cverna.
cverna/pagure pagure_release_fix  into  master

Download 715.patch
no initial comment

It's seems to be better to sort the tags that way, no need to worry about the format of the tag name.

If we decide to go this way, I still need to fix the tests

I'm a little reluctant to rely on pygit2's C variable there, I'd advice to use isinstance() instead

I have updated the code to use isinstance. I have also updated the tests, it takes around 20s (time to create different commit)

I am not quite sure we can test the case when we get a commit object and not a tag with the pygit2 API.

Why the sleep here?

ah yes, so that there is a time difference b/w the tags

Was it not working here?

I've just removed test case 3 which was adding version with alpha and beta to the tags created in case 2.
Now alpha and beta are in case 2 by default.
I have also shorten the tag lists so that the test doesn't take too long to run

Case 1 is still here

But after the repo contains something, not on an empty repo

True, not sure if it changes something regarding the tags, but I guess I can a another case Case 1 - Empty repo no tags
Case 2 - repo with commit and no tags .

:thumbsup: for me, makes sure we don't break on projects w/ empty repos :)

Changes made to test cases

Looks good to me, thanks!

Metadata