Skip to content

Commit

Permalink
Merged #1 "Ticket tracker with patchset contributions"
Browse files Browse the repository at this point in the history
  • Loading branch information
gitblit committed Mar 4, 2014
2 parents 94e12c1 + 5e3521f commit acaa2a2
Show file tree
Hide file tree
Showing 89 changed files with 16,359 additions and 692 deletions.
2 changes: 2 additions & 0 deletions .classpath
Expand Up @@ -70,6 +70,8 @@
<classpathentry kind="lib" path="ext/guava-13.0.1.jar" sourcepath="ext/src/guava-13.0.1.jar" />
<classpathentry kind="lib" path="ext/libpam4j-1.7.jar" sourcepath="ext/src/libpam4j-1.7.jar" />
<classpathentry kind="lib" path="ext/commons-codec-1.7.jar" sourcepath="ext/src/commons-codec-1.7.jar" />
<classpathentry kind="lib" path="ext/jedis-2.3.1.jar" sourcepath="ext/src/jedis-2.3.1.jar" />
<classpathentry kind="lib" path="ext/commons-pool2-2.0.jar" sourcepath="ext/src/commons-pool2-2.0.jar" />
<classpathentry kind="lib" path="ext/junit-4.11.jar" sourcepath="ext/src/junit-4.11.jar" />
<classpathentry kind="lib" path="ext/hamcrest-core-1.3.jar" sourcepath="ext/src/hamcrest-core-1.3.jar" />
<classpathentry kind="lib" path="ext/selenium-java-2.28.0.jar" sourcepath="ext/src/selenium-java-2.28.0.jar" />
Expand Down
17 changes: 16 additions & 1 deletion NOTICE
Expand Up @@ -326,4 +326,19 @@ font-awesome
SIL OFL 1.1.

https://github.com/FortAwesome/Font-Awesome


---------------------------------------------------------------------------
AUI (excerpts)
---------------------------------------------------------------------------
AUI, release under the
Apache License 2.0

https://bitbucket.org/atlassian/aui

---------------------------------------------------------------------------
Jedis
---------------------------------------------------------------------------
Jedis, release under the
MIT license

https://github.com/xetorthio/jedis
1 change: 1 addition & 0 deletions build.moxie
Expand Up @@ -170,6 +170,7 @@ dependencies:
- compile 'com.github.dblock.waffle:waffle-jna:1.5' :war
- compile 'org.kohsuke:libpam4j:1.7' :war
- compile 'commons-codec:commons-codec:1.7' :war
- compile 'redis.clients:jedis:2.3.1' :war
- test 'junit'
# Dependencies for Selenium web page testing
- test 'org.seleniumhq.selenium:selenium-java:${selenium.version}' @jar
Expand Down
14 changes: 14 additions & 0 deletions build.xml
Expand Up @@ -566,6 +566,13 @@
<page name="eclipse plugin" src="eclipse_plugin.mkd" />
</menu>
<divider />
<menu name="tickets" pager="true" pagerPlacement="bottom" pagerLayout="justified">
<page name="overview" src="tickets_overview.mkd" />
<page name="using" src="tickets_using.mkd" />
<page name="barnum" src="tickets_barnum.mkd" />
<page name="setup" src="tickets_setup.mkd" />
</menu>
<divider />
<page name="federation" src="federation.mkd" />
<divider />
<page name="settings" src="properties.mkd" />
Expand Down Expand Up @@ -890,6 +897,13 @@
<page name="eclipse plugin" src="eclipse_plugin.mkd" />
</menu>
<divider />
<menu name="tickets" pager="true" pagerPlacement="bottom" pagerLayout="justified">
<page name="overview" src="tickets_overview.mkd" />
<page name="using" src="tickets_using.mkd" />
<page name="barnum" src="tickets_barnum.mkd" />
<page name="setup" src="tickets_setup.mkd" />
</menu>
<divider />
<page name="federation" src="federation.mkd" />
<divider />
<page name="settings" src="properties.mkd" />
Expand Down
22 changes: 22 additions & 0 deletions gitblit.iml
Expand Up @@ -724,6 +724,28 @@
</SOURCES>
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="jedis-2.3.1.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/ext/jedis-2.3.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MODULE_DIR$/ext/src/jedis-2.3.1.jar!/" />
</SOURCES>
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="commons-pool2-2.0.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/ext/commons-pool2-2.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MODULE_DIR$/ext/src/commons-pool2-2.0.jar!/" />
</SOURCES>
</library>
</orderEntry>
<orderEntry type="module-library" scope="TEST">
<library name="junit-4.11.jar">
<CLASSES>
Expand Down
6 changes: 6 additions & 0 deletions releases.moxie
Expand Up @@ -59,6 +59,7 @@ r20: {
- Added an optional MirrorService which will periodically fetch ref updates from source repositories for mirrors (issue-5). Repositories must be manually cloned using native git and "--mirror".
- Added branch graph image servlet based on EGit's branch graph renderer (issue-194)
- Added option to render Markdown commit messages (issue-203)
- Added Ticket tracker and Patchset collaboration feature (issue-215)
- Added setting to control creating a repository as --shared on Unix servers (issue-263)
- Set Link: <url>; rel="canonical" http header for SEO (issue-304)
- Added raw links to the commit, commitdiff, and compare pages (issue-319)
Expand Down Expand Up @@ -86,6 +87,7 @@ r20: {
- added Dagger 1.1.0
- added Eclipse WikiText libraries for processing confluence, mediawiki, textile, tracwiki, and twiki
- added FontAwesome 4.0.3
- added Jedis 2.3.1
settings:
- { name: 'git.createRepositoriesShared', defaultValue: 'false' }
- { name: 'git.allowAnonymousPushes', defaultValue: 'false' }
Expand All @@ -105,6 +107,10 @@ r20: {
- { name: 'web.showBranchGraph', defaultValue: 'true' }
- { name: 'web.summaryShowReadme', defaultValue: 'false' }
- { name: 'server.redirectToHttpsPort', defaultValue: 'false' }
- { name: 'tickets.service', defaultValue: ' ' }
- { name: 'tickets.acceptNewTickets', defaultValue: 'true' }
- { name: 'tickets.acceptNewPatchsets', defaultValue: 'true' }
- { name: 'tickets.requireApproval', defaultValue: 'false' }
contributors:
- James Moger
- Robin Rosenberg
Expand Down
12 changes: 12 additions & 0 deletions src/main/distrib/data/clientapps.json
Expand Up @@ -9,6 +9,17 @@
"icon": "git-black_32x32.png",
"isActive": true
},
{
"name": "Barnum",
"title": "Barnum",
"description": "a command-line Git companion for Gitblit Tickets",
"legal": "released under the Apache 2.0 License",
"command": "pt clone ${repoUrl}",
"productUrl": "http://barnum.gitblit.com",
"transports": [ "ssh" ],
"icon": "barnum_32x32.png",
"isActive": false
},
{
"name": "SmartGit/Hg",
"title": "syntevo SmartGit/Hg\u2122",
Expand Down Expand Up @@ -73,6 +84,7 @@
"legal": "released under the GPLv3 open source license",
"cloneUrl": "sparkleshare://addProject/${baseUrl}/sparkleshare/${repoUrl}.xml",
"productUrl": "http://sparkleshare.org",
"transports": [ "ssh" ],
"platforms": [ "windows", "macintosh", "linux" ],
"icon": "sparkleshare_32x32.png",
"minimumPermission" : "RW+",
Expand Down
70 changes: 70 additions & 0 deletions src/main/distrib/data/gitblit.properties
Expand Up @@ -429,6 +429,76 @@ git.streamFileThreshold = 50m
# RESTART REQUIRED
git.packedGitMmap = false

# Use the Gitblit patch receive pack for processing contributions and tickets.
# This allows the user to push a patch using the familiar Gerrit syntax:
#
# git push <remote> HEAD:refs/for/<targetBranch>
#
# NOTE:
# This requires git.enableGitServlet = true AND it requires an authenticated
# git transport connection (http/https) when pushing from a client.
#
# Valid services include:
# com.gitblit.tickets.FileTicketService
# com.gitblit.tickets.BranchTicketService
# com.gitblit.tickets.RedisTicketService
#
# SINCE 1.4.0
# RESTART REQUIRED
tickets.service =

# Globally enable or disable creation of new bug, enhancement, task, etc tickets
# for all repositories.
#
# If false, no tickets can be created through the ui for any repositories.
# If true, each repository can control if they allow new tickets to be created.
#
# NOTE:
# If a repository is accepting patchsets, new proposal tickets can be created
# regardless of this setting.
#
# SINCE 1.4.0
tickets.acceptNewTickets = true

# Globally enable or disable pushing patchsets to all repositories.
#
# If false, no patchsets will be accepted for any repositories.
# If true, each repository can control if they accept new patchsets.
#
# NOTE:
# If a repository is accepting patchsets, new proposal tickets can be created
# regardless of the acceptNewTickets setting.
#
# SINCE 1.4.0
tickets.acceptNewPatchsets = true

# Default setting to control patchset merge through the web ui. If true, patchsets
# must have an approval score to enable the merge button. This setting can be
# overriden per-repository.
#
# SINCE 1.4.0
tickets.requireApproval = false

# Specify the location of the Lucene Ticket index
#
# SINCE 1.4.0
# RESTART REQUIRED
tickets.indexFolder = ${baseFolder}/tickets/lucene

# Define the url for the Redis server.
#
# e.g. redis://localhost:6379
# redis://:foobared@localhost:6379/2
#
# SINCE 1.4.0
# RESTART REQUIRED
tickets.redis.url =

# The number of tickets to display on a page.
#
# SINCE 1.4.0
tickets.perPage = 25

#
# Groovy Integration
#
Expand Down
15 changes: 15 additions & 0 deletions src/main/distrib/linux/reindex-tickets.sh
@@ -0,0 +1,15 @@
#!/bin/bash
# --------------------------------------------------------------------------
# This is for reindexing Tickets with Lucene.
#
# Since the Tickets feature is undergoing massive churn it may be necessary
# to reindex tickets due to model or index changes.
#
# usage:
#
# reindex-tickets.sh <baseFolder>
#
# --------------------------------------------------------------------------

java -cp gitblit.jar:./ext/* com.gitblit.ReindexTickets --baseFolder $1

13 changes: 13 additions & 0 deletions src/main/distrib/win/reindex-tickets.cmd
@@ -0,0 +1,13 @@
@REM --------------------------------------------------------------------------
@REM This is for reindexing Tickets with Lucene.
@REM
@REM Since the Tickets feature is undergoing massive churn it may be necessary
@REM to reindex tickets due to model or index changes.
@REM
@REM Always use forward-slashes for the path separator in your parameters!!
@REM
@REM Set FOLDER to the baseFolder.
@REM --------------------------------------------------------------------------
@SET FOLDER=data

@java -cp gitblit.jar;"%CD%\ext\*" com.gitblit.ReindexTickets --baseFolder %FOLDER%
16 changes: 15 additions & 1 deletion src/main/java/WEB-INF/web.xml
Expand Up @@ -161,6 +161,20 @@
<url-pattern>/logo.png</url-pattern>
</servlet-mapping>


<!-- PT Servlet
<url-pattern> MUST match:
* Wicket Filter ignorePaths parameter -->
<servlet>
<servlet-name>PtServlet</servlet-name>
<servlet-class>com.gitblit.servlet.PtServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>PtServlet</servlet-name>
<url-pattern>/pt</url-pattern>
</servlet-mapping>


<!-- Branch Graph Servlet
<url-pattern> MUST match:
* Wicket Filter ignorePaths parameter -->
Expand Down Expand Up @@ -300,7 +314,7 @@
* PagesFilter <url-pattern>
* PagesServlet <url-pattern>
* com.gitblit.Constants.PAGES_PATH -->
<param-value>r/,git/,feed/,zip/,federation/,rpc/,pages/,robots.txt,logo.png,graph/,sparkleshare/</param-value>
<param-value>r/,git/,pt,feed/,zip/,federation/,rpc/,pages/,robots.txt,logo.png,graph/,sparkleshare/</param-value>
</init-param>
</filter>
<filter-mapping>
Expand Down
8 changes: 7 additions & 1 deletion src/main/java/com/gitblit/Constants.java
Expand Up @@ -108,12 +108,18 @@ public class Constants {

public static final String R_CHANGES = "refs/changes/";

public static final String R_PULL= "refs/pull/";
public static final String R_PULL = "refs/pull/";

public static final String R_TAGS = "refs/tags/";

public static final String R_REMOTES = "refs/remotes/";

public static final String R_FOR = "refs/for/";

public static final String R_TICKET = "refs/heads/ticket/";

public static final String R_TICKETS_PATCHSETS = "refs/tickets/";

public static String getVersion() {
String v = Constants.class.getPackage().getImplementationVersion();
if (v == null) {
Expand Down

0 comments on commit acaa2a2

Please sign in to comment.