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 exportjoflux --config joflux.toml migratejoflux --config joflux.toml monitorjoflux --config joflux.toml verifyjoflux --config joflux.toml archive| Stage | What it does | Writes |
|---|---|---|
export | Lists every repository in the GitHub organization | repos-inventory.json |
migrate | Resolves the target organization and has Forgejo migrate each repository, waiting for each to finish | migration-log.json |
monitor | Rechecks any migration Forgejo didn’t answer for while migrate was waiting | migration-status.json |
verify | Checks each target repository and records its size, its issue, pull request, label and release counts, and whether it has a wiki | verification-report.json |
archive | Archives the GitHub originals that verify recorded as verified | archive-log.json |
Every file goes in the output directory, migration_output/ unless the config sets output_dir.
Output files lists their fields.
Running a stage again
Section titled “Running a stage again”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.
Exit codes
Section titled “Exit codes”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.