1
0
Fork 0
mirror of https://code.sup39.dev/repos/Wqawg synced 2024-12-31 05:04:51 +09:00

In Push activity summary, list the titles of the pushed commits

This commit is contained in:
fr33domlover 2019-10-13 19:19:24 +00:00
parent 6c81a46a02
commit 0be7fa05f8

View file

@ -498,13 +498,28 @@ postPostReceiveR = do
summary <- do summary <- do
let mbranch = H.pushBranch push let mbranch = H.pushBranch push
total = pushCommitsTotal pushAP total = pushCommitsTotal pushAP
lasts = pushCommitsLast pushAP
rest firsts = total - length firsts - length lasts
hashText (Hash b) = decodeUtf8 b
commitW c =
[hamlet|
<a href=@{RepoPatchR shr rp $ hashText $ commitHash c}>
#{commitTitle c}
|]
withUrlRenderer withUrlRenderer
[hamlet| [hamlet|
<p> <p>
<a href=@{SharerR shrUser}>#{shr2text shrUser} <a href=@{SharerR shrUser}>#{shr2text shrUser}
\ pushed #{total} # \ pushed #{total} #
\ #{commitsText mbranch total} to repo # \ #{commitsText mbranch total} to repo #
<a href=@{RepoR shr rp}>#{rp2text rp}</a>^{branchText shr rp mbranch}. <a href=@{RepoR shr rp}>#{rp2text rp}</a>^{branchText shr rp mbranch}:
<ul>
$maybe firsts <- pushCommitsFirst pushAP
$forall c <- firsts
<li>^{commitW c}
<li>#{rest firsts}
$forall c <- lasts
<li>^{commitW c}
|] |]
eid <- pushCommitsC user summary pushAP shr rp eid <- pushCommitsC user summary pushAP shr rp
case eid of case eid of