Skip to content

Commit b705558

Browse files
Standardize action descriptions to use imperative form
Co-authored-by: rita-gorokhod <60586879+rita-gorokhod@users.noreply.github.com>
1 parent ea3936d commit b705558

30 files changed

Lines changed: 75 additions & 70 deletions

File tree

packages/blocks/cloudhealth/src/lib/actions/get-asset-perspectives.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,14 @@ function getAssetPerspectives(asset: any): Record<string, string> {
122122
.map((s) => s.trim())
123123
.filter(Boolean);
124124

125-
const perspectivesAsObject = perspectives.reduce((acc, item) => {
126-
const [key, ...rest] = item.split(':');
127-
acc[key.trim()] = rest.join(':').trim();
128-
return acc;
129-
}, {} as Record<string, string>);
125+
const perspectivesAsObject = perspectives.reduce(
126+
(acc, item) => {
127+
const [key, ...rest] = item.split(':');
128+
acc[key.trim()] = rest.join(':').trim();
129+
return acc;
130+
},
131+
{} as Record<string, string>,
132+
);
130133

131134
return perspectivesAsObject;
132135
}

packages/blocks/framework/src/lib/context.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,12 @@ export type TriggerHookContext<
7575
> = S extends TriggerStrategy.APP_WEBHOOK
7676
? AppWebhookTriggerHookContext<BlockAuth, TriggerProps>
7777
: S extends TriggerStrategy.POLLING
78-
? PollingTriggerHookContext<BlockAuth, TriggerProps>
79-
: S extends TriggerStrategy.SCHEDULED
80-
? ScheduledTriggerHookContext<BlockAuth, TriggerProps>
81-
: S extends TriggerStrategy.WEBHOOK
82-
? WebhookTriggerHookContext<BlockAuth, TriggerProps>
83-
: never;
78+
? PollingTriggerHookContext<BlockAuth, TriggerProps>
79+
: S extends TriggerStrategy.SCHEDULED
80+
? ScheduledTriggerHookContext<BlockAuth, TriggerProps>
81+
: S extends TriggerStrategy.WEBHOOK
82+
? WebhookTriggerHookContext<BlockAuth, TriggerProps>
83+
: never;
8484

8585
export type TestOrRunHookContext<
8686
BlockAuth extends BlockAuthProperty,

packages/blocks/framework/src/lib/property/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ export interface InputPropertyMap {
7171
export type BlockPropValueSchema<T extends BlockProperty> = T extends undefined
7272
? undefined
7373
: T extends { required: true }
74-
? T['valueSchema']
75-
: T['valueSchema'] | undefined;
74+
? T['valueSchema']
75+
: T['valueSchema'] | undefined;
7676

7777
export type StaticPropsValue<T extends BlockPropertyMap> = {
7878
[P in keyof T]: BlockPropValueSchema<T[P]>;

packages/blocks/framework/src/lib/property/input/common.ts

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -41,26 +41,26 @@ export type TPropertyValue<
4141
defaultValue?: U extends PropertyType.ARRAY
4242
? unknown[]
4343
: U extends PropertyType.JSON
44-
? object
45-
: U extends PropertyType.CHECKBOX
46-
? boolean
47-
: U extends PropertyType.LONG_TEXT
48-
? string
49-
: U extends PropertyType.SHORT_TEXT
50-
? string
51-
: U extends PropertyType.NUMBER
52-
? number
53-
: U extends PropertyType.DROPDOWN
54-
? unknown
55-
: U extends PropertyType.MULTI_SELECT_DROPDOWN
56-
? unknown[]
57-
: U extends PropertyType.STATIC_MULTI_SELECT_DROPDOWN
58-
? unknown[]
59-
: U extends PropertyType.STATIC_DROPDOWN
60-
? unknown
61-
: U extends PropertyType.DATE_TIME
62-
? string
63-
: U extends PropertyType.FILE
64-
? WorkflowFile
65-
: unknown;
44+
? object
45+
: U extends PropertyType.CHECKBOX
46+
? boolean
47+
: U extends PropertyType.LONG_TEXT
48+
? string
49+
: U extends PropertyType.SHORT_TEXT
50+
? string
51+
: U extends PropertyType.NUMBER
52+
? number
53+
: U extends PropertyType.DROPDOWN
54+
? unknown
55+
: U extends PropertyType.MULTI_SELECT_DROPDOWN
56+
? unknown[]
57+
: U extends PropertyType.STATIC_MULTI_SELECT_DROPDOWN
58+
? unknown[]
59+
: U extends PropertyType.STATIC_DROPDOWN
60+
? unknown
61+
: U extends PropertyType.DATE_TIME
62+
? string
63+
: U extends PropertyType.FILE
64+
? WorkflowFile
65+
: unknown;
6666
};

packages/blocks/http/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { httpAuth } from './lib/common/auth';
66

77
export const http = createBlock({
88
displayName: 'HTTP',
9-
description: 'Sends HTTP requests and return responses',
9+
description: 'Send HTTP requests and return responses',
1010
logoUrl: 'https://static.openops.com/blocks/http-block.svg',
1111
categories: [BlockCategory.CORE],
1212
auth: httpAuth,

packages/blocks/http/src/lib/actions/return-response.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { StatusCodes } from 'http-status-codes';
99
export const httpReturnResponse = createAction({
1010
name: 'return_response',
1111
displayName: 'Return Response',
12-
description: 'Return a response',
12+
description: 'Return an HTTP response from a webhook trigger',
1313
isWriteAction: false,
1414
props: {
1515
status: Property.Number({

packages/blocks/http/src/lib/actions/send-http-request-action.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ export const httpSendRequestAction = createAction({
142142
},
143143
}),
144144
timeout: Property.Number({
145-
displayName: 'Timeout(in Seconds)',
145+
displayName: 'Timeout (in Seconds)',
146146
required: false,
147147
}),
148148
failsafe: Property.Checkbox({

packages/blocks/hyperglance/src/lib/actions/getCollectorRecordStatistics.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export const getCollectorRecordStatistics = createAction({
1010
auth: hyperglanceAuth,
1111
name: 'getCollectorRecordStatistics',
1212
displayName: 'Get Credential Statistics',
13-
description: 'Returns Collection Statistics for the credential',
13+
description: 'Get collection statistics for a cloud provider credential',
1414
props: {
1515
datasource: getDatasourceProp({
1616
description: 'Get credential of this cloud provider',

packages/blocks/hyperglance/src/lib/actions/getCollectorRecordStatus.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export const getCollectorRecordStatus = createAction({
1010
auth: hyperglanceAuth,
1111
name: 'getCollectorRecordStatus',
1212
displayName: 'Get Credential Status',
13-
description: 'Returns Collector Record Status',
13+
description: 'Get collector record status for a cloud provider credential',
1414
props: {
1515
datasource: getDatasourceProp({
1616
description: 'Get credential of this cloud provider',

packages/blocks/jira-cloud/src/lib/actions/add-attachment-to-issue.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export const addAttachmentToIssueAction = createAction({
99
auth: jiraCloudAuth,
1010
name: 'add_issue_attachment',
1111
displayName: 'Add Attachment to Issue',
12-
description: 'Adds an attachment to an issue',
12+
description: 'Add an attachment to an issue',
1313
isWriteAction: true,
1414
props: {
1515
projectId: getProjectIdDropdown(),

0 commit comments

Comments
 (0)