├── project ├── build.properties └── plugins.sbt ├── doc ├── keys.png ├── labels.png ├── dragging.png └── screenshot.png ├── .travis.yml ├── .editorconfig ├── .scalafmt.conf ├── .gitignore ├── src └── main │ ├── scala │ ├── io │ │ └── github │ │ │ └── gitbucket │ │ │ └── labelkanban │ │ │ ├── service │ │ │ └── KanbanHelpers.scala │ │ │ ├── api │ │ │ ├── ApiDatasetKanban.scala │ │ │ ├── ApiAssigneeKanban.scala │ │ │ ├── ApiLabelKanban.scala │ │ │ ├── ApiPriorityKanban.scala │ │ │ ├── ApiMilestoneKanban.scala │ │ │ ├── ApiLaneKanban.scala │ │ │ └── ApiIssueKanban.scala │ │ │ └── controller │ │ │ └── LabelKanbanController.scala │ └── Plugin.scala │ ├── twirl │ └── labelkanban │ │ └── gitbucket │ │ ├── profile.scala.html │ │ ├── summary.scala.html │ │ ├── repository.scala.html │ │ ├── newissue.scala.html │ │ └── core.scala.html │ └── resources │ └── plugins │ └── labelkanban │ └── assets │ ├── plugin-labelkanban.css │ ├── setup-issue.js │ ├── plugin-labelkanban.js │ └── vue.min.js ├── .github └── workflows │ └── scala.yml ├── README.md └── LICENSE /project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version = 1.4.6 2 | -------------------------------------------------------------------------------- /doc/keys.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kasancode/gitbucket-label-kanban-plugin/HEAD/doc/keys.png -------------------------------------------------------------------------------- /doc/labels.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kasancode/gitbucket-label-kanban-plugin/HEAD/doc/labels.png -------------------------------------------------------------------------------- /doc/dragging.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kasancode/gitbucket-label-kanban-plugin/HEAD/doc/dragging.png -------------------------------------------------------------------------------- /doc/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kasancode/gitbucket-label-kanban-plugin/HEAD/doc/screenshot.png -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: scala 3 | scala: 4 | - 2.13.1 5 | jdk: 6 | - openjdk8 7 | script: 8 | - sbt test 9 | -------------------------------------------------------------------------------- /project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("io.github.gitbucket" % "sbt-gitbucket-plugin" % "1.5.0") 2 | addSbtPlugin("com.typesafe.sbt" % "sbt-twirl" % "1.4.2") -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | trim_trailing_whitespace = true 5 | insert_final_newline = true 6 | indent_style = space 7 | indent_size = 2 8 | 9 | [*.java] 10 | trim_trailing_whitespace = true 11 | insert_final_newline = true 12 | indent_style = space 13 | indent_size = 4 14 | -------------------------------------------------------------------------------- /.scalafmt.conf: -------------------------------------------------------------------------------- 1 | version = "2.3.2" 2 | project.git = true 3 | 4 | maxColumn = 120 5 | docstrings = JavaDoc 6 | 7 | align.tokens = ["%", "%%", {code = "=>", owner = "Case"}] 8 | align.openParenCallSite = false 9 | align.openParenDefnSite = false 10 | continuationIndent.callSite = 2 11 | continuationIndent.defnSite = 2 12 | danglingParentheses = true 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.class 2 | *.log 3 | vue.js 4 | 5 | # sbt specific 6 | dist/* 7 | target/ 8 | lib_managed/ 9 | src_managed/ 10 | project/boot/ 11 | project/plugins/project/ 12 | 13 | # Scala-IDE specific 14 | .scala_dependencies 15 | .classpath 16 | .project 17 | .cache 18 | .settings 19 | 20 | # IntelliJ specific 21 | .idea/ 22 | .idea_modules/ 23 | 24 | # Ensime 25 | .ensime 26 | .ensime_cache/ -------------------------------------------------------------------------------- /src/main/scala/io/github/gitbucket/labelkanban/service/KanbanHelpers.scala: -------------------------------------------------------------------------------- 1 | package io.github.gitbucket.labelkanban.service 2 | 3 | import java.security.MessageDigest 4 | 5 | package object KanbanHelpers { 6 | def toColorString(text:String):String = 7 | MessageDigest 8 | .getInstance("MD5") 9 | .digest(text.getBytes) 10 | .map("%02x".format(_)) 11 | .mkString 12 | .toUpperCase 13 | .substring(0, 6) 14 | } 15 | -------------------------------------------------------------------------------- /.github/workflows/scala.yml: -------------------------------------------------------------------------------- 1 | name: Scala CI 2 | 3 | on: 4 | push: 5 | branches: [ "master" ] 6 | pull_request: 7 | branches: [ "master" ] 8 | 9 | permissions: 10 | contents: read 11 | 12 | jobs: 13 | build: 14 | 15 | runs-on: ubuntu-latest 16 | 17 | steps: 18 | - uses: actions/checkout@v3 19 | - name: Set up JDK 11 20 | uses: actions/setup-java@v3 21 | with: 22 | java-version: '11' 23 | distribution: 'temurin' 24 | cache: 'sbt' 25 | - name: Run tests 26 | run: sbt test 27 | -------------------------------------------------------------------------------- /src/main/scala/io/github/gitbucket/labelkanban/api/ApiDatasetKanban.scala: -------------------------------------------------------------------------------- 1 | package io.github.gitbucket.labelkanban.api 2 | 3 | import gitbucket.core.api.{ApiPath, FieldSerializable} 4 | import gitbucket.core.util.RepositoryName 5 | import gitbucket.core.view.helpers 6 | 7 | import scala.collection.mutable 8 | 9 | case class ApiDataSetKanban( 10 | issues: List[ApiIssueKanban], 11 | lanes: mutable.LinkedHashMap[String,List[ApiLaneKanban]] 12 | ) 13 | extends FieldSerializable { 14 | 15 | } 16 | 17 | -------------------------------------------------------------------------------- /src/main/scala/io/github/gitbucket/labelkanban/api/ApiAssigneeKanban.scala: -------------------------------------------------------------------------------- 1 | package io.github.gitbucket.labelkanban.api 2 | 3 | import gitbucket.core.api.{ApiPath, FieldSerializable} 4 | import gitbucket.core.util.RepositoryName 5 | import gitbucket.core.view.helpers 6 | 7 | case class ApiAssigneeKanban(userName: String)(repositoryName: RepositoryName) 8 | extends FieldSerializable { 9 | val html_url = ApiPath(s"/${repositoryName.fullName}/issues?assigned=${helpers.urlEncode(userName)}&state=open") 10 | val detach_url = "" 11 | val attach_url = ApiPath(s"/api/v3/repos/${repositoryName.fullName}/plugin/labelkanban/assignee/${userName}/attach/issue/") 12 | } 13 | 14 | -------------------------------------------------------------------------------- /src/main/twirl/labelkanban/gitbucket/profile.scala.html: -------------------------------------------------------------------------------- 1 | @( 2 | prefix:String, 3 | account: gitbucket.core.model.Account, 4 | groupNames: List[String], 5 | extraMailAddresses: List[String])(implicit context: gitbucket.core.controller.Context) 6 | 7 | @import gitbucket.core.view.helpers 8 | @gitbucket.core.account.html.main(account, groupNames, "summarykanban", extraMailAddresses){ 9 | 10 |