Chore: Fix crowdin task cleanup (#105690)

* fix cleanup of project tasks

* fix task cleanup
pull/105450/head^2
Ashley Harrison 3 days ago committed by GitHub
parent 1956a17f61
commit e38e07ec60
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 3
      .github/workflows/scripts/crowdin/cleanup-tasks.ts

@ -26,7 +26,8 @@ const { tasksApi } = new crowdin(credentials);
const tasks = await listTasks(PROJECT_ID); const tasks = await listTasks(PROJECT_ID);
for (const task of tasks) { for (const task of tasks) {
const { id, status, progress } = task.data; const { id, status, progress } = task.data;
if (status === 'todo' && progress.done === progress.total) { console.log(`Processing task ${id} with status ${status} and progress ${progress.done}/${progress.total}`);
if (status === 'in_progress' && progress.done === progress.total) {
console.log(`Marking task ${id} as done`); console.log(`Marking task ${id} as done`);
await markTaskAsDone(PROJECT_ID, id); await markTaskAsDone(PROJECT_ID, id);
} else { } else {

Loading…
Cancel
Save