gitea: use the full date string as commit version

Only using the date part is too coarse. Also date could be different
across timezones and thus confusing.
This commit is contained in:
lilydjwg 2024-12-28 21:50:39 +08:00
parent ad892b713e
commit 4d5e29f26b
2 changed files with 3 additions and 3 deletions

View file

@ -51,7 +51,7 @@ async def get_version(
]
else:
return RichResult(
version = data[0]['commit']['committer']['date'].split('T', 1)[0].replace('-', ''),
version = data[0]['commit']['committer']['date'],
revision = data[0]['sha'],
url = data[0]['html_url'],
)

View file

@ -10,8 +10,8 @@ async def test_gitea(get_version):
ver = await get_version("example", {
"source": "gitea",
"gitea": "gitea/tea"})
assert len(ver) == 8
assert ver.isdigit()
assert ver.startswith('20')
assert 'T' in ver
@pytest.mark.flaky(reruns=10)
async def test_gitea_max_tag_with_include(get_version):