Skip to content

Commit 27e7d8e

Browse files
authored
Added Support for Post Action Request (#1135)
2 parents 3ef3a40 + e5ae339 commit 27e7d8e

2 files changed

Lines changed: 18 additions & 1 deletion

File tree

src/management/__generated/models/index.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4575,6 +4575,11 @@ export interface GetActions200ResponseActionsInner {
45754575
*
45764576
*/
45774577
updated_at: string;
4578+
/**
4579+
* True if the action should be deployed after creation.
4580+
*
4581+
*/
4582+
deploy?: boolean;
45784583
}
45794584

45804585
export const GetActions200ResponseActionsInnerStatusEnum = {
@@ -10692,6 +10697,11 @@ export interface PostActionRequest {
1069210697
*
1069310698
*/
1069410699
secrets?: Array<PostActionRequestSecretsInner>;
10700+
/**
10701+
* True if the action should be deployed after creation.
10702+
*
10703+
*/
10704+
deploy?: boolean;
1069510705
}
1069610706
/**
1069710707
* Dependency is an npm module. These values are used to produce an immutable artifact, which manifests as a layer_id.

test/management/actions.test.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ describe('ActionsManager', () => {
8484
},
8585
status: 'building',
8686
all_changes_deployed: true,
87+
deploy: false,
8788
},
8889
];
8990

@@ -149,6 +150,7 @@ describe('ActionsManager', () => {
149150
expect(credentials.data.actions?.[0].all_changes_deployed).toBe(
150151
data[0].all_changes_deployed
151152
);
153+
expect(credentials.data.actions?.[0].deploy).toBe(data[0].deploy);
152154

153155
done();
154156
});
@@ -211,6 +213,7 @@ describe('ActionsManager', () => {
211213
all_changes_deployed: true,
212214
created_at: '2020-07-29T19:45:15.725999098Z',
213215
updated_at: '2020-07-29T19:45:15.725999098Z',
216+
deploy: false,
214217
};
215218
beforeEach(() => {
216219
request = nock(API_URL).get(`/actions/actions/${data.id}`).reply(200, data);
@@ -270,6 +273,7 @@ describe('ActionsManager', () => {
270273
expect(credentials.data.installed_integration_id).toBe(data.installed_integration_id);
271274
expect(credentials.data.integration?.id).toBe(data.integration?.id);
272275
expect(credentials.data.all_changes_deployed).toBe(data.all_changes_deployed);
276+
expect(credentials.data.deploy).toBe(data.deploy);
273277

274278
done();
275279
});
@@ -306,6 +310,7 @@ describe('ActionsManager', () => {
306310
],
307311
runtime: 'node12',
308312
secrets: [{ name: 'secret1' }],
313+
deploy: false,
309314
};
310315

311316
beforeEach(() => {
@@ -365,7 +370,7 @@ describe('ActionsManager', () => {
365370
);
366371
expect(action.data.runtime).toBe(data.runtime);
367372
expect(action.data.secrets?.[0].name).toBe(data.secrets?.[0].name);
368-
373+
expect(action.data.deploy).toBe(data.deploy);
369374
done();
370375
});
371376
});
@@ -1115,6 +1120,7 @@ describe('ActionsManager', () => {
11151120
action: {
11161121
id: 'action-id',
11171122
name: 'test action',
1123+
deploy: false,
11181124
},
11191125
},
11201126
];
@@ -1163,6 +1169,7 @@ describe('ActionsManager', () => {
11631169
expect(bindings.data.bindings?.[0].display_name).toBe(data[0].display_name);
11641170
expect(bindings.data.bindings?.[0].action?.id).toBe(data[0].action?.id);
11651171
expect(bindings.data.bindings?.[0].action?.name).toBe(data[0].action?.name);
1172+
expect(bindings.data.bindings?.[0].action?.deploy).toBe(data[0].action.deploy);
11661173
done();
11671174
});
11681175
});

0 commit comments

Comments
 (0)