* Returns the ordered list of active sync phases for a content-type choice.
(choice: ContentTypeChoice)
| 117 | * Returns the ordered list of active sync phases for a content-type choice. |
| 118 | */ |
| 119 | function activePhases(choice: ContentTypeChoice): SyncPhase[] { |
| 120 | const phases: SyncPhase[] = [] |
| 121 | if (choice === 'repo' || choice === 'all') phases.push('repo') |
| 122 | if (choice === 'wiki' || choice === 'both' || choice === 'all') phases.push('wiki') |
| 123 | if (choice === 'issues' || choice === 'both' || choice === 'all') phases.push('issues') |
| 124 | return phases |
| 125 | } |
| 126 | |
| 127 | /** |
| 128 | * Returns the phase following `current` for a choice, or undefined when `current` |