Skip to content

Commit

Permalink
release: 0.3.0 (#39)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
stainless-app[bot] authored Feb 18, 2025
1 parent dde5301 commit 2a11720
Showing 17 changed files with 118 additions and 43 deletions.
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.2.0"
".": "0.3.0"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 111
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-f6598ab5d6827f66b642201769e92590ea32af84ebbf24b18cc32b33dee5107e.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-bef0e79f204c51c91f5dca61e621e5e31c7494dccccb200e51da0c7654340816.yml
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## 0.3.0 (2025-02-18)

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

### Features

* **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))
* **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))

## 0.2.0 (2025-02-18)

Full Changelog: [v0.1.1...v0.2.0](https://github.com/gitpod-io/gitpod-sdk-go/compare/v0.1.1...v0.2.0)
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@ Or to pin the version:
<!-- x-release-please-start-version -->

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

<!-- x-release-please-end -->
72 changes: 64 additions & 8 deletions environment.go
Original file line number Diff line number Diff line change
@@ -1082,15 +1082,18 @@ type EnvironmentSpecDevcontainer struct {
// ```
// this.matches('^$|^[^/].*')
// ```
DevcontainerFilePath string `json:"devcontainerFilePath"`
Session string `json:"session"`
JSON environmentSpecDevcontainerJSON `json:"-"`
DevcontainerFilePath string `json:"devcontainerFilePath"`
// Experimental: dotfiles is the dotfiles configuration of the devcontainer
Dotfiles EnvironmentSpecDevcontainerDotfiles `json:"dotfiles"`
Session string `json:"session"`
JSON environmentSpecDevcontainerJSON `json:"-"`
}

// environmentSpecDevcontainerJSON contains the JSON metadata for the struct
// [EnvironmentSpecDevcontainer]
type environmentSpecDevcontainerJSON struct {
DevcontainerFilePath apijson.Field
Dotfiles apijson.Field
Session apijson.Field
raw string
ExtraFields map[string]apijson.Field
@@ -1104,6 +1107,39 @@ func (r environmentSpecDevcontainerJSON) RawJSON() string {
return r.raw
}

// Experimental: dotfiles is the dotfiles configuration of the devcontainer
type EnvironmentSpecDevcontainerDotfiles struct {
// URL of a dotfiles Git repository (e.g. https://github.com/owner/repository)
Repository string `json:"repository,required" format:"uri"`
// install_command is the command to run after cloning the dotfiles repository.
// Defaults to run the first file of `install.sh`, `install`, `bootstrap.sh`,
// `bootstrap`, `setup.sh` and `setup` found in the dotfiles repository's root
// folder.
InstallCommand string `json:"installCommand"`
// target_path is the path to clone the dotfiles repository to. Defaults to
// `~/dotfiles`.
TargetPath string `json:"targetPath"`
JSON environmentSpecDevcontainerDotfilesJSON `json:"-"`
}

// environmentSpecDevcontainerDotfilesJSON contains the JSON metadata for the
// struct [EnvironmentSpecDevcontainerDotfiles]
type environmentSpecDevcontainerDotfilesJSON struct {
Repository apijson.Field
InstallCommand apijson.Field
TargetPath apijson.Field
raw string
ExtraFields map[string]apijson.Field
}

func (r *EnvironmentSpecDevcontainerDotfiles) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}

func (r environmentSpecDevcontainerDotfilesJSON) RawJSON() string {
return r.raw
}

// machine is the machine spec of the environment
type EnvironmentSpecMachine struct {
// Class denotes the class of the environment we ought to start
@@ -1378,13 +1414,33 @@ type EnvironmentSpecDevcontainerParam struct {
// this.matches('^$|^[^/].*')
// ```
DevcontainerFilePath param.Field[string] `json:"devcontainerFilePath"`
Session param.Field[string] `json:"session"`
// Experimental: dotfiles is the dotfiles configuration of the devcontainer
Dotfiles param.Field[EnvironmentSpecDevcontainerDotfilesParam] `json:"dotfiles"`
Session param.Field[string] `json:"session"`
}

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

// Experimental: dotfiles is the dotfiles configuration of the devcontainer
type EnvironmentSpecDevcontainerDotfilesParam struct {
// URL of a dotfiles Git repository (e.g. https://github.com/owner/repository)
Repository param.Field[string] `json:"repository,required" format:"uri"`
// install_command is the command to run after cloning the dotfiles repository.
// Defaults to run the first file of `install.sh`, `install`, `bootstrap.sh`,
// `bootstrap`, `setup.sh` and `setup` found in the dotfiles repository's root
// folder.
InstallCommand param.Field[string] `json:"installCommand"`
// target_path is the path to clone the dotfiles repository to. Defaults to
// `~/dotfiles`.
TargetPath param.Field[string] `json:"targetPath"`
}

func (r EnvironmentSpecDevcontainerDotfilesParam) MarshalJSON() (data []byte, err error) {
return apijson.MarshalRoot(r)
}

// machine is the machine spec of the environment
type EnvironmentSpecMachineParam struct {
// Class denotes the class of the environment we ought to start
@@ -2215,7 +2271,7 @@ func (r EnvironmentStatusSSHPublicKeysPhase) IsKnown() bool {

type EnvironmentNewResponse struct {
// +resource get environment
Environment Environment `json:"environment"`
Environment Environment `json:"environment,required"`
JSON environmentNewResponseJSON `json:"-"`
}

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

type EnvironmentGetResponse struct {
// +resource get environment
Environment Environment `json:"environment"`
Environment Environment `json:"environment,required"`
JSON environmentGetResponseJSON `json:"-"`
}

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

type EnvironmentNewFromProjectResponse struct {
// +resource get environment
Environment Environment `json:"environment"`
Environment Environment `json:"environment,required"`
JSON environmentNewFromProjectResponseJSON `json:"-"`
}

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

type EnvironmentNewLogsTokenResponse struct {
// access_token is the token that can be used to access the logs of the environment
AccessToken string `json:"accessToken"`
AccessToken string `json:"accessToken,required"`
JSON environmentNewLogsTokenResponseJSON `json:"-"`
}

14 changes: 12 additions & 2 deletions environment_test.go
Original file line number Diff line number Diff line change
@@ -56,7 +56,12 @@ func TestEnvironmentNewWithOptionalParams(t *testing.T) {
DesiredPhase: gitpod.F(gitpod.EnvironmentPhaseUnspecified),
Devcontainer: gitpod.F(gitpod.EnvironmentSpecDevcontainerParam{
DevcontainerFilePath: gitpod.F("devcontainerFilePath"),
Session: gitpod.F("session"),
Dotfiles: gitpod.F(gitpod.EnvironmentSpecDevcontainerDotfilesParam{
Repository: gitpod.F("https://example.com"),
InstallCommand: gitpod.F("installCommand"),
TargetPath: gitpod.F("targetPath"),
}),
Session: gitpod.F("session"),
}),
Machine: gitpod.F(gitpod.EnvironmentSpecMachineParam{
Class: gitpod.F("d2c94c27-3b76-4a42-b88c-95a85e392c68"),
@@ -294,7 +299,12 @@ func TestEnvironmentNewFromProjectWithOptionalParams(t *testing.T) {
DesiredPhase: gitpod.F(gitpod.EnvironmentPhaseUnspecified),
Devcontainer: gitpod.F(gitpod.EnvironmentSpecDevcontainerParam{
DevcontainerFilePath: gitpod.F("devcontainerFilePath"),
Session: gitpod.F("session"),
Dotfiles: gitpod.F(gitpod.EnvironmentSpecDevcontainerDotfilesParam{
Repository: gitpod.F("https://example.com"),
InstallCommand: gitpod.F("installCommand"),
TargetPath: gitpod.F("targetPath"),
}),
Session: gitpod.F("session"),
}),
Machine: gitpod.F(gitpod.EnvironmentSpecMachineParam{
Class: gitpod.F("d2c94c27-3b76-4a42-b88c-95a85e392c68"),
4 changes: 2 additions & 2 deletions environmentautomationservice.go
Original file line number Diff line number Diff line change
@@ -784,7 +784,7 @@ func (r serviceStatusJSON) RawJSON() string {
}

type EnvironmentAutomationServiceNewResponse struct {
Service Service `json:"service"`
Service Service `json:"service,required"`
JSON environmentAutomationServiceNewResponseJSON `json:"-"`
}

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

type EnvironmentAutomationServiceGetResponse struct {
Service Service `json:"service"`
Service Service `json:"service,required"`
JSON environmentAutomationServiceGetResponseJSON `json:"-"`
}

6 changes: 3 additions & 3 deletions environmentautomationtask.go
Original file line number Diff line number Diff line change
@@ -281,7 +281,7 @@ func (r *EnvironmentAutomationTaskService) Start(ctx context.Context, body Envir
}

type EnvironmentAutomationTaskNewResponse struct {
Task shared.Task `json:"task"`
Task shared.Task `json:"task,required"`
JSON environmentAutomationTaskNewResponseJSON `json:"-"`
}

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

type EnvironmentAutomationTaskGetResponse struct {
Task shared.Task `json:"task"`
Task shared.Task `json:"task,required"`
JSON environmentAutomationTaskGetResponseJSON `json:"-"`
}

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

type EnvironmentAutomationTaskStartResponse struct {
TaskExecution shared.TaskExecution `json:"taskExecution"`
TaskExecution shared.TaskExecution `json:"taskExecution,required"`
JSON environmentAutomationTaskStartResponseJSON `json:"-"`
}

2 changes: 1 addition & 1 deletion environmentautomationtaskexecution.go
Original file line number Diff line number Diff line change
@@ -169,7 +169,7 @@ func (r *EnvironmentAutomationTaskExecutionService) Stop(ctx context.Context, bo
}

type EnvironmentAutomationTaskExecutionGetResponse struct {
TaskExecution shared.TaskExecution `json:"taskExecution"`
TaskExecution shared.TaskExecution `json:"taskExecution,required"`
JSON environmentAutomationTaskExecutionGetResponseJSON `json:"-"`
}

2 changes: 1 addition & 1 deletion internal/version.go
Original file line number Diff line number Diff line change
@@ -2,4 +2,4 @@

package internal

const PackageVersion = "0.2.0" // x-release-please-version
const PackageVersion = "0.3.0" // x-release-please-version
6 changes: 3 additions & 3 deletions runner.go
Original file line number Diff line number Diff line change
@@ -661,22 +661,22 @@ func (r runnerStatusJSON) RawJSON() string {
}

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

// runnerNewResponseJSON contains the JSON metadata for the struct
// [RunnerNewResponse]
type runnerNewResponseJSON struct {
Runner apijson.Field
AccessToken apijson.Field
ExchangeToken apijson.Field
Runner apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
@@ -690,7 +690,7 @@ func (r runnerNewResponseJSON) RawJSON() string {
}

type RunnerGetResponse struct {
Runner Runner `json:"runner"`
Runner Runner `json:"runner,required"`
JSON runnerGetResponseJSON `json:"-"`
}

4 changes: 2 additions & 2 deletions runnerconfiguration_test.go
Original file line number Diff line number Diff line change
@@ -29,15 +29,15 @@ func TestRunnerConfigurationValidateWithOptionalParams(t *testing.T) {
)
_, err := client.Runners.Configurations.Validate(context.TODO(), gitpod.RunnerConfigurationValidateParams{
EnvironmentClass: gitpod.F(shared.EnvironmentClassParam{
ID: gitpod.F("id"),
ID: gitpod.F("id"),
RunnerID: gitpod.F("runnerId"),
Configuration: gitpod.F([]shared.FieldValueParam{{
Key: gitpod.F("key"),
Value: gitpod.F("value"),
}}),
Description: gitpod.F("xxx"),
DisplayName: gitpod.F("xxx"),
Enabled: gitpod.F(true),
RunnerID: gitpod.F("runnerId"),
}),
RunnerID: gitpod.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
ScmIntegration: gitpod.F(gitpod.RunnerConfigurationValidateParamsScmIntegration{
6 changes: 3 additions & 3 deletions runnerconfigurationhostauthenticationtoken.go
Original file line number Diff line number Diff line change
@@ -92,7 +92,7 @@ func (r *RunnerConfigurationHostAuthenticationTokenService) Delete(ctx context.C
}

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

type RunnerConfigurationHostAuthenticationTokenNewResponse struct {
Token HostAuthenticationToken `json:"token"`
Token HostAuthenticationToken `json:"token,required"`
JSON runnerConfigurationHostAuthenticationTokenNewResponseJSON `json:"-"`
}

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

type RunnerConfigurationHostAuthenticationTokenGetResponse struct {
Token HostAuthenticationToken `json:"token"`
Token HostAuthenticationToken `json:"token,required"`
JSON runnerConfigurationHostAuthenticationTokenGetResponseJSON `json:"-"`
}

4 changes: 2 additions & 2 deletions runnerpolicy.go
Original file line number Diff line number Diff line change
@@ -121,7 +121,7 @@ func (r RunnerRole) IsKnown() bool {
}

type RunnerPolicyNewResponse struct {
Policy RunnerPolicy `json:"policy"`
Policy RunnerPolicy `json:"policy,required"`
JSON runnerPolicyNewResponseJSON `json:"-"`
}

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

type RunnerPolicyUpdateResponse struct {
Policy RunnerPolicy `json:"policy"`
Policy RunnerPolicy `json:"policy,required"`
JSON runnerPolicyUpdateResponseJSON `json:"-"`
}

Loading
Oops, something went wrong.

0 comments on commit 2a11720

Please sign in to comment.