arthur-debert / google-code-issues-migrator

A simple script to migrate issues from google code to github.
67 stars 56 forks source link

Crash on an issue that doesn't have a label #40

Open ragerdl opened 10 years ago

ragerdl commented 10 years ago

Thanks so much for writing and sharing this tool!

I'm finding that the script crashes when the set of labels is empty. Looking at it now to see if I can fix it.

ragerdl commented 10 years ago

A repository to clone that has this property is the "acl2-books" repository.

ragerdl commented 10 years ago

As a workaround, one can "bulk edit" the googlecode issues under the "actions" drop-down.

+1 for googlecode :/

ragerdl commented 10 years ago

It looks like there may be a nice if test to copy around line 111 of https://github.com/trel/gforge2github/blob/master/gforge2github.py

rubienr commented 9 years ago

This works for me: In migrateissues.py at line 61 I replaced the empty string by an arbitrary one:

def github_label(name, color = "FFFFFF"):
    """ Returns the Github label with the given name, creating it if necessary. """

    if not name:
        name ="NotALabel"

    try:
        return label_cache[name]
    except KeyError:
        try:
            return label_cache.setdefault(name, github_repo.get_label(name))
        except GithubException:
            return label_cache.setdefault(name, github_repo.create_label(name, color))