Skip to content

The five stagesRunning the stages

Running the stages

The order joflux's stages run in, what each one does and writes, and how to re-run them.

A move is five commands, run in order with the same config:

joflux --config joflux.toml export
joflux --config joflux.toml migrate
joflux --config joflux.toml monitor
joflux --config joflux.toml verify
joflux --config joflux.toml archive
StageWhat it doesWrites
exportLists every repository in the GitHub organizationrepos-inventory.json
migrateResolves the target organization and has Forgejo migrate each repository, waiting for each to finishmigration-log.json
monitorRechecks any migration Forgejo didn’t answer for while migrate was waitingmigration-status.json
verifyChecks each target repository and records its size, its issue, pull request, label and release counts, and whether it has a wikiverification-report.json
archiveArchives the GitHub originals that verify recorded as verifiedarchive-log.json

Every file goes in the output directory, migration_output/ unless the config sets output_dir. Output files lists their fields.

The stages are separate commands so you can stop between them, read what the last one wrote and carry on later. They don’t all behave the same way when you run them twice, though.

export writes a fresh repos-inventory.json each time, replacing the previous one. The other four append to their files, so earlier entries stay and each run adds its own with a timestamp.

monitor is the one built to be re-run. It only checks repositories whose latest migration request went unanswered and that haven’t been settled since, so stopping it and starting it again picks up where it left off. verify checks every repository in the inventory each time, which makes it safe to repeat once stragglers have arrived.

archive skips the repositories it already archived, and ones that were archived on GitHub when you exported, and archives the other verified ones. migrate skips the repositories whose migration already completed and sends a new request for the rest, so running it again retries what didn’t finish.

Every stage exits 0 when it went cleanly, 1 when it partly failed or an API call errored, and 2 for a config problem or a missing state file, such as running migrate before export. A script can run the stages in sequence and stop at the first non-zero exit. Exit codes has what produces each one.