Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
80b9e2b
feat(client): add debug log helper
stainless-app[bot] Jun 17, 2025
2c731e3
chore(ci): enable for pull requests
stainless-app[bot] Jun 17, 2025
8d9d6fb
fix(pagination): check if page data is empty in GetNextPage
stainless-app[bot] Jun 27, 2025
52bb01f
fix: don't try to deserialize as json when ResponseBodyInto is []byte
stainless-app[bot] Jun 28, 2025
5214c86
chore(ci): only run for pushes and fork pull requests
stainless-app[bot] Jun 28, 2025
1bba107
chore: lint tests
stainless-app[bot] Jul 8, 2025
076dd1d
chore(internal): fix lint script for tests
stainless-app[bot] Jul 9, 2025
7c466c2
chore: lint tests in subpackages
stainless-app[bot] Jul 11, 2025
aa5fbb8
fix(client): process custom base url ahead of time
stainless-app[bot] Jul 22, 2025
1b5fe8d
feat(client): support optional json html escaping
stainless-app[bot] Aug 7, 2025
b8acf38
chore: update @stainless-api/prism-cli to v5.15.0
stainless-app[bot] Aug 9, 2025
b55d442
chore(internal): update comment in script
stainless-app[bot] Aug 9, 2025
552d759
feat(api): gitpod -> ona
stainless-app[bot] Sep 3, 2025
b6b7089
codegen metadata
stainless-app[bot] Sep 4, 2025
1b92a3a
codegen metadata
stainless-app[bot] Sep 17, 2025
92bbcb3
chore: bump minimum go version to 1.22
stainless-app[bot] Sep 19, 2025
d1761ab
chore: update more docs for 1.22
stainless-app[bot] Sep 19, 2025
083789f
fix: use slices.Concat instead of sometimes modifying r.Options
stainless-app[bot] Sep 19, 2025
99dff1a
chore: do not install brew dependencies in ./scripts/bootstrap by def…
stainless-app[bot] Sep 19, 2025
8cb7fa5
fix: bugfix for setting JSON keys with special characters
stainless-app[bot] Sep 25, 2025
ae32453
release: 0.6.0
stainless-app[bot] Sep 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,17 @@ on:
- 'integrated/**'
- 'stl-preview-head/**'
- 'stl-preview-base/**'
pull_request:
branches-ignore:
- 'stl-preview-head/**'
- 'stl-preview-base/**'

jobs:
lint:
timeout-minutes: 10
name: lint
runs-on: ${{ github.repository == 'stainless-sdks/gitpod-go' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork

steps:
- uses: actions/checkout@v4
Expand All @@ -28,6 +33,7 @@ jobs:
timeout-minutes: 10
name: test
runs-on: ${{ github.repository == 'stainless-sdks/gitpod-go' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@v4

Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.5.0"
".": "0.6.0"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 119
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-ca9a49ac7fbb63f55611fd7cd48a22a3ff8b38a797125c8513e891d9b7345550.yml
openapi_spec_hash: fd6ffbdfaefcc555e61ca1c565e05214
config_hash: bb9d0a0bdadbee0985dd7c1e4f0e9e8a
config_hash: 7fb76543ceafd4a116473f647f8d63b1
33 changes: 33 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,38 @@
# Changelog

## 0.6.0 (2025-09-25)

Full Changelog: [v0.5.0...v0.6.0](https://github.com/gitpod-io/gitpod-sdk-go/compare/v0.5.0...v0.6.0)

### Features

* **api:** gitpod -> ona ([552d759](https://github.com/gitpod-io/gitpod-sdk-go/commit/552d759cc37edb71984b3a8d8dc740e999fa42a4))
* **client:** add debug log helper ([80b9e2b](https://github.com/gitpod-io/gitpod-sdk-go/commit/80b9e2b14e06850bda8d96cb4bdbcc611d9684d8))
* **client:** support optional json html escaping ([1b5fe8d](https://github.com/gitpod-io/gitpod-sdk-go/commit/1b5fe8d71198d7c27d346ced65b1a5916c1ca5f8))


### Bug Fixes

* bugfix for setting JSON keys with special characters ([8cb7fa5](https://github.com/gitpod-io/gitpod-sdk-go/commit/8cb7fa5e315ee8407b030c7203e95b66003d9473))
* **client:** process custom base url ahead of time ([aa5fbb8](https://github.com/gitpod-io/gitpod-sdk-go/commit/aa5fbb87c9b247fbe9ca6d74f72ccbd775d295b6))
* don't try to deserialize as json when ResponseBodyInto is []byte ([52bb01f](https://github.com/gitpod-io/gitpod-sdk-go/commit/52bb01f2bc2aae5736c292faf09d98a515be2a08))
* **pagination:** check if page data is empty in GetNextPage ([8d9d6fb](https://github.com/gitpod-io/gitpod-sdk-go/commit/8d9d6fb9ca5a3913d0400620dd18686290f8e57d))
* use slices.Concat instead of sometimes modifying r.Options ([083789f](https://github.com/gitpod-io/gitpod-sdk-go/commit/083789f37af9f36fe39d0e45cb9e0ed087cf54cf))


### Chores

* bump minimum go version to 1.22 ([92bbcb3](https://github.com/gitpod-io/gitpod-sdk-go/commit/92bbcb34c44340cfc9eb20416ac7f9c565462299))
* **ci:** enable for pull requests ([2c731e3](https://github.com/gitpod-io/gitpod-sdk-go/commit/2c731e32d19595c013749cea2a7a8c50603aa0a4))
* **ci:** only run for pushes and fork pull requests ([5214c86](https://github.com/gitpod-io/gitpod-sdk-go/commit/5214c8625e015da0f06ab2f817c96a31346475ec))
* do not install brew dependencies in ./scripts/bootstrap by default ([99dff1a](https://github.com/gitpod-io/gitpod-sdk-go/commit/99dff1a321df7284bf84be3b4639ddbbbba3f588))
* **internal:** fix lint script for tests ([076dd1d](https://github.com/gitpod-io/gitpod-sdk-go/commit/076dd1d2cef96adf0c5b21e4413387307f52971d))
* **internal:** update comment in script ([b55d442](https://github.com/gitpod-io/gitpod-sdk-go/commit/b55d44229d14d7bc61b3bf18ed181689b280dfc8))
* lint tests ([1bba107](https://github.com/gitpod-io/gitpod-sdk-go/commit/1bba1075657651b1ac7b261bbd9c2fcd3fc08fdd))
* lint tests in subpackages ([7c466c2](https://github.com/gitpod-io/gitpod-sdk-go/commit/7c466c272c807ecda01497bd3565408e973cc177))
* update @stainless-api/prism-cli to v5.15.0 ([b8acf38](https://github.com/gitpod-io/gitpod-sdk-go/commit/b8acf385df0d9b2ca8d2cf65635b6a2ab437e9c7))
* update more docs for 1.22 ([d1761ab](https://github.com/gitpod-io/gitpod-sdk-go/commit/d1761aba3bc28977b3227bcdf8161099feeee04d))

## 0.5.0 (2025-06-06)

Full Changelog: [v0.4.0...v0.5.0](https://github.com/gitpod-io/gitpod-sdk-go/compare/v0.4.0...v0.5.0)
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ $ ./scripts/build

This will install all the required dependencies and build the SDK.

You can also [install go 1.18+ manually](https://go.dev/doc/install).
You can also [install go 1.22+ manually](https://go.dev/doc/install).

## Modifying/Adding code

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<a href="https://pkg.go.dev/github.com/gitpod-io/gitpod-sdk-go"><img src="https://pkg.go.dev/badge/github.com/gitpod-io/gitpod-sdk-go.svg" alt="Go Reference"></a>

The Gitpod Go library provides convenient access to the [Gitpod REST API](https://docs.gitpod.io)
The Gitpod Go library provides convenient access to the [Gitpod REST API](https://docs.ona.com)
from applications written in Go.

It is generated with [Stainless](https://www.stainless.com/).
Expand All @@ -24,14 +24,14 @@ Or to pin the version:
<!-- x-release-please-start-version -->

```sh
go get -u 'github.com/gitpod-io/gitpod-sdk-go@v0.5.0'
go get -u 'github.com/gitpod-io/gitpod-sdk-go@v0.6.0'
```

<!-- x-release-please-end -->

## Requirements

This library requires Go 1.18+.
This library requires Go 1.22+.

## Usage

Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ or products provided by Gitpod, please follow the respective company's security

### Gitpod Terms and Policies

Please contact dev-feedback@gitpod.com for any questions or concerns regarding the security of our services.
Please contact dev-feedback@ona.com for any questions or concerns regarding the security of our services.

---

Expand Down
11 changes: 6 additions & 5 deletions account.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"context"
"net/http"
"net/url"
"slices"
"time"

"github.com/gitpod-io/gitpod-sdk-go/internal/apijson"
Expand Down Expand Up @@ -55,7 +56,7 @@ func NewAccountService(opts ...option.RequestOption) (r *AccountService) {
// {}
// ```
func (r *AccountService) Get(ctx context.Context, body AccountGetParams, opts ...option.RequestOption) (res *AccountGetResponse, err error) {
opts = append(r.Options[:], opts...)
opts = slices.Concat(r.Options, opts)
path := "gitpod.v1.AccountService/GetAccount"
err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &res, opts...)
return
Expand All @@ -81,7 +82,7 @@ func (r *AccountService) Get(ctx context.Context, body AccountGetParams, opts ..
// accountId: "f53d2330-3795-4c5d-a1f3-453121af9c60"
// ```
func (r *AccountService) Delete(ctx context.Context, body AccountDeleteParams, opts ...option.RequestOption) (res *AccountDeleteResponse, err error) {
opts = append(r.Options[:], opts...)
opts = slices.Concat(r.Options, opts)
path := "gitpod.v1.AccountService/DeleteAccount"
err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &res, opts...)
return
Expand Down Expand Up @@ -114,7 +115,7 @@ func (r *AccountService) Delete(ctx context.Context, body AccountDeleteParams, o
// returnTo: "https://gitpod.io/workspaces"
// ```
func (r *AccountService) GetSSOLoginURL(ctx context.Context, body AccountGetSSOLoginURLParams, opts ...option.RequestOption) (res *AccountGetSSOLoginURLResponse, err error) {
opts = append(r.Options[:], opts...)
opts = slices.Concat(r.Options, opts)
path := "gitpod.v1.AccountService/GetSSOLoginURL"
err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &res, opts...)
return
Expand All @@ -138,7 +139,7 @@ func (r *AccountService) GetSSOLoginURL(ctx context.Context, body AccountGetSSOL
// {}
// ```
func (r *AccountService) ListJoinableOrganizations(ctx context.Context, params AccountListJoinableOrganizationsParams, opts ...option.RequestOption) (res *AccountListJoinableOrganizationsResponse, err error) {
opts = append(r.Options[:], opts...)
opts = slices.Concat(r.Options, opts)
path := "gitpod.v1.AccountService/ListJoinableOrganizations"
err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &res, opts...)
return
Expand Down Expand Up @@ -175,7 +176,7 @@ func (r *AccountService) ListJoinableOrganizations(ctx context.Context, params A
// ```
func (r *AccountService) ListLoginProviders(ctx context.Context, params AccountListLoginProvidersParams, opts ...option.RequestOption) (res *pagination.LoginProvidersPage[LoginProvider], err error) {
var raw *http.Response
opts = append(r.Options[:], opts...)
opts = slices.Concat(r.Options, opts)
opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...)
path := "gitpod.v1.AccountService/ListLoginProviders"
cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodPost, path, params, &res, opts...)
Expand Down
10 changes: 5 additions & 5 deletions account_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
)

func TestAccountGetWithOptionalParams(t *testing.T) {
t.Skip("skipped: tests are disabled for the time being")
t.Skip("Prism tests are disabled")
baseURL := "http://localhost:4010"
if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok {
baseURL = envURL
Expand All @@ -39,7 +39,7 @@ func TestAccountGetWithOptionalParams(t *testing.T) {
}

func TestAccountDelete(t *testing.T) {
t.Skip("skipped: tests are disabled for the time being")
t.Skip("Prism tests are disabled")
baseURL := "http://localhost:4010"
if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok {
baseURL = envURL
Expand All @@ -64,7 +64,7 @@ func TestAccountDelete(t *testing.T) {
}

func TestAccountGetSSOLoginURLWithOptionalParams(t *testing.T) {
t.Skip("skipped: tests are disabled for the time being")
t.Skip("Prism tests are disabled")
baseURL := "http://localhost:4010"
if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok {
baseURL = envURL
Expand All @@ -90,7 +90,7 @@ func TestAccountGetSSOLoginURLWithOptionalParams(t *testing.T) {
}

func TestAccountListJoinableOrganizationsWithOptionalParams(t *testing.T) {
t.Skip("skipped: tests are disabled for the time being")
t.Skip("Prism tests are disabled")
baseURL := "http://localhost:4010"
if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok {
baseURL = envURL
Expand All @@ -117,7 +117,7 @@ func TestAccountListJoinableOrganizationsWithOptionalParams(t *testing.T) {
}

func TestAccountListLoginProvidersWithOptionalParams(t *testing.T) {
t.Skip("skipped: tests are disabled for the time being")
t.Skip("Prism tests are disabled")
baseURL := "http://localhost:4010"
if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok {
baseURL = envURL
Expand Down
3 changes: 2 additions & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"context"
"net/http"
"os"
"slices"

"github.com/gitpod-io/gitpod-sdk-go/internal/requestconfig"
"github.com/gitpod-io/gitpod-sdk-go/option"
Expand Down Expand Up @@ -102,7 +103,7 @@ func NewClient(opts ...option.RequestOption) (r *Client) {
// For even greater flexibility, see [option.WithResponseInto] and
// [option.WithResponseBodyInto].
func (r *Client) Execute(ctx context.Context, method string, path string, params interface{}, res interface{}, opts ...option.RequestOption) error {
opts = append(r.Options, opts...)
opts = slices.Concat(r.Options, opts)
return requestconfig.ExecuteNewRequest(ctx, method, path, params, res, opts...)
}

Expand Down
7 changes: 4 additions & 3 deletions editor.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"context"
"net/http"
"net/url"
"slices"

"github.com/gitpod-io/gitpod-sdk-go/internal/apijson"
"github.com/gitpod-io/gitpod-sdk-go/internal/apiquery"
Expand Down Expand Up @@ -51,7 +52,7 @@ func NewEditorService(opts ...option.RequestOption) (r *EditorService) {
// id: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
// ```
func (r *EditorService) Get(ctx context.Context, body EditorGetParams, opts ...option.RequestOption) (res *EditorGetResponse, err error) {
opts = append(r.Options[:], opts...)
opts = slices.Concat(r.Options, opts)
path := "gitpod.v1.EditorService/GetEditor"
err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &res, opts...)
return
Expand Down Expand Up @@ -91,7 +92,7 @@ func (r *EditorService) Get(ctx context.Context, body EditorGetParams, opts ...o
// ```
func (r *EditorService) List(ctx context.Context, params EditorListParams, opts ...option.RequestOption) (res *pagination.EditorsPage[Editor], err error) {
var raw *http.Response
opts = append(r.Options[:], opts...)
opts = slices.Concat(r.Options, opts)
opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...)
path := "gitpod.v1.EditorService/ListEditors"
cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodPost, path, params, &res, opts...)
Expand Down Expand Up @@ -163,7 +164,7 @@ func (r *EditorService) ListAutoPaging(ctx context.Context, params EditorListPar
// organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
// ```
func (r *EditorService) ResolveURL(ctx context.Context, body EditorResolveURLParams, opts ...option.RequestOption) (res *EditorResolveURLResponse, err error) {
opts = append(r.Options[:], opts...)
opts = slices.Concat(r.Options, opts)
path := "gitpod.v1.EditorService/ResolveEditorURL"
err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &res, opts...)
return
Expand Down
6 changes: 3 additions & 3 deletions editor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
)

func TestEditorGet(t *testing.T) {
t.Skip("skipped: tests are disabled for the time being")
t.Skip("Prism tests are disabled")
baseURL := "http://localhost:4010"
if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok {
baseURL = envURL
Expand All @@ -39,7 +39,7 @@ func TestEditorGet(t *testing.T) {
}

func TestEditorListWithOptionalParams(t *testing.T) {
t.Skip("skipped: tests are disabled for the time being")
t.Skip("Prism tests are disabled")
baseURL := "http://localhost:4010"
if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok {
baseURL = envURL
Expand Down Expand Up @@ -72,7 +72,7 @@ func TestEditorListWithOptionalParams(t *testing.T) {
}

func TestEditorResolveURL(t *testing.T) {
t.Skip("skipped: tests are disabled for the time being")
t.Skip("Prism tests are disabled")
baseURL := "http://localhost:4010"
if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok {
baseURL = envURL
Expand Down
Loading