Skip to content

Commit

Permalink
Add block merge until task complete
Browse files Browse the repository at this point in the history
  • Loading branch information
callms committed Dec 28, 2021
1 parent 2f280cf commit ea121a6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions action.js
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,14 @@ exports.action = async function action() {

console.log(`Updating Asana task: ${taskId}`, updateOptions);
await updateAsanaTask(taskId, updateOptions);

const { completed } = await getTask(taskId, {
opt_fields: ["completed"],
});
console.log("Task is completed?", completed);
if (!completed) {
throw new Error("Asana task is not yet completed, blocking merge");
}
}
break;
}
Expand Down

0 comments on commit ea121a6

Please sign in to comment.