runners and per-context JSON with one flat YAML file where each feature has its own section. smartcloud migrate converts a v1 config for you, and warns about every v1 key it does not carry over.
1
Convert the config
2
3
Validate
4
Switch the workflow
Point the workflow at
resnovas/smartcloud@v2, as in the quick start, and delete .github/config.json.Until you switch, v2 still reads a v1 config: a file without
version: 2 is migrated on the fly on every run, with the same warnings. Converting once keeps the warnings out of your runs and lets you use v2’s own sections.What maps where
v1’s contexts become the
on of each rule: pr rules get on: [pullRequest], issue rules get on: [issue], and sharedConfig and schedule rules apply to both. In keys, sharedConfig is written shared. With more than one runner, keys are prefixed r0., r1. and so on so none collide.
v1 conditions carry over unchanged: v2 keeps the same field names, pattern forms and $not shapes. See Conditions.
What is dropped
Any other key is reported as unknown and ignored. v2 has a single
stale section, so a second stale in another context is dropped with a warning.
Check your stale labels
stale.staleLabel and stale.abandonedLabel are label names as GitHub shows them, not keys of labels. If your v1 config gave the stale label a different display name, for example a stale entry named Status - Stale, set staleLabel to that name.
Example: labels only
The Eventiva config defines labels and nothing else. Two of its ten labels:.github/config.json
smartcloud migrate output for those two, with no warnings:
.github/smartcloud.yml
5319E7, is quoted.
Example: a full v1 config
The v1 smartcloud config uses one runner withsharedConfig, pr, issue and schedule contexts, 94 labels, labelling rules, a convention, approvals and stale handling. The excerpts below are from the real smartcloud migrate output.
Labelling
v1
v2
Conventions, approvals and stale
v1
v2
Warnings
The run printed these warnings for the keys it did not carry over:stale label entry is named Status - Stale, while staleLabel is stale: see Check your stale labels.