Skip to content

Commit 853a2c0

Browse files
release: 0.5.0 (#54)
Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent b8a9fd6 commit 853a2c0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+2496
-527
lines changed

.devcontainer/Dockerfile

Lines changed: 0 additions & 22 deletions
This file was deleted.

.devcontainer/devcontainer.json

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,7 @@
11
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
22
// README at: https://github.com/devcontainers/templates/tree/main/src/debian
33
{
4-
"name": "Debian",
5-
"build": {
6-
"dockerfile": "Dockerfile"
7-
}
8-
9-
// Features to add to the dev container. More info: https://containers.dev/features.
10-
// "features": {},
11-
12-
// Use 'forwardPorts' to make a list of ports inside the container available locally.
13-
// "forwardPorts": [],
14-
15-
// Configure tool-specific properties.
16-
// "customizations": {},
17-
18-
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
19-
// "remoteUser": "root"
4+
"name": "Development",
5+
"image": "mcr.microsoft.com/devcontainers/go:1.23-bookworm",
6+
"postCreateCommand": "go mod tidy"
207
}

.github/workflows/ci.yml

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
name: CI
22
on:
33
push:
4-
branches:
5-
- main
6-
pull_request:
7-
branches:
8-
- main
9-
- next
4+
branches-ignore:
5+
- 'generated'
6+
- 'codegen/**'
7+
- 'integrated/**'
8+
- 'stl-preview-head/**'
9+
- 'stl-preview-base/**'
1010

1111
jobs:
1212
lint:
13+
timeout-minutes: 10
1314
name: lint
14-
runs-on: ubuntu-latest
15-
15+
runs-on: ${{ github.repository == 'stainless-sdks/gitpod-go' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
1616

1717
steps:
1818
- uses: actions/checkout@v4
@@ -25,9 +25,9 @@ jobs:
2525
- name: Run lints
2626
run: ./scripts/lint
2727
test:
28+
timeout-minutes: 10
2829
name: test
29-
runs-on: ubuntu-latest
30-
30+
runs-on: ${{ github.repository == 'stainless-sdks/gitpod-go' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
3131
steps:
3232
- uses: actions/checkout@v4
3333

@@ -41,4 +41,3 @@ jobs:
4141

4242
- name: Run tests
4343
run: ./scripts/test
44-

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.4.0"
2+
".": "0.5.0"
33
}

.stats.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1-
configured_endpoints: 111
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-3655d5ad0ac3e228c1519af70dbf3d0bfa3c47a2d06d4cac92a650da051b49a6.yml
1+
configured_endpoints: 119
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-ca9a49ac7fbb63f55611fd7cd48a22a3ff8b38a797125c8513e891d9b7345550.yml
3+
openapi_spec_hash: fd6ffbdfaefcc555e61ca1c565e05214
4+
config_hash: bb9d0a0bdadbee0985dd7c1e4f0e9e8a

CHANGELOG.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,52 @@
11
# Changelog
22

3+
## 0.5.0 (2025-06-06)
4+
5+
Full Changelog: [v0.4.0...v0.5.0](https://github.com/gitpod-io/gitpod-sdk-go/compare/v0.4.0...v0.5.0)
6+
7+
### Features
8+
9+
* **api:** manual updates ([04616ff](https://github.com/gitpod-io/gitpod-sdk-go/commit/04616fff8d30f184d182f2f446c9d91ee82b896b))
10+
* **api:** manual updates ([ccca7e5](https://github.com/gitpod-io/gitpod-sdk-go/commit/ccca7e5f582b1cb79fa8f18111ac2d59f3c8f42e))
11+
* **api:** manual updates ([60b3e5e](https://github.com/gitpod-io/gitpod-sdk-go/commit/60b3e5e20df48bbb2e6d544ccbd266bf418eea7c))
12+
* **api:** manual updates ([3ecd0c4](https://github.com/gitpod-io/gitpod-sdk-go/commit/3ecd0c4894b471a99b52da94d98ee4b1c12cde30))
13+
* **api:** manual updates ([77f5109](https://github.com/gitpod-io/gitpod-sdk-go/commit/77f510928da90a197e8e556203677aa1a5838b9b))
14+
* **client:** add support for reading base URL from environment variable ([e074cd4](https://github.com/gitpod-io/gitpod-sdk-go/commit/e074cd4d1977e7d9c861c9a08a5e8fd0b182d944))
15+
* **client:** allow custom baseurls without trailing slash ([#55](https://github.com/gitpod-io/gitpod-sdk-go/issues/55)) ([20b4808](https://github.com/gitpod-io/gitpod-sdk-go/commit/20b480853025ee9b5402ae5a361010c7de9eabdc))
16+
* **client:** improve default client options support ([#57](https://github.com/gitpod-io/gitpod-sdk-go/issues/57)) ([0cb0d29](https://github.com/gitpod-io/gitpod-sdk-go/commit/0cb0d293a64defd394978cd2b4da6cb006753a69))
17+
* **client:** support custom http clients ([#65](https://github.com/gitpod-io/gitpod-sdk-go/issues/65)) ([ba2780f](https://github.com/gitpod-io/gitpod-sdk-go/commit/ba2780f5173f3e569527a24e9151e258e90df509))
18+
19+
20+
### Bug Fixes
21+
22+
* **client:** return error on bad custom url instead of panic ([#64](https://github.com/gitpod-io/gitpod-sdk-go/issues/64)) ([656a0d1](https://github.com/gitpod-io/gitpod-sdk-go/commit/656a0d137cfa42afa6d540d80d306d254f4841aa))
23+
* **client:** unmarshal stream events into fresh memory ([#63](https://github.com/gitpod-io/gitpod-sdk-go/issues/63)) ([9cf0811](https://github.com/gitpod-io/gitpod-sdk-go/commit/9cf08112fe7b5e702311882b79f167956b09753f))
24+
* handle empty bodies in WithJSONSet ([6155e91](https://github.com/gitpod-io/gitpod-sdk-go/commit/6155e915016da00b885ed17f2452e0b48e1e4fd6))
25+
* **pagination:** handle errors when applying options ([8853449](https://github.com/gitpod-io/gitpod-sdk-go/commit/8853449c7377b7d2976647e4f84598513394b4ab))
26+
* **test:** return early after test failure ([#61](https://github.com/gitpod-io/gitpod-sdk-go/issues/61)) ([0295d21](https://github.com/gitpod-io/gitpod-sdk-go/commit/0295d214d2934e8d4789883255885d3e5ea474c9))
27+
28+
29+
### Chores
30+
31+
* add request options to client tests ([#60](https://github.com/gitpod-io/gitpod-sdk-go/issues/60)) ([b575336](https://github.com/gitpod-io/gitpod-sdk-go/commit/b5753364f5bc6c5617205b2145ade577bc43ac72))
32+
* **ci:** add timeout thresholds for CI jobs ([41d7ceb](https://github.com/gitpod-io/gitpod-sdk-go/commit/41d7cebf060b9a6d6f432d2caa6a82032ca3408c))
33+
* **ci:** only use depot for staging repos ([9fbbeb1](https://github.com/gitpod-io/gitpod-sdk-go/commit/9fbbeb1fd88a3dc49943ef661c1d1c39da956fa2))
34+
* **docs:** document pre-request options ([f2e2e2e](https://github.com/gitpod-io/gitpod-sdk-go/commit/f2e2e2e6286c2641387a0fc11b7ada23d8afc9fc))
35+
* **docs:** improve security documentation ([#59](https://github.com/gitpod-io/gitpod-sdk-go/issues/59)) ([2d3d9e7](https://github.com/gitpod-io/gitpod-sdk-go/commit/2d3d9e7bdb95db8579085db1a23fa7f558b3ab2b))
36+
* fix typos ([#62](https://github.com/gitpod-io/gitpod-sdk-go/issues/62)) ([2ab745f](https://github.com/gitpod-io/gitpod-sdk-go/commit/2ab745f9136f7c6f4528f05e26c1c22a4b15b959))
37+
* **internal:** codegen related update ([a14dae0](https://github.com/gitpod-io/gitpod-sdk-go/commit/a14dae09ffdfec9ef7e1cb3c4b0c3ead27b14e14))
38+
* **internal:** codegen related update ([#56](https://github.com/gitpod-io/gitpod-sdk-go/issues/56)) ([dc521f6](https://github.com/gitpod-io/gitpod-sdk-go/commit/dc521f608d7475d2d98f64fe118433450ab5b2af))
39+
* **internal:** expand CI branch coverage ([7d00669](https://github.com/gitpod-io/gitpod-sdk-go/commit/7d00669f67ba5d7007feceb6f25863de34a237df))
40+
* **internal:** reduce CI branch coverage ([3b674ac](https://github.com/gitpod-io/gitpod-sdk-go/commit/3b674ac888efc38b3713547841770b6c77af2ac8))
41+
* **internal:** remove extra empty newlines ([#58](https://github.com/gitpod-io/gitpod-sdk-go/issues/58)) ([80ff63b](https://github.com/gitpod-io/gitpod-sdk-go/commit/80ff63b57f6df81750f4acaee91003902d2ddae6))
42+
* **tests:** improve enum examples ([#66](https://github.com/gitpod-io/gitpod-sdk-go/issues/66)) ([359070f](https://github.com/gitpod-io/gitpod-sdk-go/commit/359070f05052c648ae75a806ddd037c8eb28dbe7))
43+
44+
45+
### Documentation
46+
47+
* update documentation links to be more uniform ([df86410](https://github.com/gitpod-io/gitpod-sdk-go/commit/df86410ba6bf256e7dc7ebd8b41fc5e15d762fa0))
48+
* update URLs from stainlessapi.com to stainless.com ([#53](https://github.com/gitpod-io/gitpod-sdk-go/issues/53)) ([a5f0af7](https://github.com/gitpod-io/gitpod-sdk-go/commit/a5f0af754b7fb4ef5d967aa53ce3ad22648826be))
49+
350
## 0.4.0 (2025-02-21)
451

552
Full Changelog: [v0.3.2...v0.4.0](https://github.com/gitpod-io/gitpod-sdk-go/compare/v0.3.2...v0.4.0)

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
<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>
44

5-
The Gitpod Go library provides convenient access to [the Gitpod REST
6-
API](https://docs.gitpod.io) from applications written in Go. The full API of this library can be found in [api.md](api.md).
5+
The Gitpod Go library provides convenient access to the [Gitpod REST API](https://docs.gitpod.io)
6+
from applications written in Go.
77

8-
It is generated with [Stainless](https://www.stainlessapi.com/).
8+
It is generated with [Stainless](https://www.stainless.com/).
99

1010
## Installation
1111

@@ -24,7 +24,7 @@ Or to pin the version:
2424
<!-- x-release-please-start-version -->
2525

2626
```sh
27-
go get -u 'github.com/gitpod-io/gitpod-sdk-go@v0.4.0'
27+
go get -u 'github.com/gitpod-io/gitpod-sdk-go@v0.5.0'
2828
```
2929

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

SECURITY.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
## Reporting Security Issues
44

5-
This SDK is generated by [Stainless Software Inc](http://stainlessapi.com). Stainless takes security seriously, and encourages you to report any security vulnerability promptly so that appropriate action can be taken.
5+
This SDK is generated by [Stainless Software Inc](http://stainless.com). Stainless takes security seriously, and encourages you to report any security vulnerability promptly so that appropriate action can be taken.
66

7-
To report a security issue, please contact the Stainless team at security@stainlessapi.com.
7+
To report a security issue, please contact the Stainless team at security@stainless.com.
88

99
## Responsible Disclosure
1010

@@ -16,11 +16,11 @@ before making any information public.
1616
## Reporting Non-SDK Related Security Issues
1717

1818
If you encounter security issues that are not directly related to SDKs but pertain to the services
19-
or products provided by Gitpod please follow the respective company's security reporting guidelines.
19+
or products provided by Gitpod, please follow the respective company's security reporting guidelines.
2020

2121
### Gitpod Terms and Policies
2222

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

2525
---
2626

account.go

Lines changed: 69 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,30 @@ func (r *AccountService) GetSSOLoginURL(ctx context.Context, body AccountGetSSOL
120120
return
121121
}
122122

123+
// Lists organizations that the currently authenticated account can join.
124+
//
125+
// Use this method to:
126+
//
127+
// - Discover organizations associated with the account's email domain.
128+
// - Allow users to join existing organizations.
129+
// - Display potential organizations during onboarding.
130+
//
131+
// ### Examples
132+
//
133+
// - List joinable organizations:
134+
//
135+
// Retrieves a list of organizations the account can join.
136+
//
137+
// ```yaml
138+
// {}
139+
// ```
140+
func (r *AccountService) ListJoinableOrganizations(ctx context.Context, params AccountListJoinableOrganizationsParams, opts ...option.RequestOption) (res *AccountListJoinableOrganizationsResponse, err error) {
141+
opts = append(r.Options[:], opts...)
142+
path := "gitpod.v1.AccountService/ListJoinableOrganizations"
143+
err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &res, opts...)
144+
return
145+
}
146+
123147
// Lists available login providers with optional filtering.
124148
//
125149
// Use this method to:
@@ -380,8 +404,11 @@ type Account struct {
380404
// Joda Time's
381405
// [`ISODateTimeFormat.dateTime()`](<http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()>)
382406
// to obtain a formatter capable of generating timestamps in this format.
383-
UpdatedAt time.Time `json:"updatedAt,required" format:"date-time"`
384-
AvatarURL string `json:"avatarUrl"`
407+
UpdatedAt time.Time `json:"updatedAt,required" format:"date-time"`
408+
AvatarURL string `json:"avatarUrl"`
409+
// joinables is deprecated. Use ListJoinableOrganizations instead.
410+
//
411+
// Deprecated: deprecated
385412
Joinables []JoinableOrganization `json:"joinables"`
386413
Memberships []AccountMembership `json:"memberships"`
387414
// organization_id is the ID of the organization the account is owned by if it's
@@ -552,6 +579,27 @@ func (r accountGetSSOLoginURLResponseJSON) RawJSON() string {
552579
return r.raw
553580
}
554581

582+
type AccountListJoinableOrganizationsResponse struct {
583+
JoinableOrganizations []JoinableOrganization `json:"joinableOrganizations"`
584+
JSON accountListJoinableOrganizationsResponseJSON `json:"-"`
585+
}
586+
587+
// accountListJoinableOrganizationsResponseJSON contains the JSON metadata for the
588+
// struct [AccountListJoinableOrganizationsResponse]
589+
type accountListJoinableOrganizationsResponseJSON struct {
590+
JoinableOrganizations apijson.Field
591+
raw string
592+
ExtraFields map[string]apijson.Field
593+
}
594+
595+
func (r *AccountListJoinableOrganizationsResponse) UnmarshalJSON(data []byte) (err error) {
596+
return apijson.UnmarshalRoot(data, r)
597+
}
598+
599+
func (r accountListJoinableOrganizationsResponseJSON) RawJSON() string {
600+
return r.raw
601+
}
602+
555603
type AccountGetParams struct {
556604
Empty param.Field[bool] `json:"empty"`
557605
}
@@ -579,6 +627,25 @@ func (r AccountGetSSOLoginURLParams) MarshalJSON() (data []byte, err error) {
579627
return apijson.MarshalRoot(r)
580628
}
581629

630+
type AccountListJoinableOrganizationsParams struct {
631+
Token param.Field[string] `query:"token"`
632+
PageSize param.Field[int64] `query:"pageSize"`
633+
Empty param.Field[bool] `json:"empty"`
634+
}
635+
636+
func (r AccountListJoinableOrganizationsParams) MarshalJSON() (data []byte, err error) {
637+
return apijson.MarshalRoot(r)
638+
}
639+
640+
// URLQuery serializes [AccountListJoinableOrganizationsParams]'s query parameters
641+
// as `url.Values`.
642+
func (r AccountListJoinableOrganizationsParams) URLQuery() (v url.Values) {
643+
return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{
644+
ArrayFormat: apiquery.ArrayQueryFormatComma,
645+
NestedFormat: apiquery.NestedQueryFormatBrackets,
646+
})
647+
}
648+
582649
type AccountListLoginProvidersParams struct {
583650
Token param.Field[string] `query:"token"`
584651
PageSize param.Field[int64] `query:"pageSize"`

account_test.go

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,33 @@ func TestAccountGetSSOLoginURLWithOptionalParams(t *testing.T) {
8989
}
9090
}
9191

92+
func TestAccountListJoinableOrganizationsWithOptionalParams(t *testing.T) {
93+
t.Skip("skipped: tests are disabled for the time being")
94+
baseURL := "http://localhost:4010"
95+
if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok {
96+
baseURL = envURL
97+
}
98+
if !testutil.CheckTestServer(t, baseURL) {
99+
return
100+
}
101+
client := gitpod.NewClient(
102+
option.WithBaseURL(baseURL),
103+
option.WithBearerToken("My Bearer Token"),
104+
)
105+
_, err := client.Accounts.ListJoinableOrganizations(context.TODO(), gitpod.AccountListJoinableOrganizationsParams{
106+
Token: gitpod.F("token"),
107+
PageSize: gitpod.F(int64(0)),
108+
Empty: gitpod.F(true),
109+
})
110+
if err != nil {
111+
var apierr *gitpod.Error
112+
if errors.As(err, &apierr) {
113+
t.Log(string(apierr.DumpRequest(true)))
114+
}
115+
t.Fatalf("err should be nil: %s", err.Error())
116+
}
117+
}
118+
92119
func TestAccountListLoginProvidersWithOptionalParams(t *testing.T) {
93120
t.Skip("skipped: tests are disabled for the time being")
94121
baseURL := "http://localhost:4010"

0 commit comments

Comments
 (0)