feat(dashboard): add milestone view and configurable columns

fixes #16, fixes #19

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
sylvain
2026-03-13 03:50:45 +01:00
parent ebf72c9a56
commit 60c6aaede3
8 changed files with 325 additions and 52 deletions

View File

@@ -26,9 +26,10 @@ class TestMainNominal:
mock_client_cls.assert_called_once_with("http://localhost:3000", "test-token-123")
mock_collect.assert_called_once_with(mock_client, include=None, exclude=None)
mock_render.assert_called_once_with(
mock_collect.return_value, sort_key="name", show_description=True
)
mock_render.assert_called_once()
call_kwargs = mock_render.call_args
assert call_kwargs[1]["sort_key"] == "name"
assert call_kwargs[1]["show_description"] is True
@patch("gitea_dashboard.cli.render_dashboard")
@patch("gitea_dashboard.cli.collect_all")
@@ -365,9 +366,10 @@ class TestMainNoDesc:
with patch.dict("os.environ", env, clear=True):
main(["--no-desc"])
mock_render.assert_called_once_with(
mock_collect.return_value, sort_key="name", show_description=False
)
mock_render.assert_called_once()
call_kwargs = mock_render.call_args
assert call_kwargs[1]["sort_key"] == "name"
assert call_kwargs[1]["show_description"] is False
class TestMainFormatJson:
@@ -472,7 +474,7 @@ class TestMainColumnsHelp:
mock_collect.return_value = []
with patch.dict("os.environ", env, clear=True):
main(["--no-desc", "--columns", "-commit"])
main(["--no-desc", "--columns=-commit"])
# render_dashboard should be called with columns excluding both description and commit
call_kwargs = mock_render.call_args

View File

@@ -2,6 +2,7 @@
from io import StringIO
import pytest
from rich.console import Console
from gitea_dashboard.display import (