This script facilitates the migration of data from Pivotal Tracker to Linear. It's a hacky but functional solution that might be useful for teams moving to Linear, especially given Pivotal Tracker's impending shutdown.
Linear does offer an official CLI importer tool that supports Pivotal Tracker. However, it's quite limited in its functionality, which is why this more comprehensive script was developed.
- Migrates Pivotal Tracker epics to Linear projects
- Converts Pivotal Tracker stories to Linear issues
- Preserves attachments, including inline display for images
- Links issues to their corresponding projects (based on PT epic-story relationships)
- Retains labels
- Maintains story/issue state mapping
- Preserves comments and tasks
- Clone this repository
- Install required gems:
bundle install
- Copy
.env.sample
to.env
and fill in your API tokens and other required information - Set up the MimeMagic dependency (see note below)
Note on MimeMagic: This script uses the MimeMagic gem, which requires additional setup. Please follow the instructions in the MimeMagic README to ensure you have the necessary dependencies installed.
./pt2linear.rb [options]
Options:
--migrate
: Perform the migration--assign
: Assign unassigned issues (use after migration)--dry-run
: Perform a dry run without making changes-v, --verbose
: Run with verbose logging
- Ensure the
LINEAR_TIMEZONE
in your.env
file matches the timezone set in your Linear account. This is crucial for proper rate limit handling. - The script uses rate limiting to avoid overwhelming the Linear API. Adjust sleep durations if needed.
- This script creates a "migrated_story" label in Linear for all migrated issues.
Included in this repository is a recreate_team
script that allows you to delete and recreate a Linear team. This can be useful if you're just getting set up and aren't actively using Linear yet, as it allows you to easily modify the import script and rerun the whole migration process.
./recreate_team
for interactive mode (requires typing "delete team" to confirm)./recreate_team -f
to force deletion without confirmation
- Add links to Pull Requests instead of including them in the description.
This script is provided as-is. It's recommended to run it on a test project first and verify the results before using it on your main project data.