Skip to content

Commit 61d8c14

Browse files
authored
Merge pull request #32 from source-c/master
update plugin to match SystemSettingsService from gitbucket-4.38.0
2 parents 456fdab + 4b37072 commit 61d8c14

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

build.sbt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
val Organization = "com.github.mrkm4ntr"
22
val Name = "gitbucket-network-plugin"
3-
val Version = "1.9.1"
3+
val Version = "1.9.2"
44

55
lazy val root = (project in file(".")).enablePlugins(SbtTwirl)
66

77
organization := Organization
88
name := Name
99
version := Version
1010
scalaVersion := "2.13.1"
11-
gitbucketVersion := "4.35.0"
11+
gitbucketVersion := "4.38.0"
1212

1313
resolvers ++= Seq(
1414
Resolver.jcenterRepo

src/main/scala/Plugin.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ class Plugin extends gitbucket.core.plugin.Plugin {
2424
new Version("1.8.0"),
2525
new Version("1.8.1"),
2626
new Version("1.9.0"),
27-
new Version("1.9.1")
27+
new Version("1.9.1"),
28+
new Version("1.9.2")
2829
)
2930

3031
override val description: String = "Provides Network feature on Gitbucket."

src/main/scala/mrkm4ntr/gitbucket/network/controller/NetworkController.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ trait NetworkControllerBase extends ControllerBase {
6969
val revWalk = new PlotWalk(repo)
7070
revWalk.sort(RevSort.COMMIT_TIME_DESC)
7171
try {
72-
if(allBranches.isDefined) {
72+
if (allBranches.isDefined) {
7373
revWalk.markStart(repository.branchList.map(repo.resolve).map(revWalk.parseCommit(_)).asJava)
7474
} else {
7575
revWalk.markStart(revWalk.parseCommit(repo.resolve(currentBranch)))
@@ -107,13 +107,13 @@ trait NetworkControllerBase extends ControllerBase {
107107

108108
def getAvatarUrl(mailAddress: String, size: Int)(implicit context: Context): String = {
109109
getAccountByMailAddressFromCache(mailAddress).map { account =>
110-
if (account.image.isEmpty && context.settings.gravatar) {
110+
if (account.image.isEmpty && context.settings.basicBehavior.gravatar) {
111111
s"""https://www.gravatar.com/avatar/${StringUtil.md5(account.mailAddress.toLowerCase)}?s=$size&d=retro&r=g"""
112112
} else {
113113
s"""${context.path}/${account.userName}/_avatar"""
114114
}
115115
} getOrElse {
116-
if (context.settings.gravatar) {
116+
if (context.settings.basicBehavior.gravatar) {
117117
s"""https://www.gravatar.com/avatar/${StringUtil.md5(mailAddress.toLowerCase)}?s=$size&d=retro&r=g"""
118118
} else {
119119
s"""${context.path}/_unknown/_avatar"""

0 commit comments

Comments
 (0)