Importing or mirroring a repository in SourceCraft

You can import or mirror into SourceCraft your source code repository hosted in another IT project management system for Git.

Mirroring allows you to automatically synchronize particular branches between the source repository and the SourceCraft repository.

Simple code import (commit history, all existing branches and tags) is supported for any public repositories from any Git hosting services.

When migrating a repository from GitHub, you can optionally import the following:

  • Pull requests
  • Issues
  • Comments

Warning

Pull requests, issues and comments are transferred only during the initial synchronization and do not get updated afterwards. Mirroring is limited to particular branches of the source repository.

To import or mirror a repository in SourceCraft:

  1. Open the SourceCraft home page.

  2. In the left-hand panel, click Create repository.

  3. In the window that opens, go to the Migrate existing tab.

  4. Under Your source repository details, select the repository source:

    1. Click GitHub.

    2. Create a GitHub personal access token (PAT) with the following permissions:

      • repo: To display the list of your public and private repositories available for import.
      • read:org: To import collaborators from GitHub repositories or if the project contains Git LFS files (optional).

      For more information, see this GitHub guide.

      Note

      To migrate entities from the source repository, in addition to code, a token must be issued by the repository administrator.

    3. Paste the new token into the GitHub personal access token field and click Authenticate.

    4. In the Owner field, select the owner of the source repository.

    5. In the Repository field, select the repository you want to import.

    1. Click Repository by URL.
    2. In the Repository URL field, specify the link to the repository hosted in another IT project management system.
    3. Specify Personal access token.
  5. Under Your new repository details:

    • In the Owner field, select the owner of the new repository: your account or organization.
    • In the Name field, specify a name for the repository you want to create in SourceCraft. The name may contain the following ASCII characters: lowercase and uppercase Latin letters, numbers, commas, hyphens, and underscores.
  6. Optionally, under What to migrate, select the entities to migrate from the source repository:

    • Code: Source code, branches, commits, and full repository history. This entity is always migrated and cannot be disabled.
    • Pull requests: Pull requests, reviews, and associated metadata and labels. To migrate only pull requests with the open status, enable the Open pull requests only option.
    • Issues: Issues and associated metadata and labels. To migrate only issues with the open status, enable the Open issues only option.
    • Comments: Comments on pull requests and issues.

    The estimated migration time is displayed to the right of the entity list. To speed up the migration, disable entities that do not need to be migrated.

    Only source code, branches, commits, and full history can be migrated for repositories not hosted on GitHub. This entity is always migrated and cannot be disabled.

  7. Under Visibility, select the access type for the new repository:

    • Public: Can be viewed by any user. You can choose who can edit the repository.
    • Internal: Can be accessed only by users of the owner organization.
    • Private: You will choose who can view and edit the repository.
  8. Optionally, if you want to mirror the repository, enable Activate synchronization under Synchronization and specify the branches you want automatically updated from the source repository in the Branches to sync field. You can use templates, for example, main, feature/*, or release/*.

    Warning

    Pull requests, issues and comments are transferred only during the initial synchronization and do not get updated afterwards. Mirroring is limited to particular branches of the source repository.

    The mirrored SourceCraft repository branches are subject to branch policy protection rules. You cannot change them in SourceCraft; they get updated only when syncing with the source repository.

    If the branch policy is disabled or overridden by a user with the Repository admin role, the SourceCraft commit history will be overwritten (force push) during the next repository sync.

  9. SourceCraft will automatically check access to the source repository and whether or not SourceCraft can create a repository with the name you specified.

    If all checks are successful, you will see this message: Everything's ready to migrate. Fasten your seat belts and let's take off!.

    Click Begin migration.

This will open the window with a list of your repositories in SourceCraft. Next to the repository you are importing, you will see the migration status. Click the status to view the details.

Once the migration is complete, you will be able to work with the migrated repository in SourceCraft.

Useful links

Getting started with SourceCraft