Skip to content

Commit

Permalink
gitea: use the full date string as commit version
Browse files Browse the repository at this point in the history
Only using the date part is too coarse. Also date could be different
across timezones and thus confusing.
  • Loading branch information
lilydjwg committed Dec 28, 2024
1 parent ad892b7 commit 4d5e29f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion nvchecker_source/gitea.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
)
4 changes: 2 additions & 2 deletions tests/test_gitea.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 4d5e29f

Please sign in to comment.