Filip Troníček cfe795c6ee
Prebuild trigger checks (#20228)
* Add `GetConfigurationWebhookActivityStatus` to proto

* codegen

* `GetConfigurationWebhookActivityStatus` impl

* give it a UI

* Revert trigger strategy on webhook event

* debug: enable webhooks again

* fix UI

* maybe fix build?

* Automatically convert to activity-based prebuilds

* 🤷‍♂️

* don't limit to a week when converting to activity-based

* Change copy

Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>

* Less cyclic deps

* removing warning and add informative trigger strategy field

* fix sizing of prebuild trigger strategy info

* Revert "debug: enable webhooks again"

This reverts commit 1c47067734b9f19bbe7e72522eab387fec6022b5.

---------

Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>
2024-09-23 09:00:08 -04:00
..
2023-11-06 16:32:44 +02:00
2024-09-23 09:00:08 -04:00
2022-03-26 15:31:09 +05:30
2024-03-26 20:55:35 +01:00
2024-03-26 20:55:35 +01:00
2023-01-04 11:13:44 +01:00

Golang bindings for Gitpod API

This package contains API definitions and client bindings for interacting with Gitpod API.

Usage

go get -u github.com/gitpod-io/gitpod/components/public-api/go
import (
    "context"
    "fmt"
    "os"
    "time"

    "github.com/bufbuild/connect-go"
    "github.com/gitpod-io/gitpod/components/public-api/go/client"
    v1 "github.com/gitpod-io/gitpod/components/public-api/go/experimental/v1"
)

func ExampleListTeams() {
    token := "gitpod_pat_example.personal-access-token"

    gitpod, err := client.New(client.WithCredentials(token))
    if err != nil {
        fmt.Fprintf(os.Stderr, "Failed to construct gitpod client %v", err)
        return
    }

    response, err := gitpod.Teams.ListTeams(context.Background(), connect.NewRequest(&v1.ListTeamsRequest{}))
    if err != nil {
        fmt.Fprintf(os.Stderr, "Failed to list teams %v", err)
        return
    }

    fmt.Fprintf(os.Stdout, "Retrieved teams %v", response.Msg.GetTeams())
}

For more examples, see examples directory.