GithubHelp home page GithubHelp logo

isabella232 / github-trac Goto Github PK

View Code? Open in Web Editor NEW

This project forked from open-mpi/github-trac

0.0 0.0 0.0 129 KB

Trac plugin for github integration

Home Page: http://davglass.lighthouseapp.com/projects/21212/home

License: Other

Shell 0.63% Python 99.37%

github-trac's Introduction

Github Trac Hook

I have officially taken this project over, so all forks of this project should happen here not upstream.

I took this project over serveral years back, but have since moved away from using Trac.

I'll try to merge pull requests when I can, but I have ZERO tests for this module, use it with caution.

Anyone that wants to submit tests please do

Issues

Please file bug reports here: https://github.com/davglass/github-trac/issues

About

This trac plugin is designed to accept a GitHub Post-Receive url.

It also allows you to replace the builtin Trac browser with redirects to the GitHub source browser.

More information about the Post-Receive Hook can be found here: http://github.com/guides/post-receive-hooks

To install this Trac Plugin:

1. Clone the repository:
    git clone git://github.com/davglass/github-trac.git

2. Install SimpleJSON:
    easy_install simplejson

3. Install the Plugin:
    cd github
    sudo python setup.py install

4. Configure Trac by editing your trac.ini
    
    [components]
    github.* = enabled

    [github]
    apitoken = YOUR GITHUB API TOKEN
    closestatus = closed (This is optional, defaults to closed
    browser = http://github.com/davglass/tree/master

    #Optional - perform a fetch on the local git repository
    autofetch = true

    #Optional - restrict commit hook to branches, comma separated. Default is special value 'all', meaning no restriction.
    branches = production,master,stable,dev

    #Optional - this will be appended to your commit message and used as trac comment
    # Following keys are available: 'commit' and everything from github payload.
    # See https://help.github.com/articles/post-receive-hooks for details of payload. See source for others.
    comment_template = Changeset: {commit[id]}
    
5. Go to the Admin page for your project on GitHub. Then select the services tab.
    Under the: Post-Receive URLs
    Place a link to your Trac repository, in a format like this:
    
    http://yourdomian.com/projects/projectname/github/APITOKEN

    You can get your GitHub API token from your accounts page.
    This is for your security, only those that know the API Token will able to post to this url

    You can override branches configuration from trac.ini via query parameter in trac URL:
    http://yourdomian.com/projects/projectname/github/APITOKEN?branches=production,staging

6. All done.

Hook

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, e.g.: command ticket:1 command ticket:1, ticket:2 command ticket:1 & ticket:2 command ticket:1 and ticket:2

The Code Browser

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.

In order for this to work properly, you still need to have Trac set to show a git repository. Turning this off will not show source control links in other places (timeline). This git repository needs to be a synced clone of your GitHub repository. Trac requires the GitPlugin in order to show a Git Repository: http://trac-hacks.org/wiki/GitPlugin

This plugin will attempt to intercept the /browser and /changeset url's and redirect you to the proper GitHub url.

github-trac's People

Contributors

davglass avatar mpeterson avatar dikim33 avatar pcapriotti avatar

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.