mirror of
https://github.com/gitbucket/gitbucket.git
synced 2026-05-08 13:27:15 +02:00
Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4c76b6dd96 | ||
|
|
7e66917993 | ||
|
|
eb0f985399 | ||
|
|
3a2908c3a3 | ||
|
|
f13c10859f | ||
|
|
8e8a314c91 | ||
|
|
dad0478b87 | ||
|
|
240b34016d | ||
|
|
2c164d630c | ||
|
|
3d12a9038f | ||
|
|
71fc02b5cd | ||
|
|
74caaa3d94 | ||
|
|
e024c12521 | ||
|
|
1d0c364947 |
@@ -1,6 +1,14 @@
|
||||
# Changelog
|
||||
All changes to the project will be documented in this file.
|
||||
|
||||
## 4.38.2 - 20 Sep 2022
|
||||
- Resurrect assignee icons on the issue list
|
||||
|
||||
## 4.38.1 - 10 Sep 2022
|
||||
- Fix comment diff in Chrome 105
|
||||
- Fix Markdown table CSS
|
||||
- Fix HTML rendering of multiple asignees
|
||||
|
||||
## 4.38.0 - 3 Sep 2022
|
||||
- Support multiple assignees for Issues and Pull requests
|
||||
- Custom fields for issues and pull requests
|
||||
|
||||
@@ -61,6 +61,14 @@ Support
|
||||
|
||||
What's New in 4.38.x
|
||||
-------------
|
||||
## 4.38.2 - 20 Sep 2022
|
||||
- Resurrect assignee icons on the issue list
|
||||
|
||||
## 4.38.1 - 10 Sep 2022
|
||||
- Fix comment diff in Chrome 105
|
||||
- Fix Markdown table CSS
|
||||
- Fix HTML rendering of multiple asignees
|
||||
|
||||
## 4.38.0 - 3 Sep 2022
|
||||
- Support multiple assignees for Issues and Pull requests
|
||||
- Custom fields for issues and pull requests
|
||||
|
||||
12
build.sbt
12
build.sbt
@@ -3,9 +3,9 @@ import com.jsuereth.sbtpgp.PgpKeys._
|
||||
|
||||
val Organization = "io.github.gitbucket"
|
||||
val Name = "gitbucket"
|
||||
val GitBucketVersion = "4.38.0"
|
||||
val GitBucketVersion = "4.38.2"
|
||||
val ScalatraVersion = "2.8.2"
|
||||
val JettyVersion = "9.4.48.v20220622"
|
||||
val JettyVersion = "9.4.49.v20220914"
|
||||
val JgitVersion = "5.13.1.202206130422-r"
|
||||
|
||||
lazy val root = (project in file("."))
|
||||
@@ -15,7 +15,7 @@ sourcesInBase := false
|
||||
organization := Organization
|
||||
name := Name
|
||||
version := GitBucketVersion
|
||||
scalaVersion := "2.13.8"
|
||||
scalaVersion := "2.13.9"
|
||||
|
||||
scalafmtOnCompile := true
|
||||
|
||||
@@ -41,7 +41,7 @@ libraryDependencies ++= Seq(
|
||||
"org.apache.commons" % "commons-email" % "1.5",
|
||||
"commons-net" % "commons-net" % "3.8.0",
|
||||
"org.apache.httpcomponents" % "httpclient" % "4.5.13",
|
||||
"org.apache.sshd" % "apache-sshd" % "2.9.0" exclude ("org.slf4j", "slf4j-jdk14") exclude ("org.apache.sshd", "sshd-mina") exclude ("org.apache.sshd", "sshd-netty"),
|
||||
"org.apache.sshd" % "apache-sshd" % "2.9.1" exclude ("org.slf4j", "slf4j-jdk14") exclude ("org.apache.sshd", "sshd-mina") exclude ("org.apache.sshd", "sshd-netty"),
|
||||
"org.apache.tika" % "tika-core" % "2.4.1",
|
||||
"com.github.takezoe" %% "blocking-slick-32" % "0.0.12" cross CrossVersion.for3Use2_13,
|
||||
"com.novell.ldap" % "jldap" % "2009-10-07",
|
||||
@@ -56,12 +56,12 @@ libraryDependencies ++= Seq(
|
||||
"org.cache2k" % "cache2k-all" % "1.6.0.Final",
|
||||
"net.coobird" % "thumbnailator" % "0.4.17",
|
||||
"com.github.zafarkhaja" % "java-semver" % "0.9.0",
|
||||
"com.nimbusds" % "oauth2-oidc-sdk" % "9.42",
|
||||
"com.nimbusds" % "oauth2-oidc-sdk" % "9.43.1",
|
||||
"org.eclipse.jetty" % "jetty-webapp" % JettyVersion % "provided",
|
||||
"javax.servlet" % "javax.servlet-api" % "3.1.0" % "provided",
|
||||
"junit" % "junit" % "4.13.2" % "test",
|
||||
"org.scalatra" %% "scalatra-scalatest" % ScalatraVersion % "test" cross CrossVersion.for3Use2_13,
|
||||
"org.mockito" % "mockito-core" % "4.7.0" % "test",
|
||||
"org.mockito" % "mockito-core" % "4.8.0" % "test",
|
||||
"com.dimafeng" %% "testcontainers-scala" % "0.40.10" % "test",
|
||||
"org.testcontainers" % "mysql" % "1.17.3" % "test",
|
||||
"org.testcontainers" % "postgresql" % "1.17.3" % "test",
|
||||
|
||||
@@ -111,5 +111,7 @@ object GitBucketCoreModule
|
||||
new Version("4.37.0", new LiquibaseMigration("update/gitbucket-core_4.37.xml")),
|
||||
new Version("4.37.1"),
|
||||
new Version("4.37.2"),
|
||||
new Version("4.38.0", new LiquibaseMigration("update/gitbucket-core_4.38.xml"))
|
||||
new Version("4.38.0", new LiquibaseMigration("update/gitbucket-core_4.38.xml")),
|
||||
new Version("4.38.1"),
|
||||
new Version("4.38.2")
|
||||
)
|
||||
|
||||
@@ -45,7 +45,7 @@ trait PrioritiesControllerBase extends ControllerBase {
|
||||
get("/:owner/:repository/issues/priorities")(referrersOnly { repository =>
|
||||
html.list(
|
||||
getPriorities(repository.owner, repository.name),
|
||||
countIssueGroupByPriorities(repository.owner, repository.name, IssuesService.IssueSearchCondition(), Map.empty),
|
||||
countIssueGroupByPriorities(repository.owner, repository.name, IssuesService.IssueSearchCondition()),
|
||||
repository,
|
||||
hasDeveloperRole(repository.owner, repository.name, context.loginAccount)
|
||||
)
|
||||
@@ -60,7 +60,7 @@ trait PrioritiesControllerBase extends ControllerBase {
|
||||
createPriority(repository.owner, repository.name, form.priorityName, form.description, form.color.substring(1))
|
||||
html.priority(
|
||||
getPriority(repository.owner, repository.name, priorityId).get,
|
||||
countIssueGroupByPriorities(repository.owner, repository.name, IssuesService.IssueSearchCondition(), Map.empty),
|
||||
countIssueGroupByPriorities(repository.owner, repository.name, IssuesService.IssueSearchCondition()),
|
||||
repository,
|
||||
hasDeveloperRole(repository.owner, repository.name, context.loginAccount)
|
||||
)
|
||||
@@ -84,7 +84,7 @@ trait PrioritiesControllerBase extends ControllerBase {
|
||||
)
|
||||
html.priority(
|
||||
getPriority(repository.owner, repository.name, params("priorityId").toInt).get,
|
||||
countIssueGroupByPriorities(repository.owner, repository.name, IssuesService.IssueSearchCondition(), Map.empty),
|
||||
countIssueGroupByPriorities(repository.owner, repository.name, IssuesService.IssueSearchCondition()),
|
||||
repository,
|
||||
hasDeveloperRole(repository.owner, repository.name, context.loginAccount)
|
||||
)
|
||||
|
||||
@@ -7,7 +7,7 @@ import gitbucket.core.model.Profile.profile.blockingApi._
|
||||
import gitbucket.core.model.Profile.dateColumnType
|
||||
import gitbucket.core.util.{LDAPUtil, StringUtil}
|
||||
import StringUtil._
|
||||
import com.nimbusds.jose.{Algorithm, JWSAlgorithm, JWSHeader}
|
||||
import com.nimbusds.jose.{JWSAlgorithm, JWSHeader}
|
||||
import com.nimbusds.jose.crypto.{MACSigner, MACVerifier}
|
||||
import com.nimbusds.jwt.{JWTClaimsSet, SignedJWT}
|
||||
import gitbucket.core.plugin.PluginRegistry
|
||||
@@ -65,28 +65,28 @@ trait AccountService {
|
||||
case Right(ldapUserInfo) => {
|
||||
// Create or update account by LDAP information
|
||||
getAccountByUserName(ldapUserInfo.userName, true) match {
|
||||
case Some(x) if (!x.isRemoved) => {
|
||||
if (settings.ldap.get.mailAttribute.getOrElse("").isEmpty) {
|
||||
updateAccount(x.copy(fullName = ldapUserInfo.fullName))
|
||||
case Some(x) =>
|
||||
if (x.isRemoved) {
|
||||
logger.info("LDAP Authentication Failed: Account is already registered but disabled.")
|
||||
defaultAuthentication(userName, password)
|
||||
} else {
|
||||
updateAccount(x.copy(mailAddress = ldapUserInfo.mailAddress, fullName = ldapUserInfo.fullName))
|
||||
if (settings.ldap.get.mailAttribute.getOrElse("").isEmpty) {
|
||||
updateAccount(x.copy(fullName = ldapUserInfo.fullName))
|
||||
} else {
|
||||
updateAccount(x.copy(mailAddress = ldapUserInfo.mailAddress, fullName = ldapUserInfo.fullName))
|
||||
}
|
||||
getAccountByUserName(ldapUserInfo.userName)
|
||||
}
|
||||
getAccountByUserName(ldapUserInfo.userName)
|
||||
}
|
||||
case Some(x) if (x.isRemoved) => {
|
||||
logger.info("LDAP Authentication Failed: Account is already registered but disabled.")
|
||||
defaultAuthentication(userName, password)
|
||||
}
|
||||
case None =>
|
||||
getAccountByMailAddress(ldapUserInfo.mailAddress, true) match {
|
||||
case Some(x) if (!x.isRemoved) => {
|
||||
updateAccount(x.copy(fullName = ldapUserInfo.fullName))
|
||||
getAccountByUserName(ldapUserInfo.userName)
|
||||
}
|
||||
case Some(x) if (x.isRemoved) => {
|
||||
logger.info("LDAP Authentication Failed: Account is already registered but disabled.")
|
||||
defaultAuthentication(userName, password)
|
||||
}
|
||||
case Some(x) =>
|
||||
if (x.isRemoved) {
|
||||
logger.info("LDAP Authentication Failed: Account is already registered but disabled.")
|
||||
defaultAuthentication(userName, password)
|
||||
} else {
|
||||
updateAccount(x.copy(fullName = ldapUserInfo.fullName))
|
||||
getAccountByUserName(ldapUserInfo.userName)
|
||||
}
|
||||
case None => {
|
||||
createAccount(
|
||||
ldapUserInfo.userName,
|
||||
|
||||
@@ -147,7 +147,7 @@ trait IssuesService {
|
||||
t3.labelName
|
||||
}
|
||||
.map {
|
||||
case labelName ~ t =>
|
||||
case (labelName, t) =>
|
||||
labelName -> t.length
|
||||
}
|
||||
.list
|
||||
@@ -165,8 +165,7 @@ trait IssuesService {
|
||||
def countIssueGroupByPriorities(
|
||||
owner: String,
|
||||
repository: String,
|
||||
condition: IssueSearchCondition,
|
||||
filterUser: Map[String, String]
|
||||
condition: IssueSearchCondition
|
||||
)(implicit s: Session): Map[String, Int] = {
|
||||
|
||||
searchIssueQuery(Seq(owner -> repository), condition.copy(labels = Set.empty), IssueSearchOption.Issues)
|
||||
@@ -180,7 +179,7 @@ trait IssuesService {
|
||||
t2.priorityName
|
||||
}
|
||||
.map {
|
||||
case priorityName ~ t =>
|
||||
case (priorityName, t) =>
|
||||
priorityName -> t.length
|
||||
}
|
||||
.list
|
||||
@@ -216,9 +215,11 @@ trait IssuesService {
|
||||
.on { case t1 ~ t2 ~ i ~ t3 ~ t4 ~ t5 ~ t6 => t1.byPriority(t6.userName, t6.repositoryName, t6.priorityId) }
|
||||
.joinLeft(PullRequests)
|
||||
.on { case t1 ~ t2 ~ i ~ t3 ~ t4 ~ t5 ~ t6 ~ t7 => t1.byIssue(t7.userName, t7.repositoryName, t7.issueId) }
|
||||
.sortBy { case t1 ~ t2 ~ i ~ t3 ~ t4 ~ t5 ~ t6 ~ t7 => i asc }
|
||||
.joinLeft(IssueAssignees)
|
||||
.on { case t1 ~ t2 ~ i ~ t3 ~ t4 ~ t5 ~ t6 ~ t7 ~ t8 => t1.byIssue(t8.userName, t8.repositoryName, t8.issueId) }
|
||||
.sortBy { case t1 ~ t2 ~ i ~ t3 ~ t4 ~ t5 ~ t6 ~ t7 ~ t8 => i asc }
|
||||
.map {
|
||||
case t1 ~ t2 ~ i ~ t3 ~ t4 ~ t5 ~ t6 ~ t7 =>
|
||||
case t1 ~ t2 ~ i ~ t3 ~ t4 ~ t5 ~ t6 ~ t7 ~ t8 =>
|
||||
(
|
||||
t1,
|
||||
t2.commentCount,
|
||||
@@ -227,7 +228,8 @@ trait IssuesService {
|
||||
t4.map(_.color),
|
||||
t5.map(_.title),
|
||||
t6.map(_.priorityName),
|
||||
t7.map(_.commitIdTo)
|
||||
t7.map(_.commitIdTo),
|
||||
t8.map(_.assigneeUserName)
|
||||
)
|
||||
}
|
||||
.list
|
||||
@@ -237,7 +239,7 @@ trait IssuesService {
|
||||
|
||||
result.map { issues =>
|
||||
issues.head match {
|
||||
case (issue, commentCount, _, _, _, milestone, priority, commitId) =>
|
||||
case (issue, commentCount, _, _, _, milestone, priority, commitId, _) =>
|
||||
IssueInfo(
|
||||
issue,
|
||||
issues.flatMap { t =>
|
||||
@@ -246,7 +248,8 @@ trait IssuesService {
|
||||
milestone,
|
||||
priority,
|
||||
commentCount,
|
||||
commitId
|
||||
commitId,
|
||||
issues.flatMap(_._9)
|
||||
)
|
||||
}
|
||||
} toList
|
||||
@@ -270,7 +273,7 @@ trait IssuesService {
|
||||
.map { case t1 ~ t2 ~ i ~ t3 ~ t4 ~ t5 => (t1, t3, t5) }
|
||||
.list
|
||||
.groupBy {
|
||||
case (issue, account, assignedUsers) =>
|
||||
case (issue, account, _) =>
|
||||
(issue, account)
|
||||
}
|
||||
.map {
|
||||
@@ -748,12 +751,12 @@ trait IssuesService {
|
||||
s: Session
|
||||
): Int = {
|
||||
Issues.filter(_.byPrimaryKey(owner, repository, issueId)).map(_.updatedDate).update(currentDate)
|
||||
IssueComments.filter(_.byPrimaryKey(commentId)).firstOption match {
|
||||
case Some(c) if c.action == "reopen_comment" =>
|
||||
IssueComments.filter(_.byPrimaryKey(commentId)).first match {
|
||||
case c if c.action == "reopen_comment" =>
|
||||
IssueComments.filter(_.byPrimaryKey(commentId)).map(t => (t.content, t.action)).update("Reopen", "reopen")
|
||||
case Some(c) if c.action == "close_comment" =>
|
||||
case c if c.action == "close_comment" =>
|
||||
IssueComments.filter(_.byPrimaryKey(commentId)).map(t => (t.content, t.action)).update("Close", "close")
|
||||
case Some(_) =>
|
||||
case _ =>
|
||||
IssueComments.filter(_.byPrimaryKey(commentId)).delete
|
||||
IssueComments insert IssueComment(
|
||||
userName = owner,
|
||||
@@ -1084,7 +1087,8 @@ object IssuesService {
|
||||
milestone: Option[String],
|
||||
priority: Option[String],
|
||||
commentCount: Int,
|
||||
commitId: Option[String]
|
||||
commitId: Option[String],
|
||||
assignees: Seq[String]
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@issues.map { case (IssueInfo(issue, labels, milestone, priority, commentCount, commitId), status) =>
|
||||
@issues.map { case (IssueInfo(issue, labels, milestone, priority, commentCount, commitId, assignedUserNames), status) =>
|
||||
<tr>
|
||||
<td style="padding-top: 12px; padding-bottom: 12px;">
|
||||
<a href="@context.path/@issue.userName/@issue.repositoryName">@issue.userName/@issue.repositoryName</a> ・
|
||||
@@ -33,11 +33,9 @@
|
||||
<span class="label-color small" style="background-color: #@label.color; color: #@label.fontColor; padding-left: 4px; padding-right: 4px">@label.labelName</span>
|
||||
}
|
||||
<span class="pull-right muted">
|
||||
@*
|
||||
@issue.assignedUserName.map { userName =>
|
||||
@assignedUserNames.map { userName =>
|
||||
@helpers.avatar(userName, 20, tooltip = true)
|
||||
}
|
||||
*@
|
||||
@if(commentCount > 0){
|
||||
<a href="@context.path/@issue.userName/@issue.repositoryName/issues/@issue.issueId" class="issue-comment-count">
|
||||
<i class="octicon octicon-comment active"></i> @commentCount
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
</div>
|
||||
<span id="label-assigned">
|
||||
@issueAssignees.map { asignee =>
|
||||
@helpers.avatarLink(asignee.assigneeUserName, 20) @helpers.user(asignee.assigneeUserName, styleClass="username strong small")
|
||||
<div>@helpers.avatarLink(asignee.assigneeUserName, 20) @helpers.user(asignee.assigneeUserName, styleClass="username strong small")</div>
|
||||
}
|
||||
@if(issueAssignees.isEmpty) {
|
||||
<span class="muted small">No one assigned</span>
|
||||
|
||||
@@ -206,7 +206,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
@issues.map { case (IssueInfo(issue, labels, milestone, priority, commentCount, commitId), status) =>
|
||||
@issues.map { case (IssueInfo(issue, labels, milestone, priority, commentCount, commitId, assignedUserNames), status) =>
|
||||
<tr>
|
||||
<td style="padding-top: 12px; padding-bottom: 12px;">
|
||||
@if(isManageable){
|
||||
@@ -230,11 +230,9 @@
|
||||
<span class="label-color small" style="background-color: #@label.color; color: #@label.fontColor; padding-left: 4px; padding-right: 4px">@label.labelName</span>
|
||||
}
|
||||
<span class="pull-right small">
|
||||
@*
|
||||
@issue.assignedUserName.map { userName =>
|
||||
@assignedUserNames.map { userName =>
|
||||
@helpers.avatar(userName, 20, tooltip = true)
|
||||
}
|
||||
*@
|
||||
@if(commentCount > 0){
|
||||
<a href="@context.path/@issue.userName/@issue.repositoryName/issues/@issue.issueId" class="issue-comment-count">
|
||||
<i class="octicon octicon-comment active"></i> @commentCount
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
@issues.map { case (IssueInfo(issue, labels, milestone, priority, commentCount, commitId), status) =>
|
||||
@issues.map { case (IssueInfo(issue, labels, milestone, priority, commentCount, commitId, assignedUserNames), status) =>
|
||||
<tr>
|
||||
<td style="padding-top: 12px; padding-bottom: 12px;">
|
||||
@if(isManageable){
|
||||
@@ -90,11 +90,9 @@
|
||||
<span class="label-color small" style="background-color: #@label.color; color: #@label.fontColor; padding-left: 4px; padding-right: 4px">@label.labelName</span>
|
||||
}
|
||||
<span class="pull-right small">
|
||||
@*
|
||||
@issue.assignedUserName.map { userName =>
|
||||
@assignedUserNames.map { userName =>
|
||||
@helpers.avatar(userName, 20, tooltip = true)
|
||||
}
|
||||
*@
|
||||
@if(commentCount > 0){
|
||||
<a href="@context.path/@issue.userName/@issue.repositoryName/issues/@issue.issueId" class="issue-comment-count">
|
||||
<i class="octicon octicon-comment active"></i> @commentCount
|
||||
|
||||
@@ -55,10 +55,10 @@
|
||||
});
|
||||
|
||||
@if(newLineNumber.isDefined){
|
||||
var diff = getDiffData($('table[filename="@fileName"] table.diff tr:has(th.line-num.newline[line-number=@newLineNumber])'));
|
||||
var diff = getDiffData($('table[filename="@fileName"] table.diff tr:has(th.line-num.newline[line-number="@newLineNumber"])'));
|
||||
param['diff'] = JSON.stringify(diff);
|
||||
} else if(oldLineNumber.isDefined){
|
||||
var diff = getDiffData($('table[filename="@fileName"] table.diff tr:has(th.line-num.oldline[line-number=@oldLineNumber])'));
|
||||
var diff = getDiffData($('table[filename="@fileName"] table.diff tr:has(th.line-num.oldline[line-number="@oldLineNumber"])'));
|
||||
param['diff'] = JSON.stringify(diff);
|
||||
}
|
||||
|
||||
|
||||
@@ -1527,6 +1527,7 @@ div.markdown-body code {
|
||||
|
||||
div.markdown-body table {
|
||||
max-width: 100%;
|
||||
width: max-content;
|
||||
overflow: auto;
|
||||
display: block;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user