open method
Opens a PR for branch (already pushed with -u) against baseBranch,
run from workDir. Returns the PullRequestRef on success, or a
PrOpenFailure (never throws — the land step records either on the bead).
Implementation
@override
Future<PullRequestResult> open({
required String workDir,
required String branch,
required String baseBranch,
required String title,
String body = '',
}) async {
opened.add((
workDir: workDir,
branch: branch,
baseBranch: baseBranch,
title: title,
body: body,
));
if (failNext) {
return PullRequestResult.failed(
const PrOpenFailure('fake: open refused'),
);
}
return PullRequestResult.opened(PullRequestRef(url: url));
}