• Stars
    star
    423
  • Rank 102,544 (Top 3 %)
  • Language
    Python
  • License
    MIT License
  • Created about 11 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Python script to import issues from one repository into another, either one at a time or all of them at once.

GitHub Issues Import

This Python script allows you to import issues and pull requests from one repository to another; works even for private repositories, and if the two repositories are not related to each other in any way.

Fork of one of the tools by Max Korenkov separated from its original location at mokorenkov/tools.

Usage

The script will by default look for a file named config.ini located in the same folder as the Python script. For a list of all possible configuration options, see Configuration.

To quickly get started, rename config.ini.sample to config.ini, and edit the fields to match your login info and repository info. If you want to use a different credentials for the source and target repositories, please see Configuration: Enterprise Accounts and Advanced Login Options. Store the config file in the same folder as the gh-issues-import.py script, or store it in a different folder, using the --config <file> option to specify which config file to load in.

Warning: The password is stored in plain-text, so avoid storing the config file in a public repository. To avoid this, you can instead pass the username and/or password as arguments by using the -u <username> and -p <password> flags respectively. If the username or password is not passed in from either of these locations, the user will be prompted for them when the script runs.

Run the script with the following command to import all open issues into the repository defined in the config:

 $ python3 gh-issues-import.py --open

If you want to import all issues (including the closed ones), use --all instead of --open. Closed issues will still be open in the target repository, but titles will begin with [CLOSED].

Or to only import specific issues, run the script and include the issue numbers of all issues you wish to import (can be done for one or several issues, and will even include closed issues):

 $ python3 gh-issues-import.py --issues 25 26 29

Some config options can be passed as arguments. For a full list, see the the Arguments page, or run the script using the --help flag.

Result

Every issue imported will create a new issue in the target repository. Remember that the ID of the issue in the new repository will most likely not be the same as the ID of the original issue. Keep this in mind when writing commit messages such as "Closes #25".

If the issue is a pull request, this will be indicated on the issue, and a link to the code will be provided. However, it will be treated as a new issue in the target repository, and not a pull request. Pulling in the suggested code into the repository will need to be done manually.

Any comments on the issue will be imported, however, the author of all imported comments will be the account specified in the config. Instead, a link and header is provided for each comment indicating who the original author was and the original date and time of the comment. Any subsequent comments added to the issue after it has been imported into the target repository will not be included.

Labels and milestones attached to the issue will be imported and added to the target repository if they do not already exist there. If the label or milestone with the same name already exists, the issue will point to the existing one, and any difference in the description or other details will be ignored.

If allowed by GitHub's policies, it may be a good idea to use a "neutral" account to import the issues and issue comments to avoid imported comments from getting mixed up with developer comments (example: FlixelCommunityBot).

Templates

The script will by default use the Markdown-formatted templates found in the templates directory. You can edit those, or point to your own templates from the config file; see Custom Templates for more details.

Examples

Example result of an imported pull request

More Repositories

1

markdown-licenses

A collection of open source licenses in Markdown format. Contributions are always welcome!
515
star
2

php-spam-filter

An easy to use PHP library for detecting spam in a passed in string. Please contribute by recommending additions to the blacklist.
PHP
49
star
3

bash-last-login

Bash script which prints out a much more detailed (yet still easy to read) "Last login" message. Uses no outside dependencies other than 'last' (should already be installed on most Linux systems).
Shell
12
star
4

DescriptionParser

VERY simple library for extracting information out of an instance (includes dynamic properties as well) Example code and SWC are in the downloads area.
ActionScript
2
star
5

MinimalSettings

[IN PROGRESS]
ActionScript
2
star
6

gh-pages-template

Default template for most of my projects' `gh-pages`; helps keep all my project pages looking the same, reduces repeated code, and pulling in updates to the theme easier.
CSS
2
star
7

iconize

Show little icons showing what type of file you are about to open - all made possible by CSS. Project originally by Poolie Studios:
CSS
2
star
8

Cubehamster-Piston-Pusher

Flash version of Cubehamster's MineCraft Puzzle Challenge #002. See the video for details and link to the working flash version.
ActionScript
2
star
9

Instagram-Unshredder

Project based on the "instagram unshredder" challenge
ActionScript
2
star
10

sample-images

A simple collection of random images for playing around with. All images owned by LoremPixel.com (see README for details)
Shell
2
star
11

MetadataParser

A VERY simple metadata parser. Example code and SWC are in the downloads area.
ActionScript
1
star
12

www.www.you.can.basically.have.as.long.of.a.subdomain.as.you.want.iqandreas.com

Just doing some testing to see if there is some sort of limit to or warning against having excessively long subdomains anywhere.
Shell
1
star
13

ErrorHandling

(IN PROGRESS) Error handling and logging made simple. Documentation on its way.
ActionScript
1
star
14

iqandreas.github.io

The main website of Andreas Renberg (IQAndreas). Brought to life with Jekyll, and hosted on GitHub Pages - see `credits.md` for more details.
CSS
1
star
15

TwitterVault

[IN PROGRESS] (ignore this project for now)
ActionScript
1
star
16

semaphore.sh

Semaphore in Bash
Shell
1
star
17

creative-commons-works

All works created by myself, released into the public under a creative commons license (may contain assets released under a different license)
1
star
18

blog.iqandreas.com

Source for "The Programming Blog of Andreas Renberg (IQAndreas)" - a static blog sitting on the shoulders of Octopress, powered by Jekyll, and hosted on GitHub Pages.
JavaScript
1
star
19

WeakReferenceLib

Simple class that let's you add a weak reference to an object, as well as get an Event when the object has been garbage collected. See "WeakReferenceTestbench" for example use.
ActionScript
1
star
20

unrecognized-service-autocorrect

A little tool for fixing one of the most common typos I create when work with services in Unix systems: flipping the arguments of `service`
Shell
1
star
21

FDT-Ubuntu-Launcher-Files

See the README as well as the blog post for details on using these files and scripts.
1
star
22

GreenscreenVideoLib

[IN PROGRESS] Includes an easy to use wrapper for Quasimondo's greenscreen PixelBender filter, as well as some general video utilities.
ActionScript
1
star
23

flink

Make your links fancy with a little favicon next to them! For the examples, see:
CSS
1
star
24

Drop-Painter-Experiment

Code for the "drop painter" experiment powered by Box2D. I apologize that the code is rather ugly, it started out as a prototype and rather than create a properly structured, fresh project, I kept expanding onto the prototype as I went along.
JavaScript
1
star
25

DescriptionCommon

The classes shared between "DescriptionParser" (http://github.com/IQAndreas/DescriptionParser) and "MetadataParser" (http://github.com/IQAndreas/MetadataParser)
ActionScript
1
star
26

eval.cpp

Basic mathematics parser in C++ (Still in progress, and it's for a different project, actually; I ended up making it more complete than I expected)
C++
1
star