<page name="eclipse plugin" src="eclipse_plugin.mkd" />\r
</menu>\r
<divider />\r
- <menu name="tickets" pager="true" pagerPlacement="bottom" pagerLayout="justified">
+ <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" />
\r
<regex searchPattern="\b(issue)(\s*[#]?|-){0,1}(\d+)\b" replacePattern="<a href='http://code.google.com/p/gitblit/issues/detail?id=$3'>issue $3</a>" />\r
<regex searchPattern="\b(pr|pull request)(\s*[#]?|-){0,1}(\d+)\b" replacePattern="<a href='https://github.com/gitblit/gitblit/pull/$3'>pull request #$3</a>" />\r
+ <regex searchPattern="\b(ticket)(\s*[#]?|-){0,1}(\d+)\b" replacePattern="<a href='https://dev.gitblit.com/tickets/gitblit.git/$3'>ticket $3</a>" />\r
\r
<!-- Set the logo from the mx:doc resources -->\r
<logo file="${project.resources.dir}/gitblt_25_white.png" />\r
<page name="eclipse plugin" src="eclipse_plugin.mkd" />\r
</menu>\r
<divider />\r
- <menu name="tickets" pager="true" pagerPlacement="bottom" pagerLayout="justified">
+ <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" />
\r
<regex searchPattern="\b(issue)(\s*[#]?|-){0,1}(\d+)\b" replacePattern="<a href='http://code.google.com/p/gitblit/issues/detail?id=$3'>issue $3</a>" />\r
<regex searchPattern="\b(pr|pull request)(\s*[#]?|-){0,1}(\d+)\b" replacePattern="<a href='https://github.com/gitblit/gitblit/pull/$3'>pull request #$3</a>" />\r
+ <regex searchPattern="\b(ticket)(\s*[#]?|-){0,1}(\d+)\b" replacePattern="<a href='https://dev.gitblit.com/tickets/gitblit.git/$3'>ticket $3</a>" />\r
\r
<!-- Set the logo from the mx:doc resources -->\r
<logo file="${project.resources.dir}/gitblt_25_white.png" />\r
## Barnum
-*PREVIEW 1.4.0*
+*SINCE 1.4.0*
Barnum is a command-line companion for Git. It's purpose is to simplify the syntax and ceremony for working with Gitblit Tickets and Patchsets.
The current implementation is a Python script that wraps a native Git executable. It requires Python 3 and native Git. It works well on Windows, Linux, and Mac OS X.
+Barnum is bundled with each Gitblit installation and linked on each ticket page in the propose, checkout, and merge instructions. You can download Barnum manually using the following url or using the `/pt` url on your own Gitblit server:
+
+ https://dev.gitblit.com/pt
+
+This url serves a *zip* or a *tar.gz* of the Python script and a readme file, as appropriate based on the user-agent of the requesting client.
+
### Fetch
pt fetch <id> [-p,--patchset <n>]
-If *patchset* is specified, the **fetch** command will download the specified ticket patchset to the FETCH_HEAD ref. If *patchset* is **not*** specified, the configured remote will be fetched to download all ticket branch updates - this is the same as <pre>git fetch {remote}</pre>.
+If *patchset* is specified, the **fetch** command will download the specified ticket patchset to the FETCH_HEAD ref. If *patchset* is **not** specified, the configured remote will be fetched to download all ticket branch updates - this is the same as <pre>git fetch {remote}</pre>.
### Checkout (co)
## Tickets
-*PREVIEW 1.4.0*
+*SINCE 1.4.0*
Gitblit's Tickets feature is analgous to GitHub/BitBucket Issues+Pull Requests. Gitblit does not make a hard distinction between what is an Issue and what is a Pull Request. In Gitblit, all tickets may have attached commits and there is no need to create a separate, new container to share & discuss these commits. Additionally, there is no need to create multiple Tickets for different versions of the same code - a common practice in other systems.
-You can view a screencast of Gitblit Tickets in action [here](https://vimeo.com/86164723).
+### Screencast
+
+You can view a screencast of [Gitblit Tickets in action](https://vimeo.com/86164723) on Vimeo.
### Design
3. The ticket should be the canonical source of commits related to the ticket (i.e. a fork repository should not be the canonical source of commits)
4. Additional contributors should be allowed to participate in developing the patchset for a ticket, not just the original patchset author. The ticket should be a container for collaborative branch development, not just for code-review/gating.
5. Contributors should be able to rewrite commits attached to a ticket without losing history. Contributors should be encouraged to polish, hone, and rewrite as needed to ensure that what eventually is merged is logical and concise.
+6. Tickets should focus on contribution sharing and communication. The Gitblit Tickets feature is not an elaborate code-review system, although in the future it may evolve to be more competitive for that use.
Gitblit takes inspiration from GitHub, BitBucket, and Gerrit.
All ticket services inherit from the same base class which handles most of the high level logic for ticket management including caching, milestones (stored in .git/config), indexing, queries, and searches.
-You can find descriptions of the available persistence services in the [setup][tickets_setup.mkd] page.
+You can find descriptions of the available persistence services in [[tickets setup]].
#### Limitations
GitHub-style Pull Requests require the following workflow:
-1. Fork RepoA -> MyRepoA
-2. Clone MyRepoA
-3. Create branch in MyRepoA clone and hack on contribution
-4. Push new branch upstream to MyRepoA
-5. Open Pull Request from MyRepoA -> RepoA
-6. RepoA owner pulls from MyRepoA
-7. RepoA owner pushes merge to RepoA
+1. Fork *RepoA* -> **MyRepoA**
+2. Clone **MyRepoA**
+3. Create **MyRepoA_Clone:topic_branch** and hack on contribution
+4. Push **MyRepoA_Clone:topic_branch** upstream to **MyRepoA:topic_branch**
+5. Open Pull Request from **MyRepoA:topic_branch** -> *RepoA:integration_branch*
+6. RepoA owner pulls **MyRepoA:topic_branch** -> *RepoA:integration_branch* and reviews
+7. RepoA owner pushes merged contribution upstream to *RepoA:integration_branch*
Gitblit's flow looks like this:
-1. Clone RepoA
-2. Create branch in RepoA clone and hack on contribution
-3. Push to magic branch of RepoA
-4. RepoA owner pulls from RepoA
-5. RepoA owner pushes merge to RepoA
+1. Clone *RepoA*
+2. Create *RepoA_Clone:topic_branch* and hack on contribution
+3. Push *RepoA_Clone:topic_branch* upstream to *RepoA:refs/for/[new|id]*
+4. RepoA owner fetches & merges branch *ticket/[id]*
+5. RepoA owner pushes merged contribution upstream to *RepoA:integration_branch*
The Gitblit workflow eliminates the 4-repository design of a GitHub pull request (canonical, canonical working copy, fork, & fork working copy) in favor of a 3-repository design (canonical, canonical working copy, clone working copy).
-You might wonder: is it a good idea to allow users to push into the canonical repository? And the answer is, it's no different than a GitHub pull request. When you open a GitHub pull request from MyRepoA to RepoA, your code is already being pushed to a private branch in RepoA (*refs/pull/{id}/head* and *refs/pull/{id}/merge*) so effectively you are already pushing into RepoA - you are just using an extra repository and the web ui to do it. By pushing directly to the canonical repository, you save server resources and eliminate the web ui step.
+*You might wonder:* Is it a good idea to allow users to push into the canonical repository?
+
+The answer is, it's really not that different from a GitHub pull request. When you open a GitHub pull request from *MyRepoA* to *RepoA*, your code is already being pushed to a private branch in *RepoA* ( *refs/pull/{id}/head* and *refs/pull/{id}/merge*) so effectively you are already pushing into *RepoA* - you are just using an extra repository and the web ui to do it. By pushing directly to the canonical repository, you save server resources and eliminate the web ui step.
Additionally, because the patchset is not linked to a user's personal fork it is possible to allow others to collaborate on development.
#### TODO
-- need a My Tickets page
-- web ui for adding, editing, and deleting miletones
-- continue cleanup of code and templates
-- would be nice to have a collapsible ticket description (e.g. AUI expander)
-- would be nice to edit a comment
-- would be nice to delete a comment
-- Groovy hook points major ticket changes (new, close, patchset change)
+- Implement a My Tickets page (ticket-15)
+- Ticket Lifecycle Hooks (ticket-16)
+- CRUD pages for Milestones (ticket-17)
+- Ticket service migration tool (ticket-19)
+- Collapsible ticket description (e.g. AUI expander)
+- Edit a comment
+- Delete a comment
- REST API for tooling
-- Might be nice to process Markdown previews client-side rather than round-tripping to Gitblit (another stateful example). Perhaps using AngularMarkdown?
-- Would be nice to have a tool to import/export journals between services. All the journals use the same format so this should be very straight-forward to migrate/convert them between services.
+- Client-side Markdown previews (AngularMarkdown?)
## Setting up Tickets
-*PREVIEW 1.4.0*
+*SINCE 1.4.0*
By default, Gitblit is not configured for Tickets. There are several reasons for this, but the most important one is that you must choose the persistence backend that works best for you.
## Using Tickets
-*PREVIEW 1.4.0*
+*SINCE 1.4.0*
### Creating Standard Tickets
### Creating a Proposal Ticket
-Proposal tickets are created by pushing a patchset to the magic ref. They can not be created from the web ui.
+Proposal tickets are created by pushing a **single commit** to the magic ref. They can not be created from the web ui.
-*Why should I create a proposal ticket?*
+*Why is there a single commit limitation for creating a Proposal Ticket?*
-Because you are too lazy to create a ticket in the web ui first. The proposal ticket is a convenience mechanism. It allows you to propose changes using Git, not your browser.
+Because the ticket which will be created for your commit will use your commit's message to define the Ticket's *title* and *description*. After the ticket is created, you can add as many commits as you want to the ticket's branch.
+
+*Why would I create a proposal ticket?*
+
+Because you are too lazy to create a ticket in the web ui first. The proposal ticket is a convenience mechanism. It allows you to propose a change using Git, not your browser.
*Who can create a proposal ticket?*
### Creating the first Patchset for an Existing Ticket
-If you have an existing ticket that does **not*** yet have a proposed patchset you can push using the magic ref.
+If you have an existing ticket that does **not** yet have a proposed patchset you can push using the magic ref.
*Who can create the first patchset for an existing ticket?*
| magic ref | description |
| :------------------- | :------------------------------------------- |
-| refs/for/{id} | add new patchset to an existing ticket |
+| refs/for/{id} | to rewrite a patchset |
### Ticket RefSpec Tricks
#### examples
-Create a new patchset for ticket *12*, add *james* and *mark* to the watch list, and set the topic to *issue-123* which will be regex-matched against the repository bugtraq configuration.
+Create a new patchset for ticket *12*, add *james* and *mark* to the watch list, and set the topic to *JIRA-123* which will be regex-matched against the repository bugtraq configuration.
- git push origin HEAD:refs/for/12%cc=james,cc=mark,t=issue-123
+ git push origin HEAD:refs/for/12%cc=james,cc=mark,t=JIRA-123
-Add some commits to ticket *123* patchset *5*. Set the milestone to *1.4.1*.
+Add some commits (fast-forward) to ticket *12*. Set the milestone to *1.4.1*.
- git push origin HEAD:refs/heads/ticket/123/5%m=1.4.1
+ git push origin HEAD:refs/heads/ticket/12%m=1.4.1
### Merging Patchsets
### Reviews
-Gitblit includes a very simple review scoring mechanism.
+Gitblit includes a very simple patchset scoring mechanism. Gitblit is not code-review system, but for those who have simple needs, this may suffice.
- +2, approved: patchset can be merged
- +1, looks good: someone else must approve for merge
- -1, needs improvement: please do not merge
- -2, vetoed: patchset may not be merged
-Only users with write (RW) permissions to the repository can give a +2 and -2 score. Any other user is free to score +/-1.
+Only users with write (RW) permissions to the repository can give a +2 and -2 score. All other users are allowed to score +/-1.
-If the patchset is updated or rewritten, all reviews are reset; reviews apply to specific revisions of patchsets - they are not blanket approvals/disapprovals.
+If the patchset is updated or rewritten, all former review scores are ignored; review scores apply to specific revisions of patchsets - they are not blanket approvals/disapprovals.