Skip to content

Commit

Permalink
automation subtask id -> automation task id
Browse files Browse the repository at this point in the history
  • Loading branch information
ayoy committed Sep 15, 2024
1 parent eb08f7c commit db24db2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ def self.run(params)

task_id = Helper::AsanaHelper.extract_asana_task_id(task_url)

automation_subtask_id = Helper::AsanaHelper.get_release_automation_subtask_id(task_url, token)
args[:automation_subtask_id] = automation_subtask_id
automation_task_id = Helper::AsanaHelper.get_release_automation_subtask_id(task_url, token)
args[:automation_task_id] = automation_task_id

assignee_id = fetch_assignee_id(
task_id: task_id,
Expand All @@ -47,7 +47,7 @@ def self.run(params)
begin
subtask = create_subtask(
token: token,
task_id: automation_subtask_id,
task_id: automation_task_id,
assignee_id: assignee_id,
task_name: task_name,
notes: params[:notes],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ def self.run(params)
github_handle = params[:github_handle]
args = params[:template_args]

automation_subtask_id = Helper::AsanaHelper.get_release_automation_subtask_id(task_url, token)
automation_task_id = Helper::AsanaHelper.get_release_automation_subtask_id(task_url, token)
params[:automation_task_id] = automation_task_id

if is_scheduled_release
task_id = Helper::AsanaHelper.extract_asana_task_id(task_url)
Expand All @@ -38,9 +39,9 @@ def self.run(params)

begin
UI.important("Adding user #{assignee_id} as collaborator on release task's 'Automation' subtask")
asana_client.tasks.add_followers_for_task(task_gid: automation_subtask_id, followers: [assignee_id])
asana_client.tasks.add_followers_for_task(task_gid: automation_task_id, followers: [assignee_id])
rescue StandardError => e
UI.user_error!("Failed to add user #{assignee_id} as collaborator on task #{automation_subtask_id}: #{e}")
UI.user_error!("Failed to add user #{assignee_id} as collaborator on task #{automation_task_id}: #{e}")
end

if template_name.to_s.empty?
Expand All @@ -49,7 +50,7 @@ def self.run(params)
UI.important("Adding comment to release task's 'Automation' subtask using #{template_name} template")
end
AsanaAddCommentAction.run(
task_id: automation_subtask_id,
task_id: automation_task_id,
comment: comment,
template_name: template_name,
template_args: args,
Expand Down

0 comments on commit db24db2

Please sign in to comment.