mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-03 20:15:59 +01:00
Allow to redirect to Release page from activity
This commit is contained in:
@@ -360,7 +360,7 @@ trait ActivityService {
|
|||||||
repositoryName,
|
repositoryName,
|
||||||
activityUserName,
|
activityUserName,
|
||||||
"release",
|
"release",
|
||||||
s"[user:${activityUserName}] released ${name} at [repo:${userName}/${repositoryName}]",
|
s"[user:${activityUserName}] released [release:${userName}/${repositoryName}/${name}] at [repo:${userName}/${repositoryName}]",
|
||||||
None,
|
None,
|
||||||
currentDate
|
currentDate
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -232,6 +232,12 @@ object helpers extends AvatarImageProvider with LinkConverter with RequestCache
|
|||||||
s"""<a href="${context.path}/${m.group(1)}/${m.group(2)}/commit/${m.group(3)}">${m.group(1)}/${m
|
s"""<a href="${context.path}/${m.group(1)}/${m.group(2)}/commit/${m.group(3)}">${m.group(1)}/${m
|
||||||
.group(2)}@${m.group(3).substring(0, 7)}</a>"""
|
.group(2)}@${m.group(3).substring(0, 7)}</a>"""
|
||||||
)
|
)
|
||||||
|
.replaceAll(
|
||||||
|
"\\[release:([^\\s]+?)/([^\\s]+?)/([^\\s]+?)\\]",
|
||||||
|
(m: Match) =>
|
||||||
|
s"""<a href="${context.path}/${m.group(1)}/${m.group(2)}/releases/${encodeRefName(m.group(3))}">${m
|
||||||
|
.group(3)}</a>"""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user