@usine/core/step/harvest
Classes
Section titled “Classes”HarvestError
Section titled “HarvestError”git or GitHub answered a harvesting command with output that is not a valid result.
Extends
Section titled “Extends”Schema.Class
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new HarvestError(…
args):HarvestError
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
…args |
[props: object, options?: MakeOptions] |
Returns
Section titled “Returns”Properties
Section titled “Properties”
readonlycause:unknown
message
Section titled “message”
readonlymessage:string
readonlystage:"git"|"github"
Type Aliases
Section titled “Type Aliases”HarvestCommand
Section titled “HarvestCommand”HarvestCommand<
E> = (command,args) =>Effect.Effect<ReadonlyArray<string>,E>
Runs one read-only git or gh command in the Attempt’s checkout and returns
its stdout lines. A non-zero exit is the runner’s own failure.
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
E |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
command |
"git" | "gh" |
args |
ReadonlyArray<string> |
Returns
Section titled “Returns”Effect.Effect<ReadonlyArray<string>, E>
HarvestSpec
Section titled “HarvestSpec”HarvestSpec =
Pick<RunSpec,"attemptId"|"repository"|"revision"|"baseCommit">
The part of an Attempt’s RunSpec that harvesting reads: where its checkout started and what it was given.
Variables
Section titled “Variables”harvestFacts
Section titled “harvestFacts”
constharvestFacts: <E>(spec,run) =>Effect.Effect<readonly (Comment|Commit|PullRequest)[],E|HarvestError,never>
The facts an Attempt’s checkout holds once its agent has finished: new commits, then the pull requests at its final commit. Pull request discovery is read-only enrichment, so a GitHub failure or a ten-second stall keeps the commits and records no pull request rather than failing completed work.
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
E extends object |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
spec |
HarvestSpec |
run |
HarvestCommand<E> |
Returns
Section titled “Returns”Effect.Effect<readonly (Comment | Commit | PullRequest)[], E | HarvestError, never>