Skip to content

Commit

Permalink
rearrange update_asana_tasks_for_public_release order
Browse files Browse the repository at this point in the history
  • Loading branch information
kshann committed Nov 25, 2024
1 parent 879513d commit 822f0b5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ def self.update_asana_tasks_for_public_release(params)

# Complete tasks that don't require a post-mortem.
UI.message("Completing tasks")
task_ids.delete(params[:release_task_id])
complete_tasks(task_ids, params[:asana_access_token])
UI.message("Done completing tasks")

Expand All @@ -292,7 +293,6 @@ def self.update_asana_tasks_for_public_release(params)

# Construct release announcement task description
UI.message("Preparing release announcement task")
task_ids.delete(params[:release_task_id])
Helper::ReleaseTaskHelper.construct_release_announcement_task_description(params[:version], release_notes, task_ids)
end

Expand Down
5 changes: 3 additions & 2 deletions spec/asana_helper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ def sanitize_asana_html_notes(content)

let(:tag_name) { "7.122.0" }
let(:tag_id) { "7.122.0" }
let(:task_ids) { ["task1", "task2", "task3"] }
let(:task_ids) { ["1234567890", "1234567891", "1234567892"] }
let(:release_notes) { "Release notes content" }

before do
Expand Down Expand Up @@ -400,10 +400,11 @@ def sanitize_asana_html_notes(content)
expect(Fastlane::UI).to have_received(:message).with("Fetching #{tag_name} Asana tag")
expect(Fastlane::UI).to have_received(:success).with("#{tag_name} tag URL: https://app.asana.com/0/#{tag_id}/list")
expect(Fastlane::UI).to have_received(:message).with("Fetching tasks tagged with #{tag_name}")
expect(Fastlane::UI).to have_received(:success).with("#{task_ids.count} task(s) found.")
expect(Fastlane::UI).to have_received(:success).with("3 task(s) found.")
expect(Fastlane::UI).to have_received(:message).with("Moving tasks to Done section")
expect(Fastlane::UI).to have_received(:success).with("All tasks moved to Done section")
expect(Fastlane::UI).to have_received(:message).with("Completing tasks")
expect(task_ids).to eq(["1234567891", "1234567892"]) # Check function removes release task
expect(Fastlane::UI).to have_received(:message).with("Done completing tasks")
expect(Fastlane::UI).to have_received(:message).with("Fetching release notes from Asana release task (https://app.asana.com/0/0/1234567890/f)")
expect(Fastlane::UI).to have_received(:success).with("Release notes: #{release_notes}")
Expand Down

0 comments on commit 822f0b5

Please sign in to comment.