Skip to content

Commit d58de25

Browse files
feat(types): extract Report types to top-level from WorkflowStep
1 parent a6471d2 commit d58de25

3 files changed

Lines changed: 3 additions & 83 deletions

File tree

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 193
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-dabc0ff98cd7b9d91850b3c0dbada4e487e698333cd0b7257959e4819d9a29d6.yml
3-
openapi_spec_hash: b974bdc6025a26cfa62857bf74ec379b
4-
config_hash: 13514c5eb422e4eb01767e718798de1e
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-3dcdbd68ce4b336149d28d17ab08f211538ed6630112ae4883af2f6680643159.yml
3+
openapi_spec_hash: 7e4333995b65cf32663166801e2444bb
4+
config_hash: 8d7b241284195a8c51f5d670fbbe0ab4

automation.go

Lines changed: 0 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -2496,7 +2496,6 @@ type WorkflowStep struct {
24962496
Agent WorkflowStepAgent `json:"agent"`
24972497
// WorkflowPullRequestStep represents a pull request creation step.
24982498
PullRequest WorkflowStepPullRequest `json:"pullRequest"`
2499-
Report WorkflowStepReport `json:"report"`
25002499
// WorkflowTaskStep represents a task step that executes a command.
25012500
Task WorkflowStepTask `json:"task"`
25022501
JSON workflowStepJSON `json:"-"`
@@ -2506,7 +2505,6 @@ type WorkflowStep struct {
25062505
type workflowStepJSON struct {
25072506
Agent apijson.Field
25082507
PullRequest apijson.Field
2509-
Report apijson.Field
25102508
Task apijson.Field
25112509
raw string
25122510
ExtraFields map[string]apijson.Field
@@ -2590,51 +2588,6 @@ func (r workflowStepPullRequestJSON) RawJSON() string {
25902588
return r.raw
25912589
}
25922590

2593-
type WorkflowStepReport struct {
2594-
// Report must have at least one output:
2595-
//
2596-
// ```
2597-
// size(this) >= 1
2598-
// ```
2599-
Outputs []WorkflowStepReportOutput `json:"outputs"`
2600-
JSON workflowStepReportJSON `json:"-"`
2601-
}
2602-
2603-
// workflowStepReportJSON contains the JSON metadata for the struct
2604-
// [WorkflowStepReport]
2605-
type workflowStepReportJSON struct {
2606-
Outputs apijson.Field
2607-
raw string
2608-
ExtraFields map[string]apijson.Field
2609-
}
2610-
2611-
func (r *WorkflowStepReport) UnmarshalJSON(data []byte) (err error) {
2612-
return apijson.UnmarshalRoot(data, r)
2613-
}
2614-
2615-
func (r workflowStepReportJSON) RawJSON() string {
2616-
return r.raw
2617-
}
2618-
2619-
type WorkflowStepReportOutput struct {
2620-
JSON workflowStepReportOutputJSON `json:"-"`
2621-
}
2622-
2623-
// workflowStepReportOutputJSON contains the JSON metadata for the struct
2624-
// [WorkflowStepReportOutput]
2625-
type workflowStepReportOutputJSON struct {
2626-
raw string
2627-
ExtraFields map[string]apijson.Field
2628-
}
2629-
2630-
func (r *WorkflowStepReportOutput) UnmarshalJSON(data []byte) (err error) {
2631-
return apijson.UnmarshalRoot(data, r)
2632-
}
2633-
2634-
func (r workflowStepReportOutputJSON) RawJSON() string {
2635-
return r.raw
2636-
}
2637-
26382591
// WorkflowTaskStep represents a task step that executes a command.
26392592
type WorkflowStepTask struct {
26402593
// Command must be between 1 and 20,000 characters:
@@ -2668,7 +2621,6 @@ type WorkflowStepParam struct {
26682621
Agent param.Field[WorkflowStepAgentParam] `json:"agent"`
26692622
// WorkflowPullRequestStep represents a pull request creation step.
26702623
PullRequest param.Field[WorkflowStepPullRequestParam] `json:"pullRequest"`
2671-
Report param.Field[WorkflowStepReportParam] `json:"report"`
26722624
// WorkflowTaskStep represents a task step that executes a command.
26732625
Task param.Field[WorkflowStepTaskParam] `json:"task"`
26742626
}
@@ -2718,26 +2670,6 @@ func (r WorkflowStepPullRequestParam) MarshalJSON() (data []byte, err error) {
27182670
return apijson.MarshalRoot(r)
27192671
}
27202672

2721-
type WorkflowStepReportParam struct {
2722-
// Report must have at least one output:
2723-
//
2724-
// ```
2725-
// size(this) >= 1
2726-
// ```
2727-
Outputs param.Field[[]WorkflowStepReportOutputParam] `json:"outputs"`
2728-
}
2729-
2730-
func (r WorkflowStepReportParam) MarshalJSON() (data []byte, err error) {
2731-
return apijson.MarshalRoot(r)
2732-
}
2733-
2734-
type WorkflowStepReportOutputParam struct {
2735-
}
2736-
2737-
func (r WorkflowStepReportOutputParam) MarshalJSON() (data []byte, err error) {
2738-
return apijson.MarshalRoot(r)
2739-
}
2740-
27412673
// WorkflowTaskStep represents a task step that executes a command.
27422674
type WorkflowStepTaskParam struct {
27432675
// Command must be between 1 and 20,000 characters:

automation_test.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,6 @@ func TestAutomationNewWithOptionalParams(t *testing.T) {
4747
Draft: gitpod.F(true),
4848
Title: gitpod.F("title"),
4949
}),
50-
Report: gitpod.F(gitpod.WorkflowStepReportParam{
51-
Outputs: gitpod.F([]gitpod.WorkflowStepReportOutputParam{{}}),
52-
}),
5350
Task: gitpod.F(gitpod.WorkflowStepTaskParam{
5451
Command: gitpod.F("command"),
5552
}),
@@ -79,9 +76,6 @@ func TestAutomationNewWithOptionalParams(t *testing.T) {
7976
Draft: gitpod.F(true),
8077
Title: gitpod.F("title"),
8178
}),
82-
Report: gitpod.F(gitpod.WorkflowStepReportParam{
83-
Outputs: gitpod.F([]gitpod.WorkflowStepReportOutputParam{{}}),
84-
}),
8579
Task: gitpod.F(gitpod.WorkflowStepTaskParam{
8680
Command: gitpod.F("command"),
8781
}),
@@ -183,9 +177,6 @@ func TestAutomationUpdateWithOptionalParams(t *testing.T) {
183177
Draft: gitpod.F(true),
184178
Title: gitpod.F("title"),
185179
}),
186-
Report: gitpod.F(gitpod.WorkflowStepReportParam{
187-
Outputs: gitpod.F([]gitpod.WorkflowStepReportOutputParam{{}}),
188-
}),
189180
Task: gitpod.F(gitpod.WorkflowStepTaskParam{
190181
Command: gitpod.F("command"),
191182
}),
@@ -216,9 +207,6 @@ func TestAutomationUpdateWithOptionalParams(t *testing.T) {
216207
Draft: gitpod.F(true),
217208
Title: gitpod.F("title"),
218209
}),
219-
Report: gitpod.F(gitpod.WorkflowStepReportParam{
220-
Outputs: gitpod.F([]gitpod.WorkflowStepReportOutputParam{{}}),
221-
}),
222210
Task: gitpod.F(gitpod.WorkflowStepTaskParam{
223211
Command: gitpod.F("command"),
224212
}),

0 commit comments

Comments
 (0)