Skip to content
This repository was archived by the owner on Nov 11, 2025. It is now read-only.

Commit b53f2a6

Browse files
committed
set trello card name as toggle time entry description
1 parent 2f9ae70 commit b53f2a6

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

background.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ browser.runtime.onMessage.addListener(async (msg) => {
1313

1414
async function track(cardId) {
1515
const task = await addTask(cardId);
16-
const response = await trektor.togglGateway.startTimeEntry(task.id);
16+
const card = await trektor.trelloGateway.getCard(cardId);
17+
const response = await trektor.togglGateway.startTimeEntry(task.id, card.name);
1718
return response.data;
1819
}
1920

trektor.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ class TogglGateway {
6868
return this.#request("get", "/time_entries/current");
6969
}
7070

71-
startTimeEntry(taskId) {
71+
startTimeEntry(taskId, description) {
7272
return this.#request("post", "/time_entries/start", {
73-
time_entry: { tid: taskId, created_with: "trektor" },
73+
time_entry: { description, tid: taskId, created_with: "trektor" },
7474
});
7575
}
7676

0 commit comments

Comments
 (0)