Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/treetrek.git

Updates tag URLs

Author Dave Jarvis <email>
Date 2026-02-15 22:34:04 GMT-0800
Commit 3bc9694005c92a4d394faff4c8806f655557dd99
Parent e129ad2
render/TagRenderer.php
<?php
+require_once __DIR__ . '/../UrlBuilder.php';
+
interface TagRenderer {
public function renderTagItem(
string $author
): void {
- $repoParam = '&repo=' . urlencode( $this->repoSafeName );
- $filesUrl = '?hash=' . $targetSha . $repoParam;
- $commitUrl = '?action=commit&hash=' . $targetSha . $repoParam;
+ $filesUrl = (new UrlBuilder())
+ ->withRepo( $this->repoSafeName )
+ ->withAction( 'tree' )
+ ->withHash( $targetSha )
+ ->build();
+
+ $commitUrl = (new UrlBuilder())
+ ->withRepo( $this->repoSafeName )
+ ->withAction( 'commit' )
+ ->withHash( $targetSha )
+ ->build();
echo '<tr>';
Delta 13 lines added, 3 lines removed, 10-line increase