FakePrOpener class

A recording PrOpener: records every open call and returns a settable PullRequestResult (success with a configurable url, or a failure). Never touches real GitHub.

Constructors

FakePrOpener({String url = 'https://github.com/memento/genesis/pull/42'})
Creates the recorder; a successful open returns url.

Properties

failNext bool
When true, the next open returns a PullRequestResult.failed (and is NOT cleared — every open then fails) so a test can assert the no-record / no-close path.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
opened List<({String baseBranch, String body, String branch, String title, String workDir})>
Every (workDir, branch, baseBranch, title, body) open, in call order.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
url String
The url a successful open returns; ignored when failNext is set.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
open({required String workDir, required String branch, required String baseBranch, required String title, String body = ''}) Future<PullRequestResult>
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).
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited