mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-12 00:15:50 +01:00
Ignore error in activity timeline caused by invalid data.
This commit is contained in:
@@ -12,31 +12,33 @@
|
|||||||
@activityMessage(activity.message)
|
@activityMessage(activity.message)
|
||||||
</div>
|
</div>
|
||||||
@activity.additionalInfo.map { additionalInfo =>
|
@activity.additionalInfo.map { additionalInfo =>
|
||||||
@(activity.activityType match {
|
@if(additionalInfo.nonEmpty){
|
||||||
case "create_wiki" => {
|
@(activity.activityType match {
|
||||||
<div class="small activity-message">Created <a href={s"${path}/${activity.userName}/${activity.repositoryName}/wiki/${additionalInfo}"}>{additionalInfo}</a>.</div>
|
case "create_wiki" => {
|
||||||
}
|
<div class="small activity-message">Created <a href={s"${path}/${activity.userName}/${activity.repositoryName}/wiki/${additionalInfo}"}>{additionalInfo}</a>.</div>
|
||||||
case "edit_wiki" => {
|
}
|
||||||
<div class="small activity-message">Edited <a href={s"${path}/${activity.userName}/${activity.repositoryName}/wiki/${additionalInfo}"}>{additionalInfo}</a>.</div>
|
case "edit_wiki" => {
|
||||||
}
|
<div class="small activity-message">Edited <a href={s"${path}/${activity.userName}/${activity.repositoryName}/wiki/${additionalInfo}"}>{additionalInfo}</a>.</div>
|
||||||
case "push" => {
|
}
|
||||||
<div class="small activity-message">
|
case "push" => {
|
||||||
{additionalInfo.split("\n").reverse.take(4).zipWithIndex.map{ case (commit, i) =>
|
<div class="small activity-message">
|
||||||
if(i == 3){
|
{additionalInfo.split("\n").reverse.take(4).zipWithIndex.map{ case (commit, i) =>
|
||||||
<div>...</div>
|
if(i == 3){
|
||||||
} else {
|
<div>...</div>
|
||||||
<div>
|
} else {
|
||||||
<a href={s"${path}/${activity.userName}/${activity.repositoryName}/commit/${commit.substring(0, 40)}"} class="monospace">{commit.substring(0, 7)}</a>
|
<div>
|
||||||
<span>{commit.substring(41)}</span>
|
<a href={s"${path}/${activity.userName}/${activity.repositoryName}/commit/${commit.substring(0, 40)}"} class="monospace">{commit.substring(0, 7)}</a>
|
||||||
</div>
|
<span>{commit.substring(41)}</span>
|
||||||
}
|
</div>
|
||||||
}}
|
}
|
||||||
</div>
|
}}
|
||||||
}
|
</div>
|
||||||
case _ => {
|
}
|
||||||
<div class=" activity-message">{additionalInfo}</div>
|
case _ => {
|
||||||
}
|
<div class=" activity-message">{additionalInfo}</div>
|
||||||
})
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user