diff --git a/ci/asana-create-tasks.js b/ci/asana-create-tasks.js
index 293ae9ab..7df210ae 100644
--- a/ci/asana-create-tasks.js
+++ b/ci/asana-create-tasks.js
@@ -107,17 +107,21 @@ const asanaCreateTasks = async () => {
.replace(/<(h3|h4)>/ig, '
').replace(/<\/(h3|h4)>/ig, '
')
// Updating task and moving to Release section...
- console.error(JSON.stringify(updatedNotes))
- await asana.tasks.updateTask(new_task.gid, {html_notes: updatedNotes})
+ console.error('Updated notes:', JSON.stringify(updatedNotes))
+ let updateTaskResult = await asana.tasks.updateTask(new_task.gid, {html_notes: updatedNotes})
+ console.error('updateTaskResult:', updateTaskResult)
- await asana.tasks.addProjectForTask(new_task.gid, { project: autoconsentProjectGid, section: releaseSectionGid })
+ const addProjectResult = await asana.tasks.addProjectForTask(new_task.gid, { project: autoconsentProjectGid, section: releaseSectionGid })
+ console.error('addProjectResult:', addProjectResult)
// The duplicateTask job returns when the task itself has been duplicated, ignoring the subtasks.
// We want to wait that the job completes so that we can fetch all the subtasks correctly.
- await waitForJobSuccess(duplicateTaskJobGid)
+ const duplicateTaskResult = await waitForJobSuccess(duplicateTaskJobGid)
+ console.error('duplicateTaskResult:', duplicateTaskResult)
// Getting subtasks...
const { data: subtasks } = await asana.tasks.getSubtasksForTask(new_task.gid, {opt_fields: 'name,html_notes,permalink_url'})
+ console.error('subtasks:', subtasks)
// Updating subtasks and moving to appropriate projects...
for (const subtask of subtasks) {
@@ -138,9 +142,11 @@ const asanaCreateTasks = async () => {
html_notes.replace(projectExtractorRegex, '')
.replace('[[notes]]', updatedNotes)
+ console.error(`updating task ${gid} with name ${newName} and notes ${subtaskNotes}`)
await asana.tasks.updateTask(gid, { name: newName, html_notes: subtaskNotes })
if (extractedProjects) {
+ console.error(`adding projects ${extractedProjects} to task ${gid}`)
for (const projectGidAndSection of extractedProjects.split(',')) {
const [projectGid, sectionGid] = projectGidAndSection.split(':')
await asana.tasks.addProjectForTask(gid, { project: projectGid, section: sectionGid })
@@ -153,7 +159,9 @@ const asanaCreateTasks = async () => {
.replace('[[pr_url]]', version)
.replace('[[extra_content]]', version)
- await asana.tasks.updateTask(new_task.gid, {html_notes: finalNotes})
+ console.error('finalNotes:', finalNotes)
+ updateTaskResult = await asana.tasks.updateTask(new_task.gid, {html_notes: finalNotes})
+ console.error('updateTaskResult:', updateTaskResult)
const jsonString = JSON.stringify(platforms)
return {stdout: jsonString}
@@ -161,6 +169,8 @@ const asanaCreateTasks = async () => {
asanaCreateTasks()
.then((result) => {
+ // this log is for visibility in Github web interface
+ console.error('stage result:', result.stdout)
// The log is needed to read the value from the bash context
console.log(result.stdout)
})