#[non_exhaustive]pub enum StepAction {
WriteFile {
path: String,
contents: Vec<u8>,
message: String,
},
SetVariable {
name: String,
value: String,
},
ProtectDefaultBranch(ProtectionSpec),
RequireNamespaceWorkflow {
contents: Vec<u8>,
check: String,
message: String,
},
RequireOwnerReview {
paths: Vec<String>,
owners: Vec<ForgeAccount>,
community_rules: Vec<u8>,
message: String,
},
RemoveFile {
path: String,
message: String,
},
RemoveVariable {
name: String,
},
ConfigureRepo(RepoSettings),
RefreshProtectedFiles {
files: Vec<ExtraFile>,
message: String,
},
}Expand description
What a step does.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
WriteFile
Make a file on the default branch have exactly these contents.
Fields
SetVariable
Make a CI variable have this value.
ProtectDefaultBranch(ProtectionSpec)
Enforce protection on the default branch.
RequireNamespaceWorkflow
Run the check from a workflow the namespace holds outside the repository, pinned to a revision, and require it on this repository’s default branch. The change under test cannot alter what checks it (§9: the PR must not be able to satisfy its own check).
Fields
RequireOwnerReview
Make every change to paths need an approving review from one of
owners — the fallback where no namespace-level workflow is
available (§9). The adapter resolves each account’s current login at
run time; the numeric id is what is planned.
Fields
owners: Vec<ForgeAccount>Who may approve. Never empty.
RemoveFile
Make sure a file is absent from the default branch (clean-up after a change of guard).
RemoveVariable
Make sure a CI variable is absent.
ConfigureRepo(RepoSettings)
Make the repository’s settings (merge methods, CI) match.
RefreshProtectedFiles
Rewrite files the default branch’s protection forbids changing — the managed workflow, the exempt keyring — through a temporary exception for the bridge alone, restoring the protection exactly afterwards (and attempting to even when a write failed). A maintenance job, not part of a bootstrap: it is the one sanctioned way the bridge changes a protected path, so it runs as one audited step.