Bug tracker import code/adding a bug tracker (moved): Difference between revisions

From OpenHatch wiki
Content added Content deleted
No edit summary
imported>Mdaniel
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Hacking OpenHatch}}
== About this page ==


We are updating our documentation system. This page is now included in our project package, and is automatically generated by sphinx at openhatch.readthedocs.org [http://openhatch.readthedocs.org/en/latest/internals/adding_bug_tracker.html Bug tracker import code/Adding a bug tracker]
There are other pages about our [[bug tracker import code]].

== Step by step ==

=== Clone the repository ===

You will need to have a local copy of our git repository. You can read about that at [[getting started with the OpenHatch code]].

=== Figure out what kind of bug tracker you're importing ===

To find the bug tracker import code, do:

$ cd mysite/customs/bugtrackers/

All our code lives inside "mysite". "customs" contains code that handles the ''importing'' of data from other places on the Internet. (Get it? It's a pun.) "bugtrackers" holds one file per type of bug tracker.

You'll find one file per ''type'' of bug tracker. For example, if you're adding code to cause us to import data from a bug tracker that runs the ''Roundup'' software, you'll need to be editing ''roundup.py''.

=== Edit the right file ===

Each file has two parts...

* '''One simple bit of code per project bug tracker we download data from''': This is what you want. It's usually toward the end of the file. This is usually a five-line Python class.
* '''The raw code that goes out to the network and fetches data''': This is probably not what you want.

To add a new bug tracker, take an existing bug tracker's short code snippet and copy-paste it, adjusting what you need to adjust. You'll definitely need to change the project name, and you'll probably need to provide URLs for fetching a list of bugs to import.

=== Make sure it works ===

If you run:

$ ./bin/mysite customs_daily_tasks

you should trigger your code. In your local version of OpenHatch, you'll see the new volunteer opportunities listed at http://127.0.0.1:8000/search/.

If your new bug tracker code doesn't get called, make sure you set ''enabled = True'' in the subclass.

If you have problems getting it working, reach out to us for help!

=== Submit a patch ===

This is the easiest part. See [[how we handle patches]]!

[[Category:Hacking_OpenHatch]]

Latest revision as of 18:49, 22 August 2012

This is a page about improving or modifying OpenHatch.

We call that "Hacking OpenHatch," and there is a whole category of pages about that.


We are updating our documentation system. This page is now included in our project package, and is automatically generated by sphinx at openhatch.readthedocs.org Bug tracker import code/Adding a bug tracker