Skip to content

Commit ca2a86d

Browse files
committed
repo: Tweak status page output
Include expiry more visibly. Fixes #402
1 parent 264be32 commit ca2a86d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

repo/tuf_on_ci/build_repository.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ def build_description(repo: CIRepository) -> str:
3535
lines = [
3636
"## TUF Repository state",
3737
"",
38-
"| Role | Next signing | Signers |",
39-
"| - | - | - |",
38+
"| Role | Signing starts | Expires | Signers |",
39+
"| - | - | - | - |",
4040
]
4141
root = repo.root()
4242
targets = repo.targets()
@@ -66,13 +66,13 @@ def build_description(repo: CIRepository) -> str:
6666
expiry = delegate.expires
6767
signing_days, _ = repo.signing_expiry_period(rolename)
6868
signing = expiry - timedelta(days=signing_days)
69+
signing_date = signing.strftime('%Y-%m-%d')
6970

7071
name_str = f'{rolename} (<a href="{json_link}">json</a>)'
71-
date_str = f"[Starts {signing.strftime('%Y-%m-%d')}](## '{signing} - {expiry}')"
7272
threshold_str = f"{role.threshold} of {len(signers)}"
7373
signer_str = f"{', '.join(signers)} ({threshold_str} required)"
7474

75-
lines.append(f"| {name_str} | {date_str} | {signer_str} |")
75+
lines.append(f"| {name_str} | {signing_date} | {expiry} UTC | {signer_str} |")
7676

7777
now = datetime.now(UTC).isoformat(timespec="minutes")
7878
head = _git(["rev-parse", "HEAD"]).stdout.strip()

0 commit comments

Comments
 (0)