pub struct Context {
pub target: Utf8PathBuf,
pub forge: Forge,
pub repo: String,
pub trunk: String,
pub style: Option<Style>,
pub integration: Integration,
pub merge_form: MergeForm,
pub line_prefix: String,
pub registry: Option<Registry>,
pub package: Option<String>,
pub adapter: Box<dyn DriverAdapter>,
}Expand description
Everything the record answers for one engine run.
Fields§
§target: Utf8PathBufThe checkout the action runs in.
forge: ForgeThe forge.
repo: StringThe project path on the forge.
trunk: StringThe trunk branch.
style: Option<Style>The release style.
integration: IntegrationThe integration authority.
merge_form: MergeFormThe merge form an armed request merges with.
line_prefix: StringThe release-line branch prefix.
registry: Option<Registry>The registry the release publishes to, where it has one.
package: Option<String>The package name the registry knows, where the driver names one.
adapter: Box<dyn DriverAdapter>The driver adapter.
Implementations§
Source§impl Context
impl Context
Sourcepub fn tools(&self, action: &str) -> Vec<Tool>
pub fn tools(&self, action: &str) -> Vec<Tool>
The tools one engine action runs for this record: git and the forge CLI always, git-cliff for the request and the build, the python driver’s uv, and the bash driver’s shell for its build command.
Sourcepub fn require_tools(&self, action: &str) -> Result<(), RkError>
pub fn require_tools(&self, action: &str) -> Result<(), RkError>
Check the tools of one engine action before it acts.
§Errors
crate::diagnostic::Reason::PrerequisiteUnmet naming every tool
that cannot serve the action.
Sourcepub fn load(target: &Utf8Path) -> Result<Self, RkError>
pub fn load(target: &Utf8Path) -> Result<Self, RkError>
Read the record at target.
§Errors
A refusal where the target carries no landing, or a landing the engine does not release.
Sourcepub fn pushed_branch(&self) -> Option<String>
pub fn pushed_branch(&self) -> Option<String>
The branch the push landed on: the checked-out branch, or on a detached CI checkout the branch the forge’s job names.