mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-13 08:55:50 +01:00
Display last 3 commits for push action in the activity timeline.
This commit is contained in:
@@ -18,11 +18,15 @@
|
|||||||
}
|
}
|
||||||
case "push" => {
|
case "push" => {
|
||||||
<div class="small">
|
<div class="small">
|
||||||
{additionalInfo.split("\n").map{ commit =>
|
{additionalInfo.split("\n").reverse.take(4).zipWithIndex.map{ case (commit, i) =>
|
||||||
<div>
|
if(i == 3){
|
||||||
<a href={"%s/%s/%s/commit/%s".format(path, activity.userName, activity.repositoryName, commit.substring(0, 40))} class="monospace">{commit.substring(0, 7)}</a>
|
<div>...</div>
|
||||||
<span>{commit.substring(41)}</span>
|
} else {
|
||||||
</div>
|
<div>
|
||||||
|
<a href={"%s/%s/%s/commit/%s".format(path, activity.userName, activity.repositoryName, commit.substring(0, 40))} class="monospace">{commit.substring(0, 7)}</a>
|
||||||
|
<span>{commit.substring(41)}</span>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user