View on GitHub

GitHub Issues Importer

Custom Templates

Download this project as a .zip file Download this project as a tar.gz file

The script will by default use the Markdown-formatted templates found in the templates directory for importing issues, pull requests, and comments. These are written in US English, and contain some fancy formatting including links to the GitHub profile and Gravatar images for the person who originally authored the issue or comment.

Here you can see examples of how those default templates are rendered when issues are imported:

Example result of an imported pull request

Creating Custom Templates

If you would like, you can make changes to the existing templates, or create your own from scratch. Issues and comments posted to GitHub support Markdown and some HTML.

The following illustrates a very simple template for comments (look at the default templates included with the library for more advanced examples):

**Comment by [${user_name}](${user_url})** _${date}_

----

${body}

As you can see, a small set of "variables" can be used within your template, and can be retrieved like this: ${user_name}. The following variables are available:

If you want other data, such as the URL to the code included with the pull request, some "manual" work is required: ${url}/commits.

Using the Custom Templates

If you created new templates instead of editing the existing ones, you have to tell the script where these templates can be found; you can do this in two ways:

  1. In the configuration file - See Configuration Options: Custom Templates
  2. As an argument - See Command Line Arguments: Custom Templates

Contributing

If you have created a template that may benefit others, such as a translation into a different language or improved formatting, please share this change by opening an issue on GitHub, or by contacting me.