Giter Club home page Giter Club logo

github-trac's Introduction

github-trac

I have unofficially taken this project over. Forks of this project should happen here, not upstream. (Déjà vu!)

This Trac plugin is designed to accept a GitHub Post-Receive hook. It is designed to work with Trac 1.0 and later using the built-in Git and multi-repository support.

Installation

  1. easy_install https://github.com/csnover/github-trac/archive/master.zip

  2. Enable the plugin in the admin interface (you may need to restart Trac and/or your Web server for it to appear)

  3. Go to your GitHub repository’s Settings → Service Hooks page and choose “Trac”

  4. Set URL to the URL to your Trac installation

  5. Set Token to a randomly generated secret (just make one up!)

  6. Add the following configuration to your trac.ini:

    [github]
    secret = <the random shared secret entered as the “Token” in your GitHub settings>
    
    # optional, defaults to "closed"
    closed_status = closed
    
    # optional, but recommended; ensures your Trac repos are in sync immediately
    # after a GH commit
    resync = True
  7. Create local mirror clones of your GitHub repositories on the machine running Trac, in directories that are writable by the user that Trac runs as.

  8. Add your Git repositories to Trac, following the recommendations below if you want your code browser/changeset viewer to redirect to GitHub as well.

Important notes:

  1. When you clone your GitHub repositories for Trac, make sure that you use git clone --mirror. If you use git clone --bare, your Trac repository will not resync properly after a changeset.
  2. The name given to your repository in Trac must match the name of the repository on GitHub if you want to perform auto-resync.

Code browser and changeset viewer

The code browser portion of the plugin is designed to replace the code browser built into Trac with a redirect to the GitHub source browser, if desired.

In order for this to work, when you add your Git repositories to Trac, you must set the URL for the repository to its URL at GitHub. Once this is set, browsing to paths or viewing changesets will redirect to the appropriate GitHub page.

Commit message format

The commit hook is designed to close or mark tickets that are attached to a commit message.

It searches commit messages for text in the form of:

command #1
command #1, #2
command #1 & #2
command #1 and #2

Instead of the short-hand syntax "#1", "ticket:1" can be used as well, which is handy for avoiding GitHub linking to its own issue tracker:

command ticket:1
command ticket:1, ticket:2
command ticket:1 & ticket:2
command ticket:1 and ticket:2

You can combine multiple commands in one commit message as well. For example:

Fixes #1, #2. Refs #3.

List of available commands

github-trac's People

Contributors

csnover avatar davglass avatar mpeterson avatar pcapriotti avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

klas-genestack

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.