Skip to content

Commit 2a11720

Browse files
release: 0.3.0 (#39)
* feat(api): manual updates (#38) * feat(api): manual updates (#40) * release: 0.3.0 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent dde5301 commit 2a11720

17 files changed

+118
-43
lines changed

Diff for: .release-please-manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.2.0"
2+
".": "0.3.0"
33
}

Diff for: .stats.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 111
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-f6598ab5d6827f66b642201769e92590ea32af84ebbf24b18cc32b33dee5107e.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-bef0e79f204c51c91f5dca61e621e5e31c7494dccccb200e51da0c7654340816.yml

Diff for: CHANGELOG.md

+9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Changelog
22

3+
## 0.3.0 (2025-02-18)
4+
5+
Full Changelog: [v0.2.0...v0.3.0](https://github.com/gitpod-io/gitpod-sdk-go/compare/v0.2.0...v0.3.0)
6+
7+
### Features
8+
9+
* **api:** manual updates ([#38](https://github.com/gitpod-io/gitpod-sdk-go/issues/38)) ([853ae5c](https://github.com/gitpod-io/gitpod-sdk-go/commit/853ae5cf56e0d0fef0d2371166bd167b33e4ffa5))
10+
* **api:** manual updates ([#40](https://github.com/gitpod-io/gitpod-sdk-go/issues/40)) ([a71a350](https://github.com/gitpod-io/gitpod-sdk-go/commit/a71a350d93dc72bb856668893583195f2d22b5c5))
11+
312
## 0.2.0 (2025-02-18)
413

514
Full Changelog: [v0.1.1...v0.2.0](https://github.com/gitpod-io/gitpod-sdk-go/compare/v0.1.1...v0.2.0)

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -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.2.0'
27+
go get -u 'github.com/gitpod-io/gitpod-sdk-go@v0.3.0'
2828
```
2929

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

Diff for: environment.go

+64-8
Original file line numberDiff line numberDiff line change
@@ -1082,15 +1082,18 @@ type EnvironmentSpecDevcontainer struct {
10821082
// ```
10831083
// this.matches('^$|^[^/].*')
10841084
// ```
1085-
DevcontainerFilePath string `json:"devcontainerFilePath"`
1086-
Session string `json:"session"`
1087-
JSON environmentSpecDevcontainerJSON `json:"-"`
1085+
DevcontainerFilePath string `json:"devcontainerFilePath"`
1086+
// Experimental: dotfiles is the dotfiles configuration of the devcontainer
1087+
Dotfiles EnvironmentSpecDevcontainerDotfiles `json:"dotfiles"`
1088+
Session string `json:"session"`
1089+
JSON environmentSpecDevcontainerJSON `json:"-"`
10881090
}
10891091

10901092
// environmentSpecDevcontainerJSON contains the JSON metadata for the struct
10911093
// [EnvironmentSpecDevcontainer]
10921094
type environmentSpecDevcontainerJSON struct {
10931095
DevcontainerFilePath apijson.Field
1096+
Dotfiles apijson.Field
10941097
Session apijson.Field
10951098
raw string
10961099
ExtraFields map[string]apijson.Field
@@ -1104,6 +1107,39 @@ func (r environmentSpecDevcontainerJSON) RawJSON() string {
11041107
return r.raw
11051108
}
11061109

1110+
// Experimental: dotfiles is the dotfiles configuration of the devcontainer
1111+
type EnvironmentSpecDevcontainerDotfiles struct {
1112+
// URL of a dotfiles Git repository (e.g. https://github.com/owner/repository)
1113+
Repository string `json:"repository,required" format:"uri"`
1114+
// install_command is the command to run after cloning the dotfiles repository.
1115+
// Defaults to run the first file of `install.sh`, `install`, `bootstrap.sh`,
1116+
// `bootstrap`, `setup.sh` and `setup` found in the dotfiles repository's root
1117+
// folder.
1118+
InstallCommand string `json:"installCommand"`
1119+
// target_path is the path to clone the dotfiles repository to. Defaults to
1120+
// `~/dotfiles`.
1121+
TargetPath string `json:"targetPath"`
1122+
JSON environmentSpecDevcontainerDotfilesJSON `json:"-"`
1123+
}
1124+
1125+
// environmentSpecDevcontainerDotfilesJSON contains the JSON metadata for the
1126+
// struct [EnvironmentSpecDevcontainerDotfiles]
1127+
type environmentSpecDevcontainerDotfilesJSON struct {
1128+
Repository apijson.Field
1129+
InstallCommand apijson.Field
1130+
TargetPath apijson.Field
1131+
raw string
1132+
ExtraFields map[string]apijson.Field
1133+
}
1134+
1135+
func (r *EnvironmentSpecDevcontainerDotfiles) UnmarshalJSON(data []byte) (err error) {
1136+
return apijson.UnmarshalRoot(data, r)
1137+
}
1138+
1139+
func (r environmentSpecDevcontainerDotfilesJSON) RawJSON() string {
1140+
return r.raw
1141+
}
1142+
11071143
// machine is the machine spec of the environment
11081144
type EnvironmentSpecMachine struct {
11091145
// Class denotes the class of the environment we ought to start
@@ -1378,13 +1414,33 @@ type EnvironmentSpecDevcontainerParam struct {
13781414
// this.matches('^$|^[^/].*')
13791415
// ```
13801416
DevcontainerFilePath param.Field[string] `json:"devcontainerFilePath"`
1381-
Session param.Field[string] `json:"session"`
1417+
// Experimental: dotfiles is the dotfiles configuration of the devcontainer
1418+
Dotfiles param.Field[EnvironmentSpecDevcontainerDotfilesParam] `json:"dotfiles"`
1419+
Session param.Field[string] `json:"session"`
13821420
}
13831421

13841422
func (r EnvironmentSpecDevcontainerParam) MarshalJSON() (data []byte, err error) {
13851423
return apijson.MarshalRoot(r)
13861424
}
13871425

1426+
// Experimental: dotfiles is the dotfiles configuration of the devcontainer
1427+
type EnvironmentSpecDevcontainerDotfilesParam struct {
1428+
// URL of a dotfiles Git repository (e.g. https://github.com/owner/repository)
1429+
Repository param.Field[string] `json:"repository,required" format:"uri"`
1430+
// install_command is the command to run after cloning the dotfiles repository.
1431+
// Defaults to run the first file of `install.sh`, `install`, `bootstrap.sh`,
1432+
// `bootstrap`, `setup.sh` and `setup` found in the dotfiles repository's root
1433+
// folder.
1434+
InstallCommand param.Field[string] `json:"installCommand"`
1435+
// target_path is the path to clone the dotfiles repository to. Defaults to
1436+
// `~/dotfiles`.
1437+
TargetPath param.Field[string] `json:"targetPath"`
1438+
}
1439+
1440+
func (r EnvironmentSpecDevcontainerDotfilesParam) MarshalJSON() (data []byte, err error) {
1441+
return apijson.MarshalRoot(r)
1442+
}
1443+
13881444
// machine is the machine spec of the environment
13891445
type EnvironmentSpecMachineParam struct {
13901446
// Class denotes the class of the environment we ought to start
@@ -2215,7 +2271,7 @@ func (r EnvironmentStatusSSHPublicKeysPhase) IsKnown() bool {
22152271

22162272
type EnvironmentNewResponse struct {
22172273
// +resource get environment
2218-
Environment Environment `json:"environment"`
2274+
Environment Environment `json:"environment,required"`
22192275
JSON environmentNewResponseJSON `json:"-"`
22202276
}
22212277

@@ -2237,7 +2293,7 @@ func (r environmentNewResponseJSON) RawJSON() string {
22372293

22382294
type EnvironmentGetResponse struct {
22392295
// +resource get environment
2240-
Environment Environment `json:"environment"`
2296+
Environment Environment `json:"environment,required"`
22412297
JSON environmentGetResponseJSON `json:"-"`
22422298
}
22432299

@@ -2263,7 +2319,7 @@ type EnvironmentDeleteResponse = interface{}
22632319

22642320
type EnvironmentNewFromProjectResponse struct {
22652321
// +resource get environment
2266-
Environment Environment `json:"environment"`
2322+
Environment Environment `json:"environment,required"`
22672323
JSON environmentNewFromProjectResponseJSON `json:"-"`
22682324
}
22692325

@@ -2285,7 +2341,7 @@ func (r environmentNewFromProjectResponseJSON) RawJSON() string {
22852341

22862342
type EnvironmentNewLogsTokenResponse struct {
22872343
// access_token is the token that can be used to access the logs of the environment
2288-
AccessToken string `json:"accessToken"`
2344+
AccessToken string `json:"accessToken,required"`
22892345
JSON environmentNewLogsTokenResponseJSON `json:"-"`
22902346
}
22912347

Diff for: environment_test.go

+12-2
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,12 @@ func TestEnvironmentNewWithOptionalParams(t *testing.T) {
5656
DesiredPhase: gitpod.F(gitpod.EnvironmentPhaseUnspecified),
5757
Devcontainer: gitpod.F(gitpod.EnvironmentSpecDevcontainerParam{
5858
DevcontainerFilePath: gitpod.F("devcontainerFilePath"),
59-
Session: gitpod.F("session"),
59+
Dotfiles: gitpod.F(gitpod.EnvironmentSpecDevcontainerDotfilesParam{
60+
Repository: gitpod.F("https://example.com"),
61+
InstallCommand: gitpod.F("installCommand"),
62+
TargetPath: gitpod.F("targetPath"),
63+
}),
64+
Session: gitpod.F("session"),
6065
}),
6166
Machine: gitpod.F(gitpod.EnvironmentSpecMachineParam{
6267
Class: gitpod.F("d2c94c27-3b76-4a42-b88c-95a85e392c68"),
@@ -294,7 +299,12 @@ func TestEnvironmentNewFromProjectWithOptionalParams(t *testing.T) {
294299
DesiredPhase: gitpod.F(gitpod.EnvironmentPhaseUnspecified),
295300
Devcontainer: gitpod.F(gitpod.EnvironmentSpecDevcontainerParam{
296301
DevcontainerFilePath: gitpod.F("devcontainerFilePath"),
297-
Session: gitpod.F("session"),
302+
Dotfiles: gitpod.F(gitpod.EnvironmentSpecDevcontainerDotfilesParam{
303+
Repository: gitpod.F("https://example.com"),
304+
InstallCommand: gitpod.F("installCommand"),
305+
TargetPath: gitpod.F("targetPath"),
306+
}),
307+
Session: gitpod.F("session"),
298308
}),
299309
Machine: gitpod.F(gitpod.EnvironmentSpecMachineParam{
300310
Class: gitpod.F("d2c94c27-3b76-4a42-b88c-95a85e392c68"),

Diff for: environmentautomationservice.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,7 @@ func (r serviceStatusJSON) RawJSON() string {
784784
}
785785

786786
type EnvironmentAutomationServiceNewResponse struct {
787-
Service Service `json:"service"`
787+
Service Service `json:"service,required"`
788788
JSON environmentAutomationServiceNewResponseJSON `json:"-"`
789789
}
790790

@@ -805,7 +805,7 @@ func (r environmentAutomationServiceNewResponseJSON) RawJSON() string {
805805
}
806806

807807
type EnvironmentAutomationServiceGetResponse struct {
808-
Service Service `json:"service"`
808+
Service Service `json:"service,required"`
809809
JSON environmentAutomationServiceGetResponseJSON `json:"-"`
810810
}
811811

Diff for: environmentautomationtask.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ func (r *EnvironmentAutomationTaskService) Start(ctx context.Context, body Envir
281281
}
282282

283283
type EnvironmentAutomationTaskNewResponse struct {
284-
Task shared.Task `json:"task"`
284+
Task shared.Task `json:"task,required"`
285285
JSON environmentAutomationTaskNewResponseJSON `json:"-"`
286286
}
287287

@@ -302,7 +302,7 @@ func (r environmentAutomationTaskNewResponseJSON) RawJSON() string {
302302
}
303303

304304
type EnvironmentAutomationTaskGetResponse struct {
305-
Task shared.Task `json:"task"`
305+
Task shared.Task `json:"task,required"`
306306
JSON environmentAutomationTaskGetResponseJSON `json:"-"`
307307
}
308308

@@ -327,7 +327,7 @@ type EnvironmentAutomationTaskUpdateResponse = interface{}
327327
type EnvironmentAutomationTaskDeleteResponse = interface{}
328328

329329
type EnvironmentAutomationTaskStartResponse struct {
330-
TaskExecution shared.TaskExecution `json:"taskExecution"`
330+
TaskExecution shared.TaskExecution `json:"taskExecution,required"`
331331
JSON environmentAutomationTaskStartResponseJSON `json:"-"`
332332
}
333333

Diff for: environmentautomationtaskexecution.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ func (r *EnvironmentAutomationTaskExecutionService) Stop(ctx context.Context, bo
169169
}
170170

171171
type EnvironmentAutomationTaskExecutionGetResponse struct {
172-
TaskExecution shared.TaskExecution `json:"taskExecution"`
172+
TaskExecution shared.TaskExecution `json:"taskExecution,required"`
173173
JSON environmentAutomationTaskExecutionGetResponseJSON `json:"-"`
174174
}
175175

Diff for: internal/version.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
package internal
44

5-
const PackageVersion = "0.2.0" // x-release-please-version
5+
const PackageVersion = "0.3.0" // x-release-please-version

Diff for: runner.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -661,22 +661,22 @@ func (r runnerStatusJSON) RawJSON() string {
661661
}
662662

663663
type RunnerNewResponse struct {
664+
Runner Runner `json:"runner,required"`
664665
// deprecated, will be removed. Use exchange_token instead.
665666
AccessToken string `json:"accessToken"`
666667
// exchange_token is a one-time use token that should be exchanged by the runner
667668
// for an access token, using the IdentityService.ExchangeToken rpc. The token
668669
// expires after 24 hours.
669670
ExchangeToken string `json:"exchangeToken"`
670-
Runner Runner `json:"runner"`
671671
JSON runnerNewResponseJSON `json:"-"`
672672
}
673673

674674
// runnerNewResponseJSON contains the JSON metadata for the struct
675675
// [RunnerNewResponse]
676676
type runnerNewResponseJSON struct {
677+
Runner apijson.Field
677678
AccessToken apijson.Field
678679
ExchangeToken apijson.Field
679-
Runner apijson.Field
680680
raw string
681681
ExtraFields map[string]apijson.Field
682682
}
@@ -690,7 +690,7 @@ func (r runnerNewResponseJSON) RawJSON() string {
690690
}
691691

692692
type RunnerGetResponse struct {
693-
Runner Runner `json:"runner"`
693+
Runner Runner `json:"runner,required"`
694694
JSON runnerGetResponseJSON `json:"-"`
695695
}
696696

Diff for: runnerconfiguration_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ func TestRunnerConfigurationValidateWithOptionalParams(t *testing.T) {
2929
)
3030
_, err := client.Runners.Configurations.Validate(context.TODO(), gitpod.RunnerConfigurationValidateParams{
3131
EnvironmentClass: gitpod.F(shared.EnvironmentClassParam{
32-
ID: gitpod.F("id"),
32+
ID: gitpod.F("id"),
33+
RunnerID: gitpod.F("runnerId"),
3334
Configuration: gitpod.F([]shared.FieldValueParam{{
3435
Key: gitpod.F("key"),
3536
Value: gitpod.F("value"),
3637
}}),
3738
Description: gitpod.F("xxx"),
3839
DisplayName: gitpod.F("xxx"),
3940
Enabled: gitpod.F(true),
40-
RunnerID: gitpod.F("runnerId"),
4141
}),
4242
RunnerID: gitpod.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
4343
ScmIntegration: gitpod.F(gitpod.RunnerConfigurationValidateParamsScmIntegration{

Diff for: runnerconfigurationhostauthenticationtoken.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ func (r *RunnerConfigurationHostAuthenticationTokenService) Delete(ctx context.C
9292
}
9393

9494
type HostAuthenticationToken struct {
95-
ID string `json:"id"`
95+
ID string `json:"id,required"`
9696
// A Timestamp represents a point in time independent of any time zone or local
9797
// calendar, encoded as a count of seconds and fractions of seconds at nanosecond
9898
// resolution. The count is relative to an epoch at UTC midnight on January 1,
@@ -227,7 +227,7 @@ func (r HostAuthenticationTokenSource) IsKnown() bool {
227227
}
228228

229229
type RunnerConfigurationHostAuthenticationTokenNewResponse struct {
230-
Token HostAuthenticationToken `json:"token"`
230+
Token HostAuthenticationToken `json:"token,required"`
231231
JSON runnerConfigurationHostAuthenticationTokenNewResponseJSON `json:"-"`
232232
}
233233

@@ -248,7 +248,7 @@ func (r runnerConfigurationHostAuthenticationTokenNewResponseJSON) RawJSON() str
248248
}
249249

250250
type RunnerConfigurationHostAuthenticationTokenGetResponse struct {
251-
Token HostAuthenticationToken `json:"token"`
251+
Token HostAuthenticationToken `json:"token,required"`
252252
JSON runnerConfigurationHostAuthenticationTokenGetResponseJSON `json:"-"`
253253
}
254254

Diff for: runnerpolicy.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ func (r RunnerRole) IsKnown() bool {
121121
}
122122

123123
type RunnerPolicyNewResponse struct {
124-
Policy RunnerPolicy `json:"policy"`
124+
Policy RunnerPolicy `json:"policy,required"`
125125
JSON runnerPolicyNewResponseJSON `json:"-"`
126126
}
127127

@@ -142,7 +142,7 @@ func (r runnerPolicyNewResponseJSON) RawJSON() string {
142142
}
143143

144144
type RunnerPolicyUpdateResponse struct {
145-
Policy RunnerPolicy `json:"policy"`
145+
Policy RunnerPolicy `json:"policy,required"`
146146
JSON runnerPolicyUpdateResponseJSON `json:"-"`
147147
}
148148

0 commit comments

Comments
 (0)