FakeGitHubRepo class

A repository: its default branch, its refs, the object store they resolve into, and its issues.

Constructors

FakeGitHubRepo({String defaultBranch = 'main'})

Properties

defaultBranch ↔ String
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
issues → Map<int, FakeIssue>
Issues by number, in creation order.
final
labels → Set<String>
The labels that exist in this repository. Modelled explicitly because it is the whole reason a transfer loses labels: GitHub keeps only those the target already defines.
final
nextIssueNumber ↔ int
getter/setter pair
refs → Map<String, String>
heads/<branch> → commit sha. The primary: every write lands here, and every write is compare-and-swapped against it.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
staleRefBudget → Map<String, int>
How many more reads of heads/<branch> are answered from supersededRefs instead of refs. Fed by FakeGitHubServer.staleRefReads on every ref write.
final
supersededRefs → Map<String, String?>
heads/<branch> → the sha this ref held before its most recent write, which a lagging read replica may still be serving. Null when the ref did not exist yet, because a replica that has not seen the create answers 404.
final
uninitialized ↔ bool
A repository that has never received a commit.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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