def migration_0003(repo, init=False, **kwargs):
    """ Creates a shadow copy of the issue.

    .. note::

       Early versions of this migration improperly created the shadow
       copy using an absolute path.

    """
    try:
        os.mkdir(repo.get_shadow_path('.jirafs'))
    except __HOLE__:
        pass
    storable = {
        'options': repo.issue._options,
        'raw': repo.issue.raw
    }
    with open(repo.get_shadow_path('.jirafs/issue.json'), 'w') as out:
        out.write(json.dumps(storable))
    issue_pickle_path = repo.get_shadow_path('.jirafs/issue.json')
    repo.run_git_command('add', '-f', issue_pickle_path, shadow=True)
    repo.run_git_command(
        'commit', '-m', 'Completing migration_0003', shadow=True
    )
    repo.run_git_command('push', 'origin', 'jira', shadow=True)
    repo.run_git_command('merge', 'jira')
    set_repo_version(repo, 3)
dataset/ETHPy150Open coddingtonbear/jirafs/jirafs/migrations.py/migration_0003