summaryrefslogtreecommitdiffstats
path: root/models/activities/action.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/activities/action.go')
-rw-r--r--models/activities/action.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/models/activities/action.go b/models/activities/action.go
index 147511edec..5ff0079a6b 100644
--- a/models/activities/action.go
+++ b/models/activities/action.go
@@ -272,7 +272,7 @@ func (a *Action) GetRefLink() string {
return a.GetRepoLink() + "/src/branch/" + util.PathEscapeSegments(strings.TrimPrefix(a.RefName, git.BranchPrefix))
case strings.HasPrefix(a.RefName, git.TagPrefix):
return a.GetRepoLink() + "/src/tag/" + util.PathEscapeSegments(strings.TrimPrefix(a.RefName, git.TagPrefix))
- case len(a.RefName) == 40 && git.IsValidSHAPattern(a.RefName):
+ case len(a.RefName) == git.SHAFullLength && git.IsValidSHAPattern(a.RefName):
return a.GetRepoLink() + "/src/commit/" + a.RefName
default:
// FIXME: we will just assume it's a branch - this was the old way - at some point we may want to enforce that there is always a ref here.