Skip to content

Commit 9feac47

Browse files
committed
Added actions
1 parent d36ac65 commit 9feac47

File tree

2 files changed

+13
-15
lines changed

2 files changed

+13
-15
lines changed

components/clickup/actions/create-time-entry/create-time-entry.mjs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default {
66
key: "clickup-create-time-entry",
77
name: "Create Time Entry",
88
description: "Create a new time entry. [See the documentation](https://developer.clickup.com/reference/createatimeentry)",
9-
version: "0.0.1",
9+
version: "0.0.{{ts}}",
1010
type: "action",
1111
props: {
1212
...common.props,
@@ -57,12 +57,12 @@ export default {
5757
start: {
5858
type: "string",
5959
label: "Start Time",
60-
description: "Unix timestamp in milliseconds for the Start Time, e.g., `1595282645000`",
60+
description: "he Start Time, can be ISO 8601 Date (.e.g `2025-08-06T01:50:19Z`) or Unix timestamp in milliseconds (.e.g `1595282645000`)",
6161
},
6262
end: {
6363
type: "string",
6464
label: "End Time",
65-
description: "Unix timestamp in milliseconds, e.g., `1595283000000`. When there are values for both start and end, duration is ignored",
65+
description: "The End Time, can be ISO 8601 Date (.e.g `2025-08-06T01:50:19Z`) or Unix timestamp in milliseconds (.e.g `1595282645000`)",
6666
},
6767
description: {
6868
type: "string",
@@ -71,6 +71,9 @@ export default {
7171
},
7272
},
7373
async run({ $ }) {
74+
const start = new Date(+this.start || this.start).getTime();
75+
const end = new Date(+this.end || this.end).getTime();
76+
7477
const response = await this.clickup.createTimeEntry({
7578
$,
7679
teamId: this.workspaceId,
@@ -80,8 +83,8 @@ export default {
8083
data: {
8184
tid: this.taskId,
8285
description: this.description,
83-
start: new Date(this.start).getTime(),
84-
end: new Date(this.end).getTime(),
86+
start,
87+
end,
8588
stop: this.end,
8689
},
8790
});

pnpm-lock.yaml

Lines changed: 5 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)