Skip to content
This repository has been archived by the owner on Feb 19, 2024. It is now read-only.

Program for migrating Whonix™ Phabricator issues to Discourse

Notifications You must be signed in to change notification settings

Whonix/phabricator_migration

Repository files navigation

Description

A Ruby program for migrating the Phabricator issues to Discourse topics.

Requirements

  • Installed version of Ruby 3
  • A Phabricator API key
  • A Discourse API key with sufficient permissions to make a bunch of topics

How it works

  1. call the phabricator API to get all the issues
  2. call the phabricator API to get all the users
  3. call the phabricator API to get all the transactions (comments, assignments, etc)
  4. format the data in to a large JSON file
  5. post it to Discourse via the Discourse API

Usage

  1. Create a file .env with the following content
PHAB_KEY=<Phabricator Conduit API key>
DISCOURSE_KEY=<Discourse API key>
PHAB_HOST='phabricator.whonix.org'
  1. Ensure that Discourse has an appropriate rate limit for post requests. For us, 1000 a minute is probably ample.

  2. $ ruby ./phabricator_export.rb which outputs a JSON file ./discourse_migration_data.json

  3. $ ruby ./discourse_import.rb

  4. Tada!

Tests

Testing is done with Ruby's built in Minitest framework.

To run them:

$ rake

About

Program for migrating Whonix™ Phabricator issues to Discourse

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published