├── .github
├── CODEOWNERS
├── dependabot.yml
└── workflows
│ └── build.yml
├── project
├── build.properties
└── plugins.sbt
├── src
└── main
│ ├── scala
│ ├── gitbucket
│ │ └── gist
│ │ │ ├── model
│ │ │ ├── GistUser.scala
│ │ │ ├── GistInfo.scala
│ │ │ ├── GistProfile.scala
│ │ │ ├── Mode.scala
│ │ │ ├── GistComment.scala
│ │ │ └── Gist.scala
│ │ │ ├── util
│ │ │ ├── Configurations.scala
│ │ │ ├── GistAuthenticator.scala
│ │ │ └── GistUtils.scala
│ │ │ ├── service
│ │ │ ├── GistCommentService.scala
│ │ │ └── GistService.scala
│ │ │ └── controller
│ │ │ └── GistController.scala
│ └── Plugin.scala
│ ├── resources
│ ├── update
│ │ ├── gitbucket-gist_4.2.xml
│ │ └── gitbucket-gist_2.0.xml
│ └── gitbucket
│ │ └── gist
│ │ └── assets
│ │ └── style.css
│ └── twirl
│ └── gitbucket
│ └── gist
│ ├── commentform.scala.html
│ ├── forks.scala.html
│ ├── profile.scala.html
│ ├── commentpreview.scala.html
│ ├── commentedit.scala.html
│ ├── header.scala.html
│ ├── detail.scala.html
│ ├── editor.scala.html
│ ├── detail.scala.js
│ ├── commentlist.scala.html
│ ├── list.scala.html
│ ├── menu.scala.html
│ ├── revisions.scala.html
│ └── edit.scala.html
├── .gitignore
├── README.md
├── etc
└── icons.svg
└── LICENSE
/.github/CODEOWNERS:
--------------------------------------------------------------------------------
1 | * @takezoe @xuwei-k
2 |
--------------------------------------------------------------------------------
/project/build.properties:
--------------------------------------------------------------------------------
1 | sbt.version = 1.11.7
2 |
--------------------------------------------------------------------------------
/project/plugins.sbt:
--------------------------------------------------------------------------------
1 | addSbtPlugin("io.github.gitbucket" % "sbt-gitbucket-plugin" % "1.6.0")
--------------------------------------------------------------------------------
/src/main/scala/gitbucket/gist/model/GistUser.scala:
--------------------------------------------------------------------------------
1 | package gitbucket.gist.model
2 |
3 | case class GistUser(userName: String, fullName: String)
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | version: 2
2 | updates:
3 | - package-ecosystem: "github-actions"
4 | directory: "/"
5 | schedule:
6 | interval: "weekly"
7 |
--------------------------------------------------------------------------------
/src/main/scala/gitbucket/gist/model/GistInfo.scala:
--------------------------------------------------------------------------------
1 | package gitbucket.gist.model
2 |
3 | case class GistInfo(fileName: String, source: String, fileCount: Int, forkedCount: Int, commentCount: Int)
--------------------------------------------------------------------------------
/src/main/scala/gitbucket/gist/model/GistProfile.scala:
--------------------------------------------------------------------------------
1 | package gitbucket.gist.model
2 |
3 | import gitbucket.core.model._
4 |
5 | object Profile extends CoreProfile
6 | with GistComponent
7 | with GistCommentComponent
8 |
--------------------------------------------------------------------------------
/src/main/scala/gitbucket/gist/util/Configurations.scala:
--------------------------------------------------------------------------------
1 | package gitbucket.gist.util
2 |
3 | object Configurations {
4 | lazy val GistRepoDir = s"${gitbucket.core.util.Directory.GitBucketHome}/gist"
5 | lazy val Limit = 10
6 | }
7 |
--------------------------------------------------------------------------------
/src/main/resources/update/gitbucket-gist_4.2.xml:
--------------------------------------------------------------------------------
1 |
2 |
@gistInfo.source65 | } 66 |
| 33 | @diff.changeType match { 34 | case ChangeType.ADD => { 35 | 36 | 37 | @diff.newPath 38 | } 39 | case ChangeType.MODIFY => { 40 | 41 | 42 | @diff.newPath 43 | } 44 | case ChangeType.DELETE => { 45 | 46 | 47 | @diff.oldPath 48 | } 49 | case _ => { 50 | } 51 | } 52 | | 53 |
|---|
| 58 | @if(diff.newContent != None || diff.oldContent != None){ 59 | 60 | 61 | 62 | } else { 63 | Not supported 64 | } 65 | | 66 |