diff --git a/src/loopcaptain/board/templates/loop.html b/src/loopcaptain/board/templates/loop.html index e865bc6..7384622 100644 --- a/src/loopcaptain/board/templates/loop.html +++ b/src/loopcaptain/board/templates/loop.html @@ -22,7 +22,7 @@
{{ note }}
{% endif %} {% if error %}{{ error }}
{% endif %} {% if hidden %}Hidden from the first page and its figures. loopcaptain unhide {{ view.repo.path|place }} {{ view.loop_id }} shows it again.
Another watched repository has a loop with this id: {% for key in same_id %}{{ key }}{{ ', ' if not loop.last }}{% endfor %}. Check that this is the loop you mean to answer. The board signs each answer for this folder alone, but a loop that still runs an earlier helper also takes lines signed with the key every loop shares: paste the current helper into both.
{% endif %} +{% if same_id %}{% for key in same_id %}{{ key }}{{ ', ' if not loop.last }}{% endfor %} also has a loop with this id. Check you are answering the right one.
{% endif %} {% if state.question %} {% set q = state.question %} diff --git a/src/loopcaptain/board/templates/overview.html b/src/loopcaptain/board/templates/overview.html index eeac5ef..96567a6 100644 --- a/src/loopcaptain/board/templates/overview.html +++ b/src/loopcaptain/board/templates/overview.html @@ -30,7 +30,7 @@{{ note }}
{% endif %} {% if error %}{{ error }}
{% endif %} -{% if repeated %}Two watched repositories have a loop with the same id: {% for loop_id, keys in repeated.items() %}{{ loop_id }} in {{ keys[:-1]|join(', ') }} and {{ keys[-1] }}{{ '; ' if not loop.last }}{% endfor %}. Check the repository before you answer; the loop's page says more.
Two watched repositories have a loop with the same id: {% for loop_id, keys in repeated.items() %}{{ loop_id }} in {{ keys[:-1]|join(', ') }} and {{ keys[-1] }}{{ '; ' if not loop.last }}{% endfor %}. Check you are answering the right one.
Not shown, because the board could not look into {{ 'it' if unreadable|length == 1 else 'them' }}:
diff --git a/tests/test_repeated_ids.py b/tests/test_repeated_ids.py index 601f4c0..f00d02e 100644 --- a/tests/test_repeated_ids.py +++ b/tests/test_repeated_ids.py @@ -60,13 +60,14 @@ def test_the_loop_page_names_the_other_repository_with_the_same_id( page = client.get("/loop/alpha-repo/scan").text other = client.get("/loop/alpha-repo/other").text - assert "Another watched repository has a loop with this id:" in page - assert 'href="http://board.test/loop/beta-repo/scan">beta-repo' in page - assert "Another watched repository" not in other + assert 'href="http://board.test/loop/beta-repo/scan">beta-repo also has a loop with this id.' in page + assert "Check you are answering the right one." in page + assert "helper" not in page.split("flash warn", 1)[1].split("", 1)[0] + assert "also has a loop with this id" not in other def test_no_warning_where_every_id_is_its_own(tmp_path: Path, helper: types.ModuleType) -> None: client = board(two_repos(tmp_path, helper, "scan-two"), tmp_path / "s") assert "the same id" not in client.get("/").text - assert "Another watched repository" not in client.get("/loop/alpha-repo/scan").text + assert "also has a loop with this id" not in client.get("/loop/alpha-repo/scan").text