skip to navigation
skip to content

Not Logged In

r6_commit 0.1.24

Git Post Commit hook to parse log and create code review

Git Commit Hooks for Radian6

This module greps the git log from your last commit and uses it to:

        - Update GUS items
        - Lookup the next build label
        - Create a code review
        - Update an existing code review

To install, the pip command line will download and install all of your dependencies:

        [sudo] pip install r6_commit

If you don't have pip installed, you can use easy_install to install pip first

        [sudo] easy_install pip

Windows users will likely have to install setuptools first.  Mac/Linux users already have this installed.

Once the package is installed, go to the command line and change to the root directory of your git repository and type:

which will create the hooks for you.

When you try to commit anything in that repository, you will be prompted on how you need to create your commit message.

The first time you run the command, you will be prompted for your gus username and credentials.  Make sure you enter your gus username (suffixed with and your correct password.  Your username will be saved locally for next time you need to log in, but your password will not.  You will need a security token to log into the GUS api.  You can get this by logging into gus in your web browser and selecting 'reset my security token' from the personal settings will email you a new token.  The token will be saved locally so that you don't have to keep entering it every day.

Once you log in, you will be logged into gus for the whole day.

The hooks provide the ability to create code reviews in code collab.  You'll need to install the command line utility for code collab to do this.  Once you are logged into code collab, you will remain logged in basically until your password expires or you explicitly log out.

The utilty also provides helpers that log into jenkins to get build numbers, etc.  You will need your  jenkins password to log in the first time, but won't need to enter it again unless you revoke your api token in jenkins.

The hooks parse your commit message to look for annotations that are then used to update gus/code collab.
Annotations are as follows:

        @fixes                  - specifies a gus work id of an in progress work item
        @scheduled_build        - specifies the name of the build that the fixed work item will go in
        @next                   - 'head', 'release' or 'maint' to look up the next build in jenkins
        @reviewers              - code collab usernames (comma delimited) of people you wish to have review.
                                  You may be able to use 'last' to copy reviewers from your last review
        @update_review          - id of a review you would like to ammend
        @updates                - work id of a non-closed gus item to associate your commit to

These annotations will update the gus work status appropriately and add your changes to a comment in the ticket including the commit message.  If you create a code review, a link to the code review will be added to the comment as well.
File Type Py Version Uploaded on Size
r6_commit-0.1.24-py2.7.egg (md5) Python Egg 2.7 2013-10-04 21KB
r6_commit-0.1.24.tar.gz (md5) Source 2013-10-04 8KB
  • Downloads (All Versions):
  • 15 downloads in the last day
  • 205 downloads in the last week
  • 791 downloads in the last month