// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
package org_tangled
// schema: org.tangled.temp.repo.getDeployHistory
import (
"context"
"github.com/bluesky-social/indigo/lex/util"
)
const (
TempRepoGetDeployHistoryNSID = "org.tangled.temp.repo.getDeployHistory"
)
// TempRepoGetDeployHistory_Deploy is a "deploy" in the org.tangled.temp.repo.getDeployHistory schema.
type TempRepoGetDeployHistory_Deploy struct {
// branch: Branch the deploy built.
Branch string `json:"branch" cborgen:"branch"`
// commitSha: Commit the deploy built. Empty for a config-change deploy, which builds the branch tip at deploy time.
CommitSha string `json:"commitSha" cborgen:"commitSha"`
// createdAt: When the deploy finished.
CreatedAt string `json:"createdAt" cborgen:"createdAt"`
// dir: Directory within the repository the deploy built (e.g. '/' or '/docs').
Dir string `json:"dir" cborgen:"dir"`
// error: Why the deploy failed. Empty when it succeeded.
Error string `json:"error" cborgen:"error"`
// status: Outcome of the deploy.
Status string `json:"status" cborgen:"status"`
// trigger: What asked for the deploy: a site config change, a push to the deployed branch, or a manual redeploy.
Trigger string `json:"trigger" cborgen:"trigger"`
}
// TempRepoGetDeployHistory_Output is the output of a org.tangled.temp.repo.getDeployHistory call.
type TempRepoGetDeployHistory_Output struct {
// deploys: The 20 most recent deploys, newest first. Empty when the repository has never deployed.
Deploys []*TempRepoGetDeployHistory_Deploy `json:"deploys" cborgen:"deploys"`
}
// TempRepoGetDeployHistory calls the XRPC method "org.tangled.temp.repo.getDeployHistory".
//
// repoDid: DID of the repository as minted by the knot.
func TempRepoGetDeployHistory(ctx context.Context, c util.LexClient, repoDid string) (*TempRepoGetDeployHistory_Output, error) {
var out TempRepoGetDeployHistory_Output
params := map[string]interface{}{}
params["repoDid"] = repoDid
if err := c.LexDo(ctx, util.Query, "", "org.tangled.temp.repo.getDeployHistory", params, nil, &out); err != nil {
return nil, err
}
return &out, nil
}