~james/core

core/api/org_tangled/temprepogetDeployHistory.go -rw-r--r-- 2.1 KiB
452f17b7 — james chore(import): snapshot james.dad.town/core at f70c71c7696a 16 hours ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// 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
}